DevOps ToolsEveryone loves a great tool, whether you are doing a home repair project or designing a new application. Today, there is an abundance of tools to choose from to help you develop, test and deploy faster in the cloud.

For this month’s blog post I decided to break out some of the core patterns in DevOps that we must all follow, from the design and build of code, its testing, production roll-out and ongoing maintenance. Below, I share some of my favorite tools with you for each of those phases.

Codebase Versioning

Versioning of code is essential to produce anything in groups, which is now how all code is created and most teams work. In just a few short years, GitHub has become the dominant market leader in work storage. Its SaaS platform, attractive pricing and social aspects have made it a great choice for any project. If you’re a dotNET developer, Microsoft’s tools don’t exactly work well with GitHub, but there are several hosters that offer a SaaS offering of Team Foundation Server (like DiscountASP.NET), with similarly attractive pricing.

Dependencies and Configuration

When creating an application with many dependencies, it’s important to deploy with the right configuration settings each time. This job is made easy by using Chef or Puppet when deploying the code, but it’s made even easier with additional services that allow dynamic lookup of values. Even though code is easily modified, one misplaced value can cause an entire deployment to fail. It’s a good idea to store dynamically assigned data (such as key/value pairs or database passwords) in a tool that allows your application to dynamically assign it any time (even outside of initial deployment). Puppet’s Hiera is a great add-on to perform this if you’re already using Puppet to configure your applications. If you’re using a different configuration management tool (or something more homegrown), integrating it with something like Conjur would provide this functionality, plus Conjur secures the data and provides an audit trail of which applications accessed the data and when.

Release Feature Switches and Backing Services

A release feature switch is a configurable item in an application that allows the administrator to activate or deactivate functionality in the application at will. Designing your application to use switches serves two key functions:

  • It allows you to disable features in a customer-available version. This is important because even though you may follow agile processes in QA, deciding to roll-over a feature that is not working correctly or doesn’t deliver the intended value is possible with switches.
  • It allows you to loosely couple pieces of the application together so that you can create different monetization strategies for them or turn off problematic features later on for customers who do not use them (and thus, should not be wasting support resources on errors for functionality that they don’t use).

You can make this easier at development time by choosing a development framework like Node.js to help you implement this pattern, or you can simply incorporate the approach into your development methodology right from the start.

A backing service is any service an app consumes over the network as part of its normal operation. This could include connections to related applications and database servers. It’s critical that all of these services be easily swapped from one to another – so if you swap your MySQL database for Oracle later on, you can simply swap the service, push the new configuration, and you’re on your way. Containers like Docker promise to make this even easier in the future by allowing easy deployment and removal of containerized portions of your applications.

Build, Release and Run

This step brings the entire process together, and it’s important to deploy quickly, and have assurance that you are deploying the correct underlying infrastructure with your application. Most teams would like to automate deployments 100% if possible, so they can deploy more frequently, and with more parity (see below). This is an impossible task if left up to the developers alone – each must take time to learn how each cloud’s API works, and write the configuration files to deploy. Ostrato cloudSM allows you to create a Composite, which is a grouping of services across your choice of Amazon, Azure, VMware and Openstack to deploy your infrastructure alongside your code. It exposes all options as simple configuration items, so even junior developers can customize their deployments, even if they have no experience in one or more of these cloud environments. And without a complete API, no deployment can be fully automated. So I recommend cloudSM as the automated deployer of choice upon code build.

Dev/Prod Parity and Disposability

Dev/Prod parity means that the underlying infrastructure platform is as similar as possible during development, testing and production. This is important because last-minute switches from lightweight application servers (nginx, mysql) to the servers your application requires (Apache, Oracle) inevitably cause problems that must be reworked in the application. This causes backwards work, where development could have simply used the correct “standard stacks” to begin with.

Vagrant, VirtualBox and other desktop virtualization environments give developers a free way to keep their development environments organized, but this only works if you can develop your entire portion on a laptop.

If you have a very large team working on a very large application, then deploying the standard development stacks for your application in the cloud, and developing on those, will definitely save time on deployment once the application passes through to integration testing. cloudSM brokers IaaS resources in many different clouds, and is easy enough for any junior developer to use. It has a powerful API that can be connected to any developer tools of your choice. It allows developers to move beyond the capabilities of their laptops, to save time during the final stages of deployment.

Disposable means that applications should experience a graceful shutdown. You should target your application components to cloud services that are quick to spin up, fast to shut down, and respond to OS signaling to shutdown gracefully. This is important because the application processes should respond to direction from an overarching cloud governor. That governor is going to have out-of-the-box control over those cloud resources, and you should expect it have the intelligence to deploy, start and stop services based on policies. Your applications should anticipate the OS signals for startup, shutdown, and be resilient to underlying virtual machine changes (or failures).

Unit Testing and Integration Testing

It’s important to create unit tests at the time of code creation, although let’s face it, next to documentation, this is the part of code creation that no one likes to do. So I’m going to mention some easy tools to facilitate testing (since we all hate this part). The reason to choose Ruby as your development platform is that the Ruby community has testing ingrained in its culture, and writing rspec tests are simple and easy. Choose a language that allows your tests to be easy to write, and easy to run by your Continuous Delivery Orchestrator (see below).

Also, there are lots of tools to test code, but not that many to assert that your infrastructure is configured properly after deployment, which is equally important. Chef’s test-kitchen allows an easy way to set up unit tests for all of your infrastructure, and it is simple to get up and running.

Continuous Delivery Orchestration

Continuous Delivery allows for fast deployment, with the correct checks and balances, but it’s a complex process that really requires a central tool to orchestrate. Jenkins is a free tool that allows you to orchestrate each deployment, and reports on deployments overall so you can see your team’s improvement. CloudBees is a commercial, SaaS offering of Jenkins (if you’d like to avoid the installation part). If you’re a Microsoft developer, again, you might be out of luck, but Team Foundation Server offers some similar functionality, and you can host it at a service provider like DiscountASP.NET.

Logs and Metrics

Good logging is critical to any application once it’s deployed into production, and logfiles are the primary method you’ll use to support your customers. So choosing to log at various, appropriate levels and using prebuilt logging standards (log4j for Java is a great example) at the beginning is the gift that keeps on giving.

Splunk is the most trusted platform in log analysis, and it’s free up to 500GB of analyzed logs per day. However, its extreme power (and the fact that it turns off when the limit is reached) might leave you hanging. There are plenty of alternatives out there that are free and open source, like Logstash, among others. Using a good analyzer from the start will help you find problems quickly and provide an easy way to support your customers once your changes are rolled out.

Metrics are necessary to determine the usage of your application and to prioritize new fixes in the upcoming sprints. Dashing is an open source, free tool to create beautiful dashboards, although it’s really only designed to surface the current conditions of your application, and the monitors are all DIY. Still, it’s one of the simplest and most beautiful tools out there. If you’re looking to warehouse this data for trending or quickly add monitors for common user actions, NewRelic offers premade gems and libraries to insert right into your code, and has many pre-made dashboards.

API Admin Processes

APIs are critical to expose the correct mechanisms to interface with your data. Authentication and access permissions to certain parts of your data are critical, but can add a lengthy step to your deployment process (or you may find out down the road that customers need access to more parts of your application than previously anticipated).

If you need to expose a service that doesn’t have an API front-end already created for it, StrongLoop provides an easy framework to get a REST API up and running, with a self-documenting web interface. It connects to a regular data source (a mysql database, for example) and allows you to create an API in minutes.

Tools to help you administrate your application are vital – if a customer has a problem, they’re not going to pick up the phone and tell you – they’ll simply move on to your competitor’s product. And developers need safe administrative access to dev resources that are not located on their laptops. cloudSM provides role-based access control and permissions to grant developers the ability to start, stop, park and terminate only their owned resources, even in shared cloud computing accounts. And it helps them find unattached volumes and wasted resources to conserve budget. It also provides uniform GUI and API access to all their resources, even private infrastructure like VMware (where previously they would have to open a ticket). This allows them to continue developing quickly.