Talk:OpenStack

From Alliance Doc
Revision as of 20:13, 7 April 2016 by Cgeroux (talk | contribs)
Jump to navigation Jump to search

CERN docs on OpenStack, might be helpful https://clouddocs.web.cern.ch/clouddocs/

Combined OpenStack CLI tool

Installation

Question.png
[name@server ~]$ sudo apt-get install python-dev python-pip
Question.png
[name@server ~]$ pip install python-openstackclient

see [http://docs.openstack.org/cli-reference/common/cli_install_openstack_command_line_clients.html]

To install on a machine (ACENET specifically without admin privileges) use:

Question.png
[name@server ~]$  pip install --user python-openstackclient

provided that pip is install which installs to ~/.local/lib/pythonX.Y/site-packages/ so by adding export PYTHONPATH=${HOME}/.local/lib/python2.7/site-packages/:${PYTHONPATH} to your .bashrc file if you are using Python major version X=2, and minor version Y=7 python can then load those modules. Further adding export PATH=${HOME}/.local/bin:${PATH} to your .bashrc will allow you to run the openstack commands directly.

Executing commands

The combined CLI tool can be used interactively by running

Question.png
[name@server ~]$ openstack

and then issuing commands at the prompt. Alternatively the commands can be issued as one-offs by a preceding the command with openstack, for example

Question.png
[name@server ~]$ openstack server list

When running in interactive mode a list of available commands can be seen by typing help at the openstack prompt. The available commands are categorized by groups, many of the most commonly used are listed below (e.g. server command group. More information on a particular command group can be obtained by typing help <command group> where <command group> is the particular command group e.g. server. To get help on a particular command (e.g. options and arguments) one can type help <command group> <command>. Note that many of the available commands are available only to OpenStack administrators and will show some meaningless error message if a non-administrator tries using it. For this reason a list of available commands grouped by command group is provided below to allow one to easily identify commands available to the average user.

To execute a command type

Question.png
[name@server ~]$ openstack <command group> <command>

server command group

add security group migrate resume unlock
add volume pause set unpause
create reboot shelve unrescue
delete rebuild show unset
dump create remove security group ssh unshelve
image create remove volume start
list rescue stop
lock resize suspend

volume command group

create set
delete show
list unset

console command group

log show url show

image command group

create
delete
list

ip command group

fixed add floating list
fixed remove floating pool list
floating add floating remove
floating create floating show
floating delete

keypair command group

create list
delete show

network command group

create set
delete show
list

snapshot command group

create set
delete show
list unset

security group command group

create rule list
delete rule show
list set
rule create show
rule delete

limits show