0% found this document useful (0 votes)
407 views

Openstack Cheat Sheet

This document provides a cheat sheet summarizing common commands for managing key components of an OpenStack cloud, including Nova for compute, Glance for images, Keystone for identity, Cinder for block storage, Neutron for networking, Heat for orchestration, and Ceilometer for alarms and notifications. The cheat sheet lists brief descriptions and syntax for commands to manage instances, networks, floating IPs, security groups, volumes, routers, load balancers, orchestration templates, and alarms.

Uploaded by

Loris Strozzini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
407 views

Openstack Cheat Sheet

This document provides a cheat sheet summarizing common commands for managing key components of an OpenStack cloud, including Nova for compute, Glance for images, Keystone for identity, Cinder for block storage, Neutron for networking, Heat for orchestration, and Ceilometer for alarms and notifications. The cheat sheet lists brief descriptions and syntax for commands to manage instances, networks, floating IPs, security groups, volumes, routers, load balancers, orchestration templates, and alarms.

Uploaded by

Loris Strozzini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

OpenStackCheatSheet

Version:2.0
Lastmodified:6Oct2013
1.Nova
1.1Management
Servicesstatus:
$sudonovamanageservicelist
Enable/disableaservice:
$sudonovamanageserviceenable|disablehost=host
service=novacompute
Addanewnetwork:
$sudonovamanagenetworkcreatelabelvlan1
fixed_range_v410.0.1.0/24num_networks1
network_size256vlan1
Removeanetwork,firstdisassociateittoaproject:
$sudonovamanageprojectscrubprojectname
$sudonovamanagenetworkdelete[cidr]
Listnetworks:
$sudonovamanagenetworklist
AddafloatingIPsaddressrange:
$sudonovamanagefloatingcreatepool[mypool]
ip_range172.17.1.32/27
1/6
OpenStackCheatSheet
Version:2.0
Lastmodified:6Oct2013
Addafloatingtoyourtenant(youwillgetafloatingIPaddress,butunused):
$novafloatingipcreate[mypool]
AssociateIPtoaninstance(specifictenant,accordingtoyourcredentials)
$novaaddfloatingip[myinstance][ip]
CheckthestatusofthefloatingIPs(tenantrelated):
$novafloatingiplist
Listallinstancesrunningoneverycomputenode:
$sudonovamanagevmlist|columnt
1.2Common
Addanewsecuritygroup:
$novasecgroupcreatewebserver"Webserverrunning"
Addruletothisgroup:
$novasecgroupaddrulewebservertcp80800.0.0.0/0
Addasecurityrules,allowpingandssh:
$novasecgroupaddrulewebservericmp110.0.0.0/0
$novasecgroupaddrulewebservertcp22220.0.0.0/0
2/6
OpenStackCheatSheet
Version:2.0
Lastmodified:6Oct2013
Createcredential:
$novakeypairaddmy_key>mey_key.pem
$chmod600*.pem
Listinstancesfromthetenantinyourcredential:
$novalist
Bootanewinstance:
$novabootflavor[flavorid]image[imageid]key_name[key1]
security_groups[default][instancename]
Deleteaninstance:
$novadelete[INSTANCE_ID]
Takeasnapshotfromaninstancebutfirstcommitthebuffercachetodisk:
myinstance:~$sync
myinstance:~$sudoecho3|sudotee/proc/sys/vm/drop_caches
$novaimagecreate[instanceid][snapshotname]
Getpreciseinformationaboutaspecificinstance:
$novashow[instancename]
Performablock_migration:
$novalivemigrationblock_migrate[INSTANCE_ID][TARGET_SERVER]
3/6
OpenStackCheatSheet
Version:2.0
Lastmodified:6Oct2013
2.Glance
Addanimagetoglance(public):
$glanceaddname="myimage"is_public=True|Falsedisk_format=qcow2
container_format=ovfarchitecture=x86_64<myimage.img
Checktheglancebackend:
$glanceindex
Samewithnovacommon:
$novaimagelist
Setanimagetopublic:
$glanceupdate[imageid]is_public=true
3.Keystone
Listallthetenants:
$keystonetenantlist
Listallusers:
$keystoneuserlist
Createanewuser:
$keystoneusercreatename[username]tenant_id[tenantid]
pass[password]email[email]enabledtrue
4/6
OpenStackCheatSheet
Version:2.0
Lastmodified:6Oct2013
4.Cinder
Createnewvolume:
$cindercreatedisplaynamemyvol1
Listcindervolume:
$cinderlist
Listcindervolumeusingnovamanagement:
$novavolumelist
Attachvolumetoinstance:
$novavolumeattach[instanceid][volname]/dev/vdc
5.Neutron
Listfloatingip:
$neutronfloatingiplist
Createrouter:
$neutronrouterlist
Listallrouter:
$neutronrouterlist
Listallsubnet:
$neutronsubnetlist
5/6
OpenStackCheatSheet
Version:2.0
Lastmodified:6Oct2013
LoadBalanceasaService:
$neutronlbpoolcreatelbmethodROUND_ROBINnamemypool
protocolHTTPsubnetid[subnetid]
$neutronlbmembercreateaddress[server1ip]protocolport80mypool
$neutronlbmembercreateaddress[server2ip]protocolport80mypool
$neutronlbhealthmonitorcreatedelay3typeHTTPmaxretries3
timeout3
$neutronlbhealthmonitorassociate[healthmonitoruuid]mypool
$neutronlbvipcreatenamemyvipprotocolport80protocolHTTP
subnetid[subnetid]mypool
6.Heat
Createanewstack:
$heatstackcreate[stackname]f[templatefile]
P"InstanceType=m1.mediumKeyName=silentLinuxDistribution=F17"
Listallresourcesfromyourstack:
$heatresourcelist[stackname]
7.Ceilometer
Listallalarm:
$ceilometeralarmlist
6/6

You might also like