티스토리 뷰
기본 프로젝트 다운로드
java 11 프로젝트여서 ./gradlew 수행 시에 sdkman 등으로 버전을 맞추고 빌드 명령 실행
git clone git@github.com:yepapa/spring-boot-boilerplate.git
./gradlew build
Pivotal Web Service 가입 후에 조직 또는 프로젝트 생성한다. 추후에 수정할 수 있으니 알맞게 넣는다.
https://console.run.pivotal.io/organizations/new
Pivotal Web Services
console.run.pivotal.io
cf push에 사용할 manifest 정의 방법은 아래를 참고한다. 프로젝트에 이미 정의되어 있음.
https://docs.pivotal.io/pivotalcf/2-6/devguide/deploy-apps/manifest-attributes.html
프로젝트 디렉토리 위치에서 cf login & cf push
cf login -a https://api.run.pivotal.io
cf push
mysql 서비스 오류가 날 땐 아래 화면에서 새 서비스를 만듬.
확인
http://spring-boot-boilerplate.cfapps.io/person
명령어
cf apps // app 확인
cf app spring-boot-boilerplate // app 상세확인
cf services // service 확인
cf logs spring-boot-boilerplate --recent // log 확인
서비스 unbind 및 삭제
cf unbind-service spring-boot-boilerplate mysql
cf delete-service spring-boot-boilerplate
cf delete-service mysql
정말 배포가 간단하고 모니터링, 로그 등 부가적인 것들은 pcf에서 제공해주어서 애플리케이션 개발에만 집중할 수 있다.
단점은 역시 교육 비용과 물리적 비용이 든다는 것.....
참고
Tips for Java Developers | Pivotal Docs
Tips for Java Developers Cloud Foundry can deploy a number of different JVM-based artifact types. For a more detailed explanation of what it supports, see the Java Buildpack documentation. Java Buildpack For detailed information about using, configuring, a
docs.pivotal.io
https://github.com/cloudfoundry/java-buildpack
cloudfoundry/java-buildpack
Cloud Foundry buildpack for running Java applications - cloudfoundry/java-buildpack
github.com
https://docs.run.pivotal.io/buildpacks/java/getting-started-deploying-apps/gsg-spring.html
Getting Started Deploying Spring Apps | Pivotal Web Services Docs
Getting Started Deploying Spring Apps Welcome to Pivotal Web Services, powered by Cloud Foundry! This guide is intended to walk you through deploying a Spring app to Pivotal Web Services (PWS). You can choose whether to push a sample app, your own app, or
docs.run.pivotal.io
https://www.baeldung.com/spring-boot-app-deploy-to-cloud-foundry
Deploying a Spring Boot Application to Cloud Foundry | Baeldung
Learn about the steps necessary to put your application up on Cloud Foundry
www.baeldung.com