OpenStack CLI – Getting Started

Below are some basic commands to get comfortable with OpenStack CLI.   These commands are primarily focused on information gathering and non-intrusive actions.   The OpenStack CLI commands are capable of many more actions, and everything regarding the virtual environment and virtual servers is configurable via the CLI tools.

Keystone

keystone tenant-list List of all the tenants on the system and their IDs.
keystone role-list List all user roles.
keystone catalog Lists all services and the IDs and URLs associated with each.
keystone service-list List of all the services running, their type, description, and IDs.
keystone endpoint-list List of all URLs for the services running.  Must correspond IDs to name via “service-list” command.
keystone catalog Lists all services and the IDs and URLs associated with each.  Like a merge of both “service-list” and “endpoint-list” commands.

 

 Nova

nova list List of all current servers (VMs).  Shows status and power state, as well as connected networks.
nova list --all-tenants List all current servers in all tenants.
nova hypervisor-list List of all the servers handling virtual machines.
nova image-list List of images available to boot from.
nova flavor-list List of available flavors.
nova floating-ip-list List of floating IP addresses, assocaited fixed IP, pool, server.
nova host-action Ability to shutdown, startup or reboot a specific host (hypervisor).
nova live-migration Ability to move a server to a new hypervisor.
nova reboot Reboot a server (VM).
nova net-list List of available networks.

 

Neutron

neutron ext-list List of active extensions.
neutron net-list List networks.
neutron net-show Shows details regarding a specific network.
neutron subnet-list List subnets.
neutron subnet-show Shows details regarding a specific subnet.
neutron port-list List ports.
neutron port-show Shows details regarding a specific port.
neutron security-group-list List security groups.
neutron security-group-show Shows details regarding a specific security group.

 

Glance

glance image-list List all available images.
glance image-show Shows specifics about a particular image.
glance image-create Create a new image.   This can be based off a local file, an existing glance image, or a swift location.
glance image-download Download a local copy of an image.

 

Heat

heat stack-list List of all active stacks.
heat stack-show Shows details regarding a specific stack.
heat stack-create Create a stack based on specific template information.
heat stack-delete Shutdown an active stack.
heat resource-list Shows resources tied to a specific stack.
heat template-show Shows the template used to create a stack.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s