So far in this series, you've learned:
- How DevOps and Continuous Delivery are flattening the release process
- How you can describe your infrastructure in code by using tools like Chef or Puppet
- How you can write tests for your infrastructure and deployments
- How to ensure that your infrastructure is resilient with tools like the Chaos Monkey
- How to create a Continuous Delivery platform
- How to version all software system assets
And because the organizational aspects of DevOps are just as important as the technical ones, I've also prescribed ways to break down traditional development and operations silos to enhance teamwork and communication.
When your whole software system is described in code and committed to a version-control repository, changes occur frequently, creating a crucial need for accurate real-time feedback for everyone on your team or in your organization. In this last article in the Agile DevOps series, you'll learn how you can tie all of this feedback together and present it in an easy-to-digest form through a DevOps dashboard. All cross-functional team members in your organization can use the dashboard to learn the status of the system under development and in production. They can then make informed decisions that are based on reality — rather than on the perceptions of the more vocal team members.
CanaryBoard is an open source tool that's modeled on the Stashboard open source tool (which is based on tools from large cloud providers). CanaryBoard is intended to provide a log of the status of applications or services by project, but you can customize it to show whatever you choose. And you can run CanaryBoard by using purely open source platforms.
Figure 1 shows a dashboard that I customized to show the status of some DevOps indicators (Environment, Build, Test, and Deploy) for a project. By running scripts when every code check-in occurs, I can update the dashboard automatically to provide a real-time status for each indicator.
Figure 1. DevOps dashboard status using CanaryBoard
You can customize your CanaryBoard dashboard to show anything that's important for your team or organization. You can also create multiple dashboards to reflect various levels within your organization. Many other dashboard platforms are available that integrate with other tools that you might already be using; some dashboard platforms are free and open source, and others require monthly fees. As a developer, I like to have full control not only of customization, but also of the platforms that the software can run on. That's why my company created CanaryBoard.
Setting up the DevOps dashboard
To get the CanaryBoard tool up and running on a Linux® instance, launch and access a compute instance, install the required packages, download and configure files, and run CanaryBoard.
Step 1: Download and launch the server
Download Ubuntu 12.04 LTS server (see Resources for a link to the download page). Then launch your Ubuntu instance.
Step 2: Install packages
ssh into the server and run the commands that are described in the Installing Rails on Ubuntu 12.04 LTS section of the CanaryBoard readme at https://github.com/stelligent/canaryboard/ (see Resources). By running the commands, you'll install all necessary packages, including the Ruby Version Manager (RVM), Ruby, Git, and Rails. (If you're using a packaging system other than
apt-get — such as
rpm — modify the commands accordingly.)
Now that you've installed all of the packages, you're ready to install, configure, and run CanaryBoard.
Step 3: Install, configure, and run CanaryBoard
CanaryBoard is a Rails application and RESTful API that was developed by Stelligent and that's hosted on GitHub. You need to follow a few simple steps to get the application up and running. The steps include getting the latest copy from the Git repository, installing any Ruby gems that CanaryBoard requires, setting up and seeding the database, running automated tests, and starting the Rails server. You'll find the exact steps to follow in the Installing CanaryBoard section of the CanaryBoard readme (see Resources).
Launch the website for your CanaryBoard application by typing
http://localhost:3000 in your browser. (If necessary, change
localhost to your server location.) Be sure that port 3000 is available.
You should see an empty status board like the one in Figure 2:
Figure 2. Blank dashboard ready to be configured
Click the Log in link to display a login screen similar to Figure 3:
Figure 3. CanaryBoard login screen
Enter the default username (
admin) and default password (
admin). After logging in, click the Profile link, then click Edit to change your password to something other than the default.
To run this article's example code, you need to get the API Key that's set as part of the data seeding. Go back to your profile (http://localhost:3000/profile) and copy the API Key value. Figure 4 shows an example of the profile screen with an API Key:
Figure 4. User profile used to get API Key
Programmatically updating the DevOps dashboard
You'll use two customizable Ruby scripts — set-indicators.rb and update-indicators.rb — to create the dashboard's indicators through the CanaryBoard REST API.
Begin at the Linux server command prompt and create a new Ruby file called set-indicators.rb. Go to the set-indicators.rb file that's available through a hyperlink in the Using CanaryBoard section of the CanaryBoard readme (see Resources), and paste its contents into the set-indicators.rb file that you just created. If you're not running your server on localhost, replace the
localhost part of the
API_URL variable's value with your server's location. Change the
API_KEY value from
changeme to the value that you got from the CanaryBoard profile page. You'll run the set-indicators.rb script later.
Now, from the Linux server's command line, create a new Ruby file called update-indicators.rb. Go to the update-indicators.rb file that's available through a hyperlink in the Using CanaryBoard section of the CanaryBoard readme (see Resources), and paste its contents into the update-indicators.rb file that you just created. If you're not running your server on localhost, replace the
localhost part of the
API_URL variable's value with your server's location. Change the
API_KEY value from
changeme to the value that you got from the CanaryBoard profile page.
Run the Ruby programs by using these commands (which assume that your set-indicators.rb and update-indicators.rb files are in the home directory on your instance):
sudo ruby ~/set-indicators.rb sudo ruby ~/update-indicators.rb
In your browser, go to https://localhost:3000/ (or equivalent) to see the results of the services and events that you created. When the code in update-indicators.rb runs, it updates all of the events for the services that are listed in the script. By clicking on any indicator in the dashboard, you can see a history of these events. If you want this script to run with every code check-in, you can call it from your Continuous Integration server or run it through
cron or another scheduling system. Figure 5 shows example results for the Deploy service:
Figure 5. Event log for the Deploy service indicator
The set-indicators.rb and update-indicators.rb scripts are hard-coded for specific services, but you can make all of the code dynamic.
In this article, the last in the Agile DevOps series, you learned how to use the open source CanaryBoard tool to provide continuous feedback to all team members across development and operations. Many system- and application-monitoring tools provide a plethora of rich information that you can incorporate into DevOps dashboards to help engineers and others make more-informed decisions.
It's been a tremendous adventure sharing my experiences with you over the past several months. My goal with this series has been to show how and why to learn the best approaches and practices from teams and cultures that traditionally are completely different: development and operations. I encourage you to view software as holistic, integrated systems — not as something that gets "thrown over the wall" to another team in your organization.
- CanaryBoard readme: Go to this page for commands and scripts that you need for following this article's steps.
- "Automation for the people: Continuous feedback": (Paul Duvall, IBM developerWorks, November 2006): Receive immediate feedback with every source code change.
- CanaryBoard REST API examples: Ruby examples that access the CanaryBoard REST API.
- developerWorks Agile transformation helps you and your organization build a foundation on agile development principles.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools as well as IT industry trends.
- Follow developerWorks on Twitter.
- Watch developerWorks on-demand demos ranging from product installation and setup demos for beginners, to advanced functionality for experienced developers.
Get products and technologies
- CanaryBoard: CanaryBoard is an open source tool for displaying a software system's status by project/service and date.
- Ubuntu: Download version 12.04.2 LTS of Ubuntu.
- IBM Tivoli Provisioning Manager: Tivoli® Provisioning Manager enables a dynamic infrastructure by automating the management of physical servers, virtual servers, software, storage, and networks.
- IBM Tivoli System Automation for Multiplatforms: Tivoli System Automation for Multiplatforms provides high availability and automation for enterprise-wide applications and IT services.
- Evaluate IBM products in the way that suits you best: Download a product trial, try a product online, use a product in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement Service Oriented Architecture efficiently.
- Get involved in the developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.
- The developerWorks Agile transformation community provides news, discussions, and training to help you and your organization build a foundation on agile development principles.
Dig deeper into developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.