DigitalOcean is one of the leading cloud development platforms offering a variety of services. From Droplets to managing Kubernetes clusters. Despite having a very intuitive web-based control panel, many still prefer interacting with DigitalOcean API through a command line interface.
This week Buddy introduces doctl, an official DigitalOcean CLI granting users access to most DO features directly from the terminal. Doctl allows you to define your DO workflow with shell scripts which greatly improve the automation, and Buddy is all about that.
How it works?
The premise is fairly straightforward. Upon adding the action and selecting your integration, you can define run commands that will perform operations on your DigitalOcean account.
If you are not sure how to interact with your DigitalOcean API through the CLI, we'd recommend checking out DO's official guide
For example, you can use this action to create an entirely new Droplet with specified image and resources directly from Buddy:
With this new addition to our DigitalOcean roster, you can now completely automate your DO workflow without the need of web-based admin panel configuration. Let's say you want to create a new Droplet to which you will deploy your app, test it and then remove the Droplet. It now can all be done within a single Buddy pipeline.
To achieve that, we will use the following actions:
- DigitalOcean CLI - to create and kill the droplet
- DigitalOcean Droplet- to deploy our app
- Ghost Inspector- to perform integration tests
- Visual Tests- to check our UI
This is a simple example of a quick test pipeline to show one of many possibilities of interacting with your DigitalOcean account. This CLI gives you access to a wide variety of operations from Droplet creation to Kubernetes cluster management and Block Storage Volume inspection, go ahead and give it a try!