Talk:OpenStack: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
CERN docs on OpenStack, might be helpful [https://clouddocs.web.cern.ch/clouddocs/ https://clouddocs.web.cern.ch/clouddocs/] | CERN docs on OpenStack, might be helpful [https://clouddocs.web.cern.ch/clouddocs/ https://clouddocs.web.cern.ch/clouddocs/] | ||
== | ==Combined OpenStack CLI tool== | ||
===Installation=== | ===Installation=== | ||
{{command|sudo apt-get install python-dev python-pip}} | {{command|sudo apt-get install python-dev python-pip}} | ||
Line 7: | Line 7: | ||
see [[http://docs.openstack.org/cli-reference/common/cli_install_openstack_command_line_clients.html http://docs.openstack.org/cli-reference/common/cli_install_openstack_command_line_clients.html]] | see [[http://docs.openstack.org/cli-reference/common/cli_install_openstack_command_line_clients.html 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:{{command| pip install --user python-openstackclient}} | To install on a machine (ACENET specifically without admin privileges) use:{{command| pip install --user python-openstackclient}} | ||
which installs to ~/.local/lib/pythonX.Y/site-packages/ so by adding <code>export PYTHONPATH=${HOME}/.local/lib/python2.7/site-packages/:${PYTHONPATH}</code> to your <code>.bashrc</code> file if you are using Python major version X=2, and minor version Y=7. | provided that pip is install which installs to ~/.local/lib/pythonX.Y/site-packages/ so by adding <code>export PYTHONPATH=${HOME}/.local/lib/python2.7/site-packages/:${PYTHONPATH}</code> to your <code>.bashrc</code> file if you are using Python major version X=2, and minor version Y=7 python can then load those modules. Further adding <code>export PATH=${HOME}/.local/bin:${PATH}</code> to your .bashrc will allow you to run the openstack commands directly. | ||
===Executing commands=== | ===Executing commands=== | ||
The | The combined CLI tool can be used interactively by running | ||
{{Command|openstack}} | {{Command|openstack}} | ||
and then issuing commands at the prompt. Alternatively the commands can be issued as one-offs by a preceding the command with <code>openstack</code> for example | and then issuing commands at the prompt. Alternatively the commands can be issued as one-offs by a preceding the command with <code>openstack</code>, for example | ||
{{Command|openstack server list}} | {{Command|openstack server list}} | ||
When running in interactive mode a list of available commands by typing <code>help</code> at the openstack prompt. Note that many of | When running in interactive mode a list of available commands can be seen by typing <code>help</code> at the openstack prompt. The available commands are categorized by groups, many of the most commonly used are listed below (e.g. <code>server</code> command group. More information on a particular command group can be obtained by typing <code>help <command group></code> where <code><command group></code> is the particular command group e.g. <code>server</code>. To get help on a particular command (e.g. options and arguments) one can type <code>help <command group> <command></code>. 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. | ||
====server==== | To execute a command type {{Command|openstack <command group> <command>}} | ||
====volume==== | |||
====<code>server</code> command group==== | |||
{|- | |||
| <code>add security group</code> || <code>migrate</code> || <code>resume</code> || <code>unlock</code> | |||
|- | |||
| <code>add volume</code> || <code>pause</code> || <code>set</code> || <code>unpause</code> | |||
|- | |||
| <code>create</code> || <code>reboot</code> || <code>shelve</code> || <code>unrescue</code> | |||
|- | |||
| <code>delete</code> || <code>rebuild</code> || <code>show</code> || <code>unset</code> | |||
|- | |||
| <code>dump create</code> || <code>remove security group</code> || <code>ssh</code> || <code>unshelve</code> | |||
|- | |||
| <code>image create</code> || <code>remove volume</code> || <code>start</code> || | |||
|- | |||
| <code>list</code> || <code>rescue</code> || <code>stop</code> | |||
|- | |||
| <code>lock</code> || <code>resize</code> || <code>suspend</code> | |||
|} | |||
====<code>volume</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>set</code> | |||
|- | |||
|<code>delete</code>||<code>show</code> | |||
|- | |||
|<code>list</code>||<code>unset</code> | |||
|} | |||
====<code>console</code> command group==== | |||
{|- | |||
|<code>log show</code>||<code>url show</code> | |||
|} | |||
====<code>image</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>save</code>| | |||
|- | |||
|<code>delete</code>||<code>set</code>| | |||
|- | |||
|<code>list</code>||<code>show</code>| | |||
|} | |||
====<code>ip</code> command group==== | |||
{|- | |||
|<code>fixed add</code>||<code>floating list</code> | |||
|- | |||
|<code>fixed remove</code>||<code>floating pool list</code> | |||
|- | |||
|<code>floating add</code>||<code>floating remove</code> | |||
|- | |||
|<code>floating create</code>||<code>floating show</code> | |||
|- | |||
|<code>floating delete</code> | |||
|} | |||
====<code>keypair</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>list</code> | |||
|- | |||
|<code>delete</code>||<code>show</code> | |||
|} | |||
====<code>network</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>set</code> | |||
|- | |||
|<code>delete</code>||<code>show</code> | |||
|- | |||
|<code>list</code>|| | |||
|} | |||
====<code>snapshot</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>set</code> | |||
|- | |||
|<code>delete</code>||<code>show</code> | |||
|- | |||
|<code>list</code>||<code>unset</code> | |||
|} | |||
====<code>security group</code> command group==== | |||
{|- | |||
|<code>create</code>||<code>rule list</code> | |||
|- | |||
|<code>delete</code>||<code>rule show</code> | |||
|- | |||
|<code>list</code>||<code>set</code> | |||
|- | |||
|<code>rule create</code>||<code>show</code> | |||
|- | |||
|<code>rule delete</code>|| | |||
|} | |||
====<code>limits show</code>==== | |||
<!--These two (container and object) are not widely publicized | |||
====container==== | ====container==== | ||
{|- | |||
|<code>create</code>||<code>set</code> | |||
|- | |||
|<code>delete</code>||<code>show</code> | |||
|- | |||
|<code>list</code>||<code>unset</code> | |||
|- | |||
|<code>save</code> | |||
|} | |||
====object==== | ====object==== | ||
{|- | |||
|<code>create</code>||<code>show</code> | |||
|- | |||
|<code>delete</code>||<code>store account set</code> | |||
|- | |||
|<code>list</code>||<code>store account show</code> | |||
|- | |||
|<code>save</code>||<code>store account unset</code> | |||
|- | |||
|<code>set</code>||<code>unset</code> | |||
|} | |||
--> |
Revision as of 20:13, 7 April 2016
CERN docs on OpenStack, might be helpful https://clouddocs.web.cern.ch/clouddocs/
Combined OpenStack CLI tool
Installation
[name@server ~]$ sudo apt-get install python-dev python-pip
[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:
[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
[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
[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
[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 |