notes icon indicating copy to clipboard operation
notes copied to clipboard

Openstack (e.g. DreamCompute)

Open jph00 opened this issue 5 years ago • 0 comments

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

jph00 avatar Sep 19 '20 11:09 jph00