These are examples used during the demonstration
$ source ~/.stack/trystack # https://trystack.org
$ source ~/.stack/city-la1 # https://citycloud.com (Los Angeles)
$ source ~/.stack/city-lon1 # https://citycloud.com (London)
$ source ~/.stack/city-fra1 # https://citycloud.com (Frankfurt)
$ source ~/.stack/dream # https://dreamcompute.com
$ source ~/.stack/ustack # https://unitedstack.com
They can also be used from clouds.yaml
using --os-cloud <identifier>
.
$ openstack project list
$ openstack user list
$ openstack role list
$ openstack user create <username> --project <project> --password <password>
$ openstack role add --user <username> --project <project> <role>
$ openstack keypair create mykey > mykey.pem
$ openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
$ openstack image list
# openstack image create <name> --disk-format <dformat> --container-format <cformat> --file <file> --property os_distro=<||>
$ openstack flavor list
$ openstack server list
$ openstack server create <name> --flavor <flavor> --image <image> --key-name <key-name>
$ openstack server reboot <name>
$ openstack server delete <name>
$ openstack volume create <volume-name> --size <size>
$ openstack volume create <volume-name> --image <image> --size <size>
$ openstack server add volume <server-name> <volume-name>
$ openstack network list
$ openstack network show <network>
$ openstack network create [--prefix prefix] [--enable | --disable] [--share | --no-share] <name>
$ wget -q http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 -O /tmp/centos7.qcow2
$ qemu-img convert /tmp/centos7.qcow2 /tmp/centos7.raw
$ #openstack image create --disk-format qcow2 --file /tmp/centos7.qcow2 centos7
$ openstack image create --disk-format raw --container-format bare --file /tmp/centos7.raw centos7
$ net_id=$(openstack network list -f value |awk '{print $1}')
$ openstack server create --flavor m1.small --image centos7 --nic net-id=${net_id} --key-name mykey test-instance
$ wget -q http://cloud.centos.org/centos/7/atomic/images/CentOS-Atomic-Host-7-GenericCloud.qcow2.gz -O CentOS7-Atomic.qcow2.gz
$ gunzip CentOS7-Atomic.qcow2.gz
$ qemu-img convert CentOS7-Atomic.qcow2 CentOS7-Atomic.raw
$ openstack image create --disk-format raw --container-format bare --file CentOS7-Atomic.raw CentOS7-Atomic