Command Line Interface (CLI)

Interact with AURO using native OpenStack Command-Line Interface (CLI) tools

You can interact with AURO Public Cloud using the native Openstack Command-Line Interface (CLI) tools.

AURO Public Cloud is based on Openstack, and the most recent Openstack CLIs and libraries are compatible with our Public Cloud. We recommend using a recent version of each of the CLI tools, which you can install using pip/pypi using our instructions linked below.

For each API there is a separate CLI tool. You can read about these CLI tools as well as get full command reference guides directly from the Openstack website, which also includes installation instructions. We have provided Linux installation instructions for use on our instances. If you need Windows or Mac OSX installation instructions you can get those directly from the Openstack website here: Install the OpenStack command-line clients

CLI Commands

You can also view the installation and reference documentation directly on the Openstack website here. This chart will help you identify which CLI tool is for which service.

NovaClient - for interacting with the Compute service

CinderClient - for interacting with the Block Storage service

NeutronClient - for interacting with the Networking API, part of the Compute service

KeystoneClient - for interacting with the Identity service

SwiftClient - for interacting with the Object Storage service

GlanceClient - for interacting with the Image service

DesignateClient - for interacting with the DNS service

IMPORTANT! You will notice as you use these CLI tools that there is cross functionality. For example, to get a complete list of the available images on our service you can use the NovaClient with nova image-list or the GlanceClient with glance image-list and get the image list with some slight variations in the information provided. The GlanceClient will give more details about the images than the NovaClient will. Please reference the Openstack documentation at the links provided for more details.

Identity (keystone)

Description Command
List all users $ keystone user-list
List Identity service catalog $ keystone catalog
List all services in service catalog $ keystone service-list
Create new user $ keystone user-create --name NAME --tenant-id TENANT \
--pass PASSWORD --email EMAIL --enabled BOOL
Create new tenant $ keystone tenant-create --name NAME --description "DESCRIPTION" \
--enabled BOOL

Image Service (glance)

Description Command
List images you can access $ glance image-list
Delete specified image $ glance image-delete IMAGE
Describe a specific image $ glance image-show IMAGE
Update image $ glance image-update IMAGE
Manage images
Kernel image $ glance image-create --name "cirros-threepart-kernel" \
--disk-format aki --container-format aki --is-public False \
--file ~/images/cirros-0.3.1~pre4-x86_64-vmlinuz
RAM image $ glance image-create -—name "cirros-threepart-ramdisk" \
--disk-format ari --container-format ari --is-public False \
--file ~/images/cirros-0.3.1~pre4-x86_64-initrd
Three-part image $ glance image-create --name "cirros-threepart" --disk-format ami \
--container-format ami --is-public False \
--property kernel_id=$KID—property ramdisk_id=$RID \
--file ~/images/cirros-0.3.1~pre4-x86_64-blank.img
Register raw image $ glance image-create --name "cirros-qcow2" --disk-format qcow2 \
--container-format bare --is-public False \
--file ~/images/cirros-0.3.1~pre4-x86_64-disk.img

Compute (nova)

Description Command
List instances, notice status of instance $ nova list
List images $ nova image-list
List flavors $ nova flavor-list
Boot an instance using flavor and image names (if names are unique) $ nova boot --image IMAGE --flavor FLAVOR INSTANCE_NAME
$ nova boot --image cirros-0.3.1-x86_64-uec --flavor m1.tiny \
MyFirstInstance
Login to instance # ip netns
# ip netns exec NETNS_NAME ssh USER@SERVER
# ip netns exec qdhcp-6021a3b4-8587-4f9c-8064-0103885dfba2 \
ssh cirros@10.0.0.2

Note, in CirrOS the password for user cirros is "cubswin:)" without the quotes.
Show details of instance $ nova show NAME
$ nova show MyFirstInstance
View console log of instance $ nova console-log MyFirstInstance
Set metadata on an instance $ nova meta volumeTwoImage set newmeta='my meta data'
Create an instance snapshot $ nova image-create volumeTwoImage snapshotOfVolumeImage
$ nova image-show snapshotOfVolumeImage
Pause, suspend, stop, rescue, resize, rebuild, reboot an instance
Pause $ nova pause NAME
$ nova pause volumeTwoImage
Unpause $ nova unpause NAME
Suspend $ nova suspend NAME
Unsuspend $ nova resume NAME
Stop $ nova stop NAME
Start $ nova start NAME
Rescue $ nova rescue NAME
Resize $ nova resize NAME FLAVOR
$ nova resize my-pem-server m1.small
$ nova resize-confirm my-pem-server1
Rebuild $ nova rebuild NAME IMAGE $ nova rebuild newtinny cirros-qcow2
Reboot $ nova reboot NAME $ nova reboot newtinny
Inject user data and files into an instance $ nova boot --user-data FILE INSTANCE
$ nova boot --user-data userdata.txt --image cirros-qcow2 \
--flavor m1.tiny MyUserdataInstance2

To validate that the file is there, ssh into the instance, and look in /var/lib/cloud for the file.
Inject a keypair into an instance and access the instance with that keypair
Create keypair $ nova keypair-add test > test.pem
$ chmod 600 test.pem
Boot $ nova boot --image cirros-0.3.0-x86_64 --flavor m1.small \
--key_name test MyFirstServer
Use ssh to connect to the instance # ip netns exec qdhcp-98f09f1e-64c4-4301-a897-5067ee6d544f \
ssh -i test.pem cirros@10.0.0.4
Manage security groups
Add rules to default security group allowing ping and SSH between instances in the default security group $ nova secgroup-add-group-rule default default icmp -1 -1
$ nova secgroup-add-group-rule default default tcp 22 22

Networking (neutron)

Description Command
Create network $ neutron net-create NAME
Create a subnet $ neutron subnet-create NETWORK_NAME CIDR
$ neutron subnet-create my-network 10.0.0.0/29E
Create network $ neutron net-create NAME
List network and subnet $ neutron net-list $ neutron subnet-list
Examine details of network and subnet $ neutron net-show ID_OR_NAME_OF_NETWORK
$ neutron subnet-show ID_OR_NAME_OF_NETWORK

Block Storage (cinder)

Description Command
Manage volumes and volume snapshots
Create a new volume $ cinder create SIZE_IN_GB --display-name NAME
$ cinder create 1 --display-name MyFirstVolume
Boot an instance and attach to volume $ nova boot --image cirros-qcow2 --flavor m1.tiny MyVolumeInstance
List volumes, notice status of volume $ cinder list
Attach volume to instance after instance is active, and volume is available $ nova volume-attach INSTANCE_ID VOLUME_ID auto
$ nova volume-attach MyVolumeInstance /dev/vdb auto
Manage volumes and volume snapshots
List storage devices # fdisk -l
Make filesystem on volume # mkfs.ext3 /dev/vdb
Create a mountpoint # mkdir /myspace
Mount the volume at the mountpoint # mount /dev/vdb /myspace
Create a file on the volume # touch /myspace/helloworld.txt
# ls /myspace
Unmount the volume # umount /myspace

Object Storage (swift)

Description Command
Display information for the account, container, or object $ swift stat
$ swift stat ACCOUNT
$ swift stat CONTAINER
$ swift stat OBJECT
List containers $ swift list
Create a container $ swift post CONTAINER_NAME
Upload file to a container $ swift upload CONTAINER_NAME FILE_NAME
$ swift upload mycontainer myfile.txt
List objects in container $ swift list container
Download object from container $ swift download CONTAINER_NAME FILE_NAME
Upload with chunks, for large file $ swift upload -S SIZE CONTAINER_NAME FILE_NAME
$ swift upload -S 64 container largeFile
  • AURO
  • Latest News

AURO Cloud Computing expands support to include Managed Amazon Web Services infrastructure

Canadian Cloud Leader AURO adds Managed AWS services to provide a hyper cloud solution compliant with Canadian data privacy laws. These offerings allows customers to receive a customized AWS support solution, fulfilling both their infrastructure requirements and business goals.

  • Download
  • Free Whitepapers

Get the guides, facts, reports, and diagrams you need.

Download Now

See more resources

  • Get in Touch
  • 1.855.226.4678

Call Free anytime:

MORE CONTACT OPTIONS