DigitalOcean has recently launched doctl, a Command Line Interface (CLI) for managing DigitalOcean Droplets. This follows the popularity of similar such tools created by third parties based on the DigitalOcean API.
For those unfamiliar with DigitalOcean, it is a Cloud Hosting service built specifically for developers. One significant difference from other Cloud Providers is that they do NOT offer any support whatsoever, but they do have a very comprehensive and detailed community resources, including some excellent tutorials detailing how to do both simple and complex server tasks. The upside of this is that the cost of their service is very competitive for the features (SSD storage, generous RAM, and bandwidth, etc.)
They have for a long time been highly regarded for their web based command center, that makes configuring cloud servers incredibly simple, which, coupled with their one-click installs of popular Linux Distributions and Application Packages, make them a powerful player in the Cloud Space.
Following up the intuitive web interface, they built a powerful API, which left Beta in April 2015, and was accompanied by a great developer portal which provides detailed information on all the different API features, including examples and guides.
DigitalOcean has followed up the API with its new Command Line Interface tool, which they have named “doctl.” doctl is fully integrated with the latest version of the API (v2) and provides support for newer features such as Floating IPs.
You can download doctl on GitHub. It is available as a precompiled binary for Linux, Mac OS X, and Windows.
Getting started with doctl is extremely easy. Firstly you will need to retrieve your DigitalOcean access token and save it locally:
doctl auth login
This command will open a new browser, where you will be sent to digitalocean.com to log in and authorize the doctl application to both read and write to your account. Once logged in, you will be presented with the option to “Authorize Application”.
After completing the authorization you should see the following in your terminal:
Output updated access token[/wwpsm_codebox Once connected, you can review your account settings by typing the following:
doctl account get
The initial announcement post has some examples demonstrating the power of the new CLI, but as an example, we shall duplicate one of their examples below. This one line command, for example, can create a Debian 8 Droplet in NYC1 with a public SSH key installed for the root user:
doctl compute droplet create webserver01 --region nyc1 --image debian-8-x64 --size 4gb --ssh-keys 1234 --wait
A more detailed tutorial on the new CLI can be found here.
DigitalOcean has sparked considerable interest for us, as we will be moving to this platform in a couple of months to coincide with our new website launch. Our new website will be based on Django, and as a result needs a more custom environment; something that is easy to set up with DigitalOcean.
DigitalOcean was particularly recommended by our developers, as they spent much of 2015 optimizing their workflows to use Fabris and Ansible to automate the deployment process of Django-based websites.
Daniel Samuels, Lead Developer at Onespacemedia, commented:
With the improvements to both the project template and the server management tools, we were able to go from having no project files at all, to having a fully hosted CMS within 10-15 minutes.
We couldn’t argue with that. We also wouldn’t be surprised if they don’t make full use of the new CLI.