Sample Apps for Cloud Foundry

Working on the Java Buildpack means lots of testing with unit (over 99% coverage) and integration tests but we also have a suite of sample applications to do complete system wide testing. They are all tested during our CI builds and might be useful for people that want to play around with different application types on Cloud Foundry. Find them here in GitHub. The project has a good README so I won’t duplicate it but we have various apps for Spring Boot, Grails, Groovy, Java Main, Play, Ratpack and Spring MVC. Each app supports a number of URL end points that allow exploration of the environment the application is running in from the classpath and environment variables to bound services. These are also all well documented. Getting the applications running is simple. The cf cli tool is required to push applications from the command line, install instructions are here.

git clone https://github.com/cloudfoundry/java-test-applications.git

cd java-test-applications

./gradlew

cd ***-application

To give the application a more descriptive application name the manifest.yml file should be modified.

cf push

That’s it. The console output will show the URL the app is bound to. It’s now possible to start looking at the endpoints documented in the README and exploring the applications environment and any bound services.

Leave a Reply

Your email address will not be published.