notes
notes copied to clipboard
Openstack (e.g. DreamCompute)
Install
pip install python-openstackclient
Show setup info
openstack flavor list
openstack image list --status active
openstack keypair list
Dreamhost flavors
| ID | Name | RAM |
|---|---|---|
| 50 | gp1.semisonic | 512 |
| 100 | gp1.subsonic | 1024 |
| 200 | gp1.supersonic | 2048 |
| 300 | gp1.lightspeed | 4096 |
| 400 | gp1.warpspeed | 8192 |
| 500 | gp1.hyperspeed | 16384 |
Import ssh key
openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
Create instance
openstack server create --flavor gp1.semisonic --image Ubuntu-20.04 --key-name mykey myinstance
# Get IP address
IP=$(openstack server show -c addresses -f value myinstance | cut -f 2 -d ' ')
# Connect
ssh ubuntu@$IP
Reboot
openstack server reboot myinstance