-
Add the ssh key to your DO account
-
You'll need to generate an access token in DigitalOcean's control panel
-
After add digitalocean API token in file
WARNING: Do not give the token to third parties and do not put it on github!
~/.do/access_token
It is necessary to fill in the values of variables in the file
./lib/data/static_data.rb
- PROJECT_NAME: [Optional] - If you want to add a droplet to the selected project
- LOADER_PATTERN: [Required] - Name pattern on your droplets
- DROPLET_REGION: [Required] - default: 'nyc3'
- DROPLET_IMAGE: [Required] - default: 'docker-20-04'
- DROPLET_SIZE: [Required] - default: 's-1vcpu-1gb'
- SSH_KEY_ID: [Required] - *Find this value after the Api request
To set the SSH_KEY_ID, you need to send a GET request.
Api documentation List All SSH Keys
Or you can use the script for a quick search
For Linux:
#!/bin/bash
DIGITALOCEAN_TOKEN=$(cat ~/.do/access_token)
# install jq util for linux
sudo apt update && sudo apt install jq
# install jq util for macOS
brew install jq
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/account/keys" \
| jq
In the output of the script copy the id value for your ssh and set the value in the file:
~/.do/ssh_key_id
./lib/bash_script/script.sh
bundle install
All rake commands
rake -T
rake create_droplets[container_count]
Where the [container_count] should contain the number [integer] of droplets to open.
rake launch[7.0.0.0]