To deploy and configure an application, leverage the platform for monitoring & management of the microservices, and automate a continuous delivery pipeline.
Before we do anything lets take a look at the developer console and confirm install of the Cloud Foundry CLI on our laptops/desktops.
-
login to the console at https://console.run.pcf.jkruckcloud.com
-
I’m using self signed certs, please proceed through the warnings in your browser.
-
If you’re using chrome, make sure it’s a recent.
-
Login with your work email address (all lowercase) and a password of
password
-
Navigate to "Tools" (Left side)
-
Download and install the CLI for your platform..
Now that we have the CLI, lets push some basic applications and learn to navigate the CLI.
-
Login to Cloud Foundry
cf login -a https://api.run.pcf.jkruckcloud.com -u <your email> -p password -o <your org> -s development --skip-ssl-validation
-
Note if you had SSL errors above, make sure to add
--skip-ssl-validation
to the command.-
-a
is the api we’re targeting. Meaning all actions we perform will take place on this Cloud Foundry Foundation (deployment) -
-u
is your username, in this workshop it’s your email address. -
-p
is your password. It should be your PR AMER password -
-o
is the name of your organization -
-s
is the name of your space -
--skip-ssl-validation
lets the CLI use a self signed cert (or a cert where the names don’t match up).
-
-
This command is interactive, you don’t have to type your password on the command line…
-
Make sure you have targeted your development space (run
cf target
to check) -
Clone our example applications
cd cf-hello-world-sample-apps/<pick a language>
-
No git on your laptop? No problem, download the apps here.
Read README.md
and push some apps!!
MAKE SURE YOU CD INTO THE INDIVIDUAL APP DIRECTORIES
-
Review the Keynote on Cloud_Ready_Apps Ready Apps
-
This should drive home how to build applications that will run well on PCF. As we’ll cover PCF can work with lots of applications, but cloud native is the best fit.
-
-
We’re going to switch to a java application called
cities-service
. We will use this application for the remainder of the workshop. Find and download the cities jars at the following location.-
https://s3-us-west-1.amazonaws.com/pcf-icm/cities-service.jar
-
You can also find the code in this repository in dev-experience/cities. We’ve made some changes to the code in the jar referenced above to force a failure early on. If you choose to compile and run the code yourself please remove the
hsqldb
dependency from the build file. Please note there is not time in the class to troubleshoot build issues, so if you experience problems please use the jar above.
-
-
Take a quick look at the architecture of the cities application.
-
Lets talk about about cloud ready apps and what cloud native means.
-
Review the documentation on Considerations for Designing and Running an Application in the Cloud
-
Review the documentation on Writing to logs
-
-
Pushing apps
-
Using Manifests
-
Dependency Injection in Spring
-
Health, logging & events via the CLI
-
Binding to services
-
Environment variables
-
Scaling apps
-
The following exercises should be completed for cities-service
.
We will complete the following exercises on PWS because of THD network restrictions.