Blog

Akamai CLI

Introducing Akamai CLI

June 19, 2017 by Kirsten Hunter

The Akamai CLI gives developers a completely new way to interact with their Akamai cloud delivery configurations. Akamai CLI is your toolkit for working with Akamai on the command line. It delivers a unified and extensible developer experience for anyone who needs to work with or automate Akamai.

We had a vision for what a command line experience should be like, and the Akamai CLI was modeled around. In short, we wanted to create a tool that will help you get your work done, quickly and easily.

 

The Philosophy

Throughout the development of Akamai CLI, we wanted to make sure that it was flexible enough to meet the needs of all use cases, while maintaining simplicity. We also wanted to bring consistency to a number of projects we are working on that feature command line tooling.

This consistency starts with akamai; every command is effectively namespaced through the top-level akamai command. As with many popular command line tools, such as docker, this is then followed by a command (e.g. help), which can then take arguments and other input to do actual work.

UNIX was built around the "do one thing well" philosophy, and while we're not quite as spartan as cat or ack, the architecture of Akamai CLI starts with a single simple command, akamai, that guides you through using the CLI itself, and installed commands, as well as manages the installation and upkeep of your toolkit.

The top-level akamai command has only four built-in commands:

  • help — you shouldn't need to read a book to get started, everything should be discoverable from the tool itself
  • list — show the currently installed command packages
  • get — install new commands packages from Git, fallback to pre-built binaries when possible
  • update — update a command package to the latest version

 

Extending Akamai CLI

Besides the four built-in commands listed above, all other commands are separate executables, which can be written in any language, so long as they follow our executable naming convention: akamai-command or akamaiCommand.

Additionally, like most package managers, Akamai CLI requires a metadata file to describe the package called cli.json, which allows you to add descriptive text, and specify runtime language requirements (e.g. that it requires Go 1.8).

Akamai CLI itself is written in Golang, and supports glide (Golang), pip (Python), composer (PHP), bundler (Ruby), npm, and yarn (Node.js) package managers.

There are two packages we are releasing alongside Akamai CLI: Akamai CLI for Property Manager and Akamai CLI Purge. Akamai CLI for Property Manager is written in Node.js, while Akamai CLI for Purge is also written in Golang.

 

Akamai CLI for Property Manager

The Property Manager API can do anything Property Manager in Luna can do, and as a result, it has an enormous collection of features which can be somewhat overwhelming for simple tasks like creating and updating a property. The Akamai CLI for Property Manager was built in response to our customers’ requests for a quicker, easier way to manage their property configurations.

Akamai CLI for Property Manager has the functionality you’d want and expect.

  • Create a new property
  • Update the configuration
  • Activate that property on Akamai’s Intelligent Platform EDGE
  • Delete the property when you’re done with it

Integrating this functionality into Continuous Integration or Continuous Deployment processes is easy, just create temporary properties as needed, like you would in other cloud environments. We’ve used the command line interface to add property creation, testing and deletion using Jenkins - and the same will hold true for the majority of DevOps toolsets out there.

We’re working on adding new functionality to the CLI for Property Manager all the time, and are eagerly awaiting any feedback you might have to help us make it even more useful.

 

Get Started

To get started with Akamai CLI, download the latest release from Github.

 

The Future of Akamai CLI

We’re very excited about the possibilities we are opening up with Akamai CLI, and you’ll continue to see new tools released in the near and not-so-near future. We're also looking forward to seeing what tools you create within this simple framework.

Akamai CLI is Open Source Software, and we want to work with our community to bring the best solutions to the command line. We believe many of the best ideas to help us create a world-class developer experience will come from the community. And this will mean a better experience for your customers as well!

What can you do to improve your DevOps toolchain or your Developer Experience when working with Akamai? What new possibilities does this bring to your end-users experience, when you can dynamically work with your Edge configuration on the fly? We can't wait to see!

NOTE: We recently introduced a new version of the CLI, Akamai CLI 1.0, so we encourage you to take a look.

Categories: