In this last article of the Continuous Delivery in the Cloud series I will show you how I build a dashboard inside Jenkins that combines all crucial information of your system in one place. The dashboard displays the current state of all environments (running, stopped), the software versions deployed on the individual production and test systems and the latest release notes. It also allows you to deploy specific versions of your application to specific environments.
- Part 1: Continuous Delivery Overview
- Part 2: Getting started with Amazon EC2
- Part 3: Configure your Continuous Integration Server
- Part 4: Provisioning your Test, Staging and Production environments
- Part 5: Configure your Continuous Delivery Pipeline
- Part 6: Create a Dashboard of your System
How everything started
It all started with two user stories from the product owner:
- User Story 1: As a user I want to deploy a specific application version to a specific test system, so I can test that version of the application.
- User Story 2: As a user I want to see the deployed versions of all systems in one place, to know the current system status.
After reading the user stories and giving them a little thought it was clear that I needed to create a dashboard to fulfill the requirements. And here is the result.
The dashboard consists of three sections.
The first sections polls Artifactory via its REST API and finds all software versions that are available for deployment. By selecting a version and an environment I trigger a Jenkins Job that will deploy the specified version to the server. I am not just deploying a WAR file but also running the correct liquibase database scripts to match the application version.
The second section shows all AWS environments. Here we have four AWS instances: Test, UAT, Production Green and Production Blue. For each environment we can see the software version that is currently deployed, a link to the web application, further AWS information and the overall status if the instance is up and running or stopped.
The third section shows the last changesets to the application on Github. This allows the product owner and test user to see the features that were added to the application and in which application version they were added.
Here is a screenshot of the dashboard:
The screencast shows the dashboard in action.
Right-click on the video to get it started or click on the link below to view the video in fullscreen mode. I suggest clicking the link and running it in fullscreen mode since the embedded video stops half-way through in some browsers.. View video fullscreen
This browser is not compatible with HTML 5
I hope the article series has given you a good background on how to create your own continuous delivery pipeline using open source tools and cloud services like AWS. If you interested in more information or need help setting up something similar for your projects feel free to write an email or post your comments.
Update 2: Official Jenkins EC2 Deployment Dashboard Plugin (released 2015)
We released the EC2 Deployment Dashboard as an official Jenkins plugin in 2015. Check out https://blog.codecentric.de/en/2015/02/jenkins-deployment-dashboard-ec2-environments/ for more details.
Update 1: How to generate a HTML Page via Shell Script
I received a couple of requests, how to generate HTML pages from command line. Here is a simple example.
#!/bin/bash title="This is a title" # gather information from EC2 nodes via EC2 api tools cat << _EOF_ <html> <head> <title>$title</title> </head> <body> <h1>Parameter passed to shell script: $1</h1> </body> </html> _EOF_
Dein Job bei codecentric?
More articles in this subject area\n
Discover exciting further topics and let the codecentric world inspire you.