Interactive cloud provider tool. Currently allows you to create a droplet on DigitalOcean, delete a droplet and list your droplets.
I built this as a way to learn Go and have a quick way to make a server without having to go to digitalocean.com
- DigitalOcean
brew install Midnight-Conqueror/tap/cogo
Find the latest release in releases for your machines architecture, download and run either from within the directory ./cogo
or by moving it into the /usr/local/bin
to be accessed from anywhere.
$HOME/.cogo
$HOME/.config/.cogo
./.cogo
Cogo will look for a file called .cogo
. The file needs to be of json
format.
Current supported config locations are $HOME/
, $HOME/.config/
and ./
See the sample_config.json
file as a basis.
It isn't necessary to add the config as cogo will ask you for tokens without a config
Create will run you through creating a droplet on your given cloud provider. Currently the process is:
- Chose your provider
- Enter a name
- Chose an image
- Chose a region
- Chose a size
- Chose an ssh key
- Are you sure (y/n)
Finally you will be told the droplet has been created. You can then list your servers from that provider once you think its been created / assigned an IP.
cogo create
list will list servers created on that provider printing the name and IP
cogo list
Your droplets:
0 Name: blog
IP: xxx.xxx.xxx.xxx
1 Name: backend
IP: xxx.xxx.xxx.xxx
2 Name: frontend
IP: xxx.xxx.xxx.xxx
Destroy will allow you to delete one of your servers Safely there will be a total of three checks to make sure you understand what you are deleting.
- Chose the provider you wish to delete from
- There will be an 'are you sure (y/n)' question
- You will need to enter the name of the server you are deleting
- You will then have to answer another 'are you really really sure (y\n)' question with details of the server you are about to delete
cogo destroy
This project requires Go to be installed.
Running it then should be as simple as cloning the repository then:
$ make build
$ ./bin/cogo
make test
If you've read this far you're probably the right person to add to this project
Please read the contributing guide on how to get started
I am still learning Go at the moment so don't feel like you need to be a wizard to contribute