OpenStack

OpenStack Cheatsheet #

OpenStack is a cloud computing platform that provides infrastructure-as-a-service (IaaS) for creating and managing large groups of virtual private servers in a data center. It consists of several components, each designed to manage specific parts of the cloud environment.

Basic Commands #

Command/OptionExampleDescription
openstack helpopenstack helpDisplay help information for OpenStack commands
openstack --versionopenstack --versionShow the OpenStack client version
openstack project listopenstack project listList all projects
openstack user listopenstack user listList all users
openstack role listopenstack role listList all roles
openstack service listopenstack service listList all services

Authentication #

Command/OptionExampleDescription
openstack token issueopenstack token issueIssue a new authentication token
export OS_PROJECT_NAMEexport OS_PROJECT_NAME="my_project"Set the project name for the session
export OS_USER_DOMAIN_NAMEexport OS_USER_DOMAIN_NAME="default"Set the user domain for the session

Compute (Nova) #

Command/OptionExampleDescription
openstack server listopenstack server listList all servers
openstack server showopenstack server show <server_id>Show details of a specific server
openstack server createopenstack server create --flavor <flavor_id> --image <image_id> --network <network_id> <server_name>Create a new server
openstack server deleteopenstack server delete <server_id>Delete a server
openstack flavor listopenstack flavor listList all flavors
openstack image listopenstack image listList all images

Networking (Neutron) #

Command/OptionExampleDescription
openstack network listopenstack network listList all networks
openstack subnet listopenstack subnet listList all subnets
openstack router listopenstack router listList all routers
openstack port listopenstack port listList all ports
openstack network createopenstack network create <network_name>Create a new network
openstack subnet createopenstack subnet create --network <network_id> --subnet-range <cidr> <subnet_name>Create a new subnet
openstack router createopenstack router create <router_name>Create a new router

Storage (Cinder) #

Command/OptionExampleDescription
openstack volume listopenstack volume listList all volumes
openstack volume showopenstack volume show <volume_id>Show details of a specific volume
openstack volume createopenstack volume create --size <size_in_gb> <volume_name>Create a new volume
openstack volume deleteopenstack volume delete <volume_id>Delete a volume

Identity (Keystone) #

Command/OptionExampleDescription
openstack user createopenstack user create --domain default --password <password> <user_name>Create a new user
openstack user listopenstack user listList all users
openstack role addopenstack role add --project <project_id> --user <user_id> <role_id>Assign a role to a user in a project
openstack project createopenstack project create <project_name>Create a new project
openstack role listopenstack role listList all roles

Image (Glance) #

Command/OptionExampleDescription
openstack image listopenstack image listList all images
openstack image showopenstack image show <image_id>Show details of a specific image
openstack image createopenstack image create <image_name> --disk-format <format> --container-format <container_format> --file <image_file>Create a new image
openstack image deleteopenstack image delete <image_id>Delete an image

Volume (Cinder) #

Command/OptionExampleDescription
openstack volume listopenstack volume listList all volumes
openstack volume showopenstack volume show <volume_id>Show details of a specific volume
openstack volume createopenstack volume create --size <size_in_gb> <volume_name>Create a new volume
openstack volume deleteopenstack volume delete <volume_id>Delete a volume

Orchestration (Heat) #

Command/OptionExampleDescription
openstack stack listopenstack stack listList all stacks
openstack stack createopenstack stack create --template <template_file> <stack_name>Create a new stack
openstack stack deleteopenstack stack delete <stack_name>Delete a stack
openstack stack showopenstack stack show <stack_name>Show details of a specific stack

This cheatsheet covers the most commonly used OpenStack commands and options, helping you manage various aspects of your OpenStack environment, including computing, networking, storage, and more.

OpenStack

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.