Contents


Build a DevOps dashboard

Display real-time information for cross-functional teams

Comments

Content series:

This content is part # of # in the series: Agile DevOps

Stay tuned for additional content in this series.

This content is part of the series:Agile DevOps

Stay tuned for additional content in this series.

So far in this series, you've learned:

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.

Introducing CanaryBoard

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
Screen capture of a dashboard using the open-source CanaryBoard framework. The dashboard shows four DevOps indicators: Environment, Build, Test. and Deploy. The left-most column provides the most current state of these DevOps indicators.
Screen capture of a dashboard using the open-source CanaryBoard framework. The dashboard shows four DevOps indicators: Environment, Build, Test. and Deploy. The left-most column provides the most current state of these DevOps indicators.

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 Related topics 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 Related topics). 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 yum or 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 Related topics).

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
Screen capture of an empty dashboard created with the CanaryBoard framework
Screen capture of an empty dashboard created with the CanaryBoard framework

Click the Log in link to display a login screen similar to Figure 3:

Figure 3. CanaryBoard login screen
Login screen for the CanaryBoard Rails application.
Login screen for the CanaryBoard Rails application.

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
Screen capture of the CanaryBoard user profile page that displays the 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 Related topics), 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 Related topics), 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
Screen capture of a CanaryBoard page that shows a history of the events logged for the Deploy indicator. Each row contains a date- and time-stamped description of a event that's related to deployment.
Screen capture of a CanaryBoard page that shows a history of the events logged for the Deploy indicator. Each row contains a date- and time-stamped description of a event that's related to deployment.

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 conclusion

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.


Downloadable resources


Related topics

  • 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.
  • 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.

Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=DevOps, Open source
ArticleID=937083
ArticleTitle=Agile DevOps: Build a DevOps dashboard
publish-date=08082013