- Download and install Cloud Foundry CLI from Cloud Foundry CLI repository
- Verify CLI is running
$ cf --version
- Ensure you have
git
installed and running on your laptop. You may use instructions here. - Get your
API server URL
,username
andpassword
from the lab organizer
Deploy a sample spring app to Cloud Foundry running on Oracle Cloud Infrastucture using cf
client.
- Target the API server
$ cf api --skip-ssl-validation <API server URL>
- Login
$ cf login -u <username> -p <password>
- Verify targeted to an org
$ cf target
- Download
$ git clone https://github.com/cloudfoundry-samples/cf-sample-app-spring
- Deploy
$ cd cf-sample-app-spring
$ cf push
- Get list of deployed applications
$ cf apps
- Show details about the
cf-spring
application deployed in the previous step
$ cf app cf-spring
- Find application URI
- Launch browser and connect to that URI
- Use your favorite editor to edit
manifest.yml
and the change the number ofinstances
to deploy. Change
applications:
- name: cf-spring
...
instances: 1
...
to
applications:
- name: cf-spring
...
instances: 3
...
- Redeploy the application
$ cf push
- Verify the number of instances running
$ cf app cf-spring
Learn how to upgrade a running application without incurring downtime.
https://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html