Build, Test and Deploy a modern webapp using CircleCI.
Technologies covered:
- Build a Spring Boot app with Maven (and caching maven repos!)
- Packaged as docker image (without daemon!) using Google Jib
- Browser testing with Selenium and Saucelabs (disabled account :( )
- Static Code Analysis with SonarQube (disabled account :( )
- Manual Approval/Promotion
- Canary deployment to Kubernetes cluster using Vamp.io Release Orchestration policies.
To test simple UI functionality we're using Spring Boot's test starter and SauceLabs Connect Tunnel binaries driven through Selenium's WebDriver
interface. The use of SauceLabs let's us run several browser combinations in parallel.
You can see these simple tests in HomePagesTests.java
We can use a PaaS/FaaS cluster and canary or blue/green releases for zero-downtime deployments using Blue/Green strategy.
- deploy new version of service as container image (i.e. in dockerhub, ecr, etc)
- Rollout new image to XX% of traffice, or by cohort
- Monitor key metrics like heatlh and activity to determine validity of new version
- Automatically fail or proceed rollout.
And live app visible on http://blueskygreenbuilds.com
- We're using a service account in CircleCI to apply the deployment
- Traffic is shaped via contour as influence by Vamp policies
- We grab a visual of the routes from contour and save as artifact in build
- Spring Boot app is exposing a metrics API that prometheus scrape, which can drive custom policy metrics.
This project uses spring boot, so run as you would any other like project to start on port :8080 locally.
mvn spring-boot:run
See demo-assets