CircleCI+DeployHub.png

“But, we already use scripts for deployments.”

We hear that a lot. So let’s explain why you would choose an automation tool over scripts. The main arguments are packaging and versioning. DeployHub uses an application to package together components. Applications and components have versions. Because of DeployHub’s versioning capability, you can do incremental deployments, moving away from the old-style monolithic approach. If you are just updating a .jar or .war file, you can always just copy the new file over. We agree. A script can do that, but an application is more than just a binary, and a deployment is more than just a copy. With DeployHub you can include in your package as a deployment:

  • Database updates
  • Environment variables
  • Binaries
  • Microservices
  • Infrastructure changes

And unlike a simple copy, your full stack deployment package can be rolled forward, rolled back, or it could even jump versions. So when production is 5 versions behind and you want it up to the most recent release, DeployHub does that incrementally (including the database updates), reducing the time and risk associated to the release. DeployHub’s reports show what has changed providing an audit trail that makes even the grumpiest production control team happy.

The DeployHub deployment orb

DeployHub integrates with CircleCI to provide 100% repeatable continuous deployments across the entire CircleCI pipeline. Using the CircleCI DeployHub orb will allow you to drive continuous deployments, with DeployHub doing the heavy lifting, without custom, one-off deployment scripts. DeployHub matures your CircleCI pipeline to break down the wall to production updates. DeployHub provides reports and insights for individuals on the production control side of the house. This transparency gives the production control teams what they need to accept faster, more iterative software updates. Instead of having deployment scripts for each state in your pipeline, the DeployHub CircleCI deployment orb creates a release process that includes cataloging, publishing, packaging, and deploying software updates in an agile, ‘iterative’ basis. You no longer need to perform monolithic releases, (the norm for scripted solutions) or manage different scripts for different versions and environments.

And if you are thinking that this will break the budget in terms of cost, let me stop you there. DeployHub is an open source solution, hosted for free by DeployHub, Inc. You can start with a single project and begin learning how much faster you can move when you fully automate (dump the scripts) software deployments.

Site reliability and microservices

As we move into microservices and site reliability, the concepts of monolithic releases will go away. We will instead welcome a new era of software development that focuses on small changes, microservices, instead of a complete application. For this reason, DeployHub allows you to catalog, publish, and share microservices across a domain driven design. With DeployHub, you can start deploying your updates incrementally, and begin seeing your software updates as changes to individual components. DeployHub will always show you what your monolithic equivalent looks like, but your releases will finally be agile.

DeployHub tasks and the DeployHub deployment orb

The DeployHub deployment orb calls DeployHub to perform:

  • ApproveJob - Allows CircleCI to call DeployHub’s approval process to approve an application version to be moved to the next stage of the pipeline. The approval occurs as the UserID is passed from CircleCI to DeployHub. Depending on your DeployHub configuration, you may need to call the ApproveJob. This would happen if an approval gate is defined in DeployHub. CircleCI will pass the application version and the Move task to DeployHub.
  • MoveJob - Executes the DeployHub Move task which promotes or demotes an application version to a different pipeline state.
  • DeployJob - Deploys an application version to a specific environment. CircleCI will pass the application version name and environment to DeployHub.

Note: A future release will include the ability to automatically update a component version to initiate a new application version.

You do not need to use the ApproveJob or MoveJob tasks. The use of these tasks is determined by how you define DeployHub. DeployHub has an Approval process as well as a Move process that tracks where an application version is in the pipeline. You would generally perform a Move and then a Deploy. The DeployJob is the main DeployHub task that needs to be called.

Installing the DeployHub deployment orb

To start using the DeployHub deployment orb, you will need to create a .circleci/config.yml file to define your workflow to CircleCI for that project. That workflow will define calls to the DeployHub jobs and define the variables such as Application Version, Environment, UserID, and Password that will be passed to the DeployHub CircleCI orb.

orbs:
  deployhub-orb: deployhub/deployhub-orb@dev:1.0.0
  
workflows:
  btd:
    jobs:
      - deployhub-orb/approvejob:
          userid: admin
          password: admin
          serverurl: http://exchange.openmakesoftware.com:8080
          application: Uptime War for Tomcat;12
      - deployhub-orb/movejob:
          requires:
            - deployhub-orb/approvejob
          userid: admin
          password: admin
          serverurl: http://exchange.openmakesoftware.com:8080
          application: Uptime War for Tomcat;12
          from_domain: GLOBAL.My Pipeline.Development
          move_task: Move to Integration
      - deployhub-orb/deployjob:
          requires:
            - deployhub-orb/movejob
          userid: admin
          password: admin
          serverurl: http://exchange.openmakesoftware.com:8080
          application: Uptime War for Tomcat;12
          environment: GLOBAL.My Pipeline.Integration.IT Guys Int

For a full description, go to the CircleCI orb registry.

Two-way communication and shared logging

DeployHub and CircleCI have a two-way logging communication. The DeployHub deployment orb includes the ability for all logs about software deployments to be reported in both solutions. CircleCI can report to DeployHub when deployments are ready to be executed, with DeployHub reporting back the status of the deployment. For most users, CircleCI remains their primary location to find results and logs.

CircleCI dashboard

Image 1: Job executions for the workflow
Image 2: Deployment execution results

Continuous feedback loop

On the production side of the equation, operations teams use DeployHub to manage environments and view reports. These reports include a full continuous feedback loop that shows the full ‘Value Stream’ starting at your Build job and showing what application components were updated and to what end targets they were deployed.

Image 3: Feedback loop showing build to endpoint

Full application release automation

Anyone exploring the use of tools such as Xebia XLDeploy, Harness, or IBM UDeploy should take a close look at using DeployHub Team or Pro. DeployHub provides full application release automation functionality, without the use of agents or the high cost. DeployHub Team and Pro are available as a SaaS or on Premise. You can sign-up for or download DeployHub Team at www.DeployHub.com.

And if you want to participate in the open source project, you can sign-up at www.deployhubproject.io.

If you want to learn more, be sure to register for a special DeployHub + CircleCI webinar on March 27th.


Tracy Ragan, CEO & Co-founder of DeployHub, leads her team with a focus on the future of software deployments specific to the needs of microservices and Kubernetes. Tracy speaks at DevOps conference 2 to 3 times per year and is a blog contributor at DevOps.com and ITChronicles.com. She was recently recognized as a Women In Technology (WIT) Honoree for her work in the DevOps area.