Currently planning on tackling a little project over the summer (if I’ll find enough time):
The idea is to have some selfhosted webpanel (perhaps even localhost) that let’s you schedule specific remote tasks while being highly efficient (price wise). E.g. I’d like to have it execute a certain task and (if necessary) for that very purpose spin up a vps of one of these hourly billed cloud providers and use it to fulfill said task and afterwards delete itself again. An example would be to spin up a vps, pull a backup from some ftp server using credentials I’d enter in the panel, encrypt it, do stuff with it and send it on a permanent storage server (or multiple) as the hourly billed instance will be deleted after the task is fulfilled. This is just one example
I believe in general it should be possible and a well documented API should make it even easier. Vultr, DO, Lunanode come to mind… Has anyone ever worked with their API? How was the workflow? Any other hosts you can suggest to that end?
I’m fairly certain that you could achieve this using Hetzner Cloud. I’ve worked with their API a fair amount (when experimenting with a dynamic kubernetes cluster for a Plex media server) and it’s fairly well documented.
I’ve yet to create a Hetzner account. I always kept avoiding them since the day I’d sign up that’d mean the end for my wallet haha But will consider it this time… Seems very viable. Totally forgot about Hetzner billing hourly, too. I still have that Netcup “hourly billing” nightmare where they wanted you to prepay the “hourly billed” vps for several days/weeks/months?!
DO’s API is good for this - I use DO API via packer.io for testing and building Centmin Mod LEMP droplet images for preparation for listing Centmin Mod on DigitalOcean’s 1-click App Marketplace - I run packer.io build scripts which talks to DO API to spin up a droplet, then install Centmin Mod LEMP stack and clean up the inside of droplet, i.e. logs,sshkeys etc then packer shuts down droplet, then builds a droplet image snapshot which I can then use to spin up droplets with Centmin Mod LEMP already preinstalled and/or eventually submit a golden image for DigitalOcean’s 1-click App Marketplace https://community.centminmod.com/threads/digitalocean-marketplace-for-1-click-applications.16835/
As it’s common practice for many organizations to spin up hourly billed machines as their convenience, just head over to Github and you’ll find plenty of code to communicate with either API. I’ve worked with most API’s I mentioned and can’t really complain about the documentation.