In this blog I will describe integrating ADOP and the Cloud Foundry public PaaS from Pivotal.
While it is, of course, technically possible to run all of the tools found in ADOP on Cloud Foundry, that wasn’t our intention. Instead we wanted to combine the Continuous Delivery pipeline capabilities of ADOP with the industrial grade cloud-first environments that Cloud Foundry offers.
Many ADOP cartridges, for example, the Java Petclinic one, contain two Continuous Delivery pipelines:
The first, to build and test the infrastructure code and build the Platform Application.
The beauty of using a public PaaS like Pivotal Cloud Foundry is that your platforms and environments are taken care of, leaving you much more time to focus on the application code. However, you do, of course, still need to create an account and provision your environments.
Click Pivotal Web Services.
Create a free tier account.
Create an organization.
Create one or more spaces.
With this in place you are ready to:
Spin up an ADOP instance.
Store your Cloud Foundry credentials in Jenkins’ Secure Store.
Trigger the Continuous Delivery pipeline.
Having done all of this, the pipeline now does the following:
Builds the code (which happens to be the JPetStore).
Runs the Unit Test and performs Static Code Analysis using SonarQube.
Deploys the code to an environment also known in Cloud Foundry as a Space.
Performs some performance testing using Gatling.
Kills the running application in environment and waits to verify that Cloud Foundry automatically restores it.
Deploys the application to a multi-node Cloud Foundry environment.
Kills one of the nodes in Cloud Foundry and validates that Cloud Foundry automatically avoids sending traffic to the killed node.
The beauty of ADOP is that all of this great Continuous Delivery automation is fully portable and can be loaded time and time again into any ADOP instance running on any cloud.
There is plenty more we could have done with the cartridge to really put the PaaS through its paces, such as generating load and watching auto-scaling in action. Everything is on Github, so pull requests will be warmly welcomed! If you’ve tried to follow along but got stuck at all, please reach me @markosrendell.