Below is a workflow I put together to have the Workflow app check the status of specific Digital Ocean droplet.
Why would I need to do this? Occasionally I build Tensforflow models. With a 2GB RAM instance, I can do some data validation and tests on a small amount of data. When I need to do full throttle testing and training, I need to resize the droplet to a 16GB RAM droplet. Usually, I’ll kickoff the resize walking to my car on the way home. Then I start the test and train steps when I get home. When done, I shrink it all back. There are five workflows for this cycle:
- See if specified droplet is active (this post)
- Power off specified droplet (future post)
- Power on specified droplet (future post)
- Resize droplet to 16GM RAM size (future post)
- Resize droplet to 2GB RAM size (future post)
A few caveats. First, I’m not sharing this through the official Workflow gallery simply because it could be improved significantly, but it does what I need it to do well enough. Second, I prefer to build workflows that do one task and just one task. It’s a Unix thing (ignoring the ‘well’ part, though).
Some familiarity of creating workflows will help fol Step 1: Create a new ‘Today Widget’ workflow.
Step 3: Get your droplet id. The easiest way would be to pull it from the dashboard when looking at your droplet. So go on your dashboard, click on the droplet, look at the URL. It should be something like https://cloud.digitalocean.com/droplets/
Step 4: Add the fields and set the variables as shown above.
- Note: Set the URL variable to https://api.digitaloc Step 5: Continue adding fields and setting variables as shown in th
Step 6: Continue adding fields and setting variables.
What you see when you run with workflow from the “Today Widget”