Last active
September 28, 2017 21:25
-
-
Save elemoine/723764211540d3179729031640ffe606 to your computer and use it in GitHub Desktop.
OpenStack cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keystone | |
-------- | |
keystone tenant-list | |
openstack project list | |
keystone tenant-create --name <tenant-name> --description <tenant-desc> --enabled true | |
openstack project create <project-name> --description <project-desc> --enable | |
keystone user-create --name <user-name> --tenant <tenant-name> --pass <user-password> --email <user-email> --enabled true | |
openstack user create --project <project-name> --password <user-password> --email <user-email> --enable <user-name> | |
nova | |
---- | |
nova list | |
openstack server list | |
nova boot <vm-name> --image <image-name> --flavor <flavor-name> --key-name <key-name> --nic net-id=<net-id> | |
openstack server create --image <image-name> --flavor <flavor-name> --key-name <key-name> --nic net-id=<net-id> <server-name> | |
nova delete <vm-name> | |
openstack server delete <server-name> | |
nova image-list | |
nova image-show <image-name> | |
nova flavor-list | |
nova keypair-list | |
nova keypair-add <key-name> --pub-key <public-key-file-path> | |
nova secgroup-list | |
nova secgroup-create <secgroup-name> <secgroup-description> | |
nova secgroup-list-rules <secgroup-name> | |
nova secgroup-add-rule <secgroup-name> tcp 22 22 172.24.4.0/24 | |
nova secgroup-add-rule <secgroup-name> icmp -1 -1 0.0.0.0/0 | |
nova volume-attach <vm-name> <volume-id> <device-path> | |
nova volume-attach vm1 f0ceb772-2496-413b-a9b7-a0b4a405be17 /dev/vdb | |
nova-manage service list | |
nova quota-update --instances 2 --cores 4 <tenant-name> | |
neutron | |
------- | |
neutron net-list | |
openstack network list | |
neutron net-create --shared --router:external=True <net-name> | |
neutron net-create --tenant-id <tenant_id> <net-name> | |
neutron subnet-create --name <subnet-name> --gateway 10.3.0.1 --enable-dhcp <net-name> --allocation-pool start=10.3.0.200,end=10.3.0.220 10.3.0.0/24 | |
neutron port-create --fixed-ip subnet_id=<subnet-id>,ip_address=<ip-address> <net-id> | |
neutron router-create --tenant-id <tenant-id> <router-name> | |
neutron router-gateway-set <router-id> <external-net-id> | |
neutron router-interface-add <router-id> <subnet-id> | |
neutron floatingip-create --tenant-id <tenant-id> <net-id> | |
neutron floatingip-associate <floatingip-id> <port-id> | |
glance | |
------ | |
glance image-list | |
glance image-create --progress --name <image-name> --file <image-file-path> --disk-format qcow2 --container-format bare | |
cinder | |
------ | |
cinder list | |
cinder create --display-name <volume-name> <volume-size-in-GB> | |
ceilometer | |
---------- | |
ceilometer alarm-threshold-create --name cpu_high --description 'running hot' -m cpu_util --statistic avg --period 300 --evaluation-periods 3 --comparison-operator gt --threshold 70.0 --alarm-action 'log://' -q resource_id=<vm-id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you