How-To: Integrating Akamai Into Your CI/CD Environment with Jenkins

July 7, 2017 · by Kirsten Hunter ·

We’re really excited about all the new functionality we’re creating for Akamai for DevOps, especially Akamai CLI. One reason we’re so pumped about this is that it enables you to integrate your property management into an existing continuous integration or continuous deployment pipeline and help you adopt DevOps in your organization.

Using Jenkins or a similar continuous integration/continuous deployment (CI/CD) tool, you can manage your configuration as code and deploy it like any other target in the system. In this model, you would keep your configurations in Git or another SCM. Let’s take a look at how that would work.

Let’s assume two branches; a development branch and a production branch. When you’re ready to commit, you push the changes into the development branch in your repository. At this point, Jenkins can start a process to move the code through the whole lifecycle and create a test property:

  • Create -  ‘akamai property create’
  • Update -  ‘akamai property update --file rules.json’
  • Activate on Staging - ‘akamai property activate --network staging’

As with any activation, this will take around 5 minutes, but the CLI will continue to poll until the activation is done.

Once this is complete, you can go straight to the test property which was just created, perform the testing, and then use the CLI to finish off the property:

  • Deactivate - ‘akamai property deactivate --network staging’
  • Delete - ‘akamai property delete’

Once your testing on staging has been done, you can push it to production. Merge the changes from your development branch to the production branch and commit. Again, Jenkins picks up the changes and deploys the configuration to production:

  • Create - ‘akamai property create’
  • Update - ‘akamai property update --file rules.json’
  • Activate on Production - ‘akamai property activate --network production’

It’s straightforward to set up this type of integration in Jenkins, and you can use Jenkins to test other parts of the pipeline. You can copy configurations from one property to another, modify metadata about the property such as hostnames and origin, and retrieve the rules to verify that they match a specific template.

This type of integration is just one of the ways the CLI makes it easier for you to integrate your Akamai property management into your own systems, and we’ll continue to provide even more examples going forward, to inspire you and help you get even more out of your Akamai properties.

Kirsten Hunter is a developer evangelist at Akamai Technologies.