Login into the Vultr Data Portal.
Click on your username and select API/Enable API
. Copy the API Key
somewhere. And in the Access Control section Add Any IPv4
as allowed subnets.
Remember to disable the API when finished and to remove subnets too
Generate an ssh key:
if [ ! -f ~/.ssh/id_nsdf ] ; then
ssh-keygen -t rsa -f ~/.ssh/id_nsdf -N ""
fi
Go to the Vulr Manage SSH keys and add your id_nsdf.pub
key:
-
Name:
id_nsdf
-
Content: copy the id_nsdf.pub content here
Add one item to your ~/.nsdf/vault/vault.yml
file (change values as needed; for example you may need to change the api-key
):
ec2-vultr:
class: VultrEc2
api-key: XXXXX
num: 1
VPSPLANID: 201 # this plan is '1024 MB RAM,25 GB SSD,1.00 TB BW'
OSID: 387 # this is Ubuntu 20.04 x64
region: New Jersey
ssh-username: root
ssh-key-filename: ~/.ssh/id_nsdf
ssh-key-name: id_nsdf
Create new nodes`:
alias nsdf-cloud="python3 -m nsdf-cloud"
ACCOUNT=ec2-vultr
nsdf-cloud $ACCOUNT create nodes test1 --num 1
List of nodes:
nsdf-cloud $ACCOUNT get nodes test1
Delete nodes:
nsdf-cloud $ACCOUNT delete nodes test1
Other useful commands:
# if you want to change the VM (i.e. VPSPLANID)
nsdf-cloud $ACCOUNT get plans
# if you want to change the OS
nsdf-cloud $ACCOUNT get os
# if you want to change the region
nsdf-cloud $ACCOUNT get regions