snap install doctl
https://cloud.digitalocean.com/account/api/tokens
doctl auth init
doctl compute droplet list
https://cloud.digitalocean.com/account/security
- Create a droplet
- Ubuntu 16.04
- 2GB / 1 CPU
- London region
- Add your ssh
- hostname snapcraftiobase
- Note IP of host
ssh root@IP
root@snapcraftiobase:~# adduser snapcraft
Adding user `snapcraft' ...
Adding new group `snapcraft' (1000) ...
Adding new user `snapcraft' (1000) with group `snapcraft' ...
Creating home directory `/home/snapcraft' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for snapcraft
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Note the password you use
usermod -aG sudo snapcraft
Delegates use ssh to connect to the server
apt install openssh-server
snap install snapcraft --classic
Optionally install multipass, if you don't, snapcraft will prompt
to install it on first time you run
snap install multipass --classic --beta
nano /etc/ssh/sshd_config
Set the following:
PasswordAuthentication yes
systemctl restart ssh
Back in the digital ocean web UI, take a snapshot of the VM
List them
doctl compute image list
Grab the ID number from the output (first column)
doctl compute ssh-key list
Grab FingerPrint from third column
Plug in IMAGE and SSHKEY from above
doctl compute droplet create ubuntuserver01 --size 2gb --image $IMAGE --region lon1 --ssh-keys $SSHKEY
for f in {01..10};
do
doctl compute droplet create ubuntuserver"$f" --size 2gb --image $IMAGE --region lon1 --ssh-keys $SSHKEY
done
doctl compute droplet list