Revision 2bd23362 docs/usage.rst
b/docs/usage.rst | ||
---|---|---|
6 | 6 |
`Commands <commands.html>`_ section. This guide covers the generic usage of |
7 | 7 |
both interfaces. |
8 | 8 |
|
9 |
What's more, kamaki offers a clients API that allows the development of
|
|
10 |
external applications for Synnefo. The clients API is listed in the
|
|
9 |
What's more, kamaki offers a clients library for the development of external
|
|
10 |
client applications for Synnefo. The clients library API is detailed in the
|
|
11 | 11 |
`Clients lib <developers/code.html#the-clients-api>`_ section. |
12 | 12 |
|
13 | 13 |
Quick Setup |
... | ... | |
34 | 34 |
Shell vs one-command |
35 | 35 |
-------------------- |
36 | 36 |
Kamaki users can access Synnefo services through either the interactive shell |
37 |
or the one-command behaviors. In practice, both systems rely on the same
|
|
37 |
or the one-command interface. In practice, both systems rely on the same
|
|
38 | 38 |
command set implementations and API clients, with identical responses and error |
39 | 39 |
messages. Still, there are some differences. |
40 | 40 |
|
41 |
In favor of interactive shell behavior:
|
|
41 |
In favor of interactive shell: |
|
42 | 42 |
|
43 | 43 |
* tab completion for commands (if supported by the user's shell) |
44 | 44 |
* session history with ↑ or ↓ keys (if supported by the user's shell) |
45 | 45 |
* shorter commands with command context switching |
46 | 46 |
* re-run old commands with /history |
47 | 47 |
|
48 |
In favor of one-command behavior:
|
|
48 |
In favor of one-command: |
|
49 | 49 |
|
50 | 50 |
* can be used along with advanced shell features (pipelines, redirection, etc.) |
51 | 51 |
* can be used in shell scripts |
... | ... | |
64 | 64 |
|
65 | 65 |
$ kamaki |
66 | 66 |
|
67 |
* with any kind of '-' prefixed arguments, except '-h', '--help'. |
|
67 |
* with any kind of '-' prefixed arguments, except '-h', '--help', '-V', |
|
68 |
'- - version'. |
|
68 | 69 |
|
69 | 70 |
.. code-block:: console |
70 | 71 |
:emphasize-lines: 1 |
... | ... | |
92 | 93 |
.. code-block:: console |
93 | 94 |
:emphasize-lines: 1 |
94 | 95 |
|
95 |
Example 2.3.2: List VMs managed by user
|
|
96 |
Example 2.3.2: List servers managed by user
|
|
96 | 97 |
|
97 | 98 |
$ kamaki server list |
98 | 99 |
|
... | ... | |
170 | 171 |
|
171 | 172 |
Options: |
172 | 173 |
- - - - |
173 |
addr : List the addresses of all network interfaces on a server (VM)
|
|
174 |
console : Get a VNC console to access an existing server (VM)
|
|
174 |
addr : List the addresses of all network interfaces on a server (server)
|
|
175 |
console : Get a VNC console to access an existing server (server)
|
|
175 | 176 |
create : Create a server (aka Virtual Machine) |
176 |
delete : Delete a server (VM)
|
|
177 |
firewall: Manage server (VM) firewall profiles for public networks
|
|
177 |
delete : Delete a server (server)
|
|
178 |
firewall: Manage server (server) firewall profiles for public networks
|
|
178 | 179 |
ip : Manage floating IPs for the servers |
179 | 180 |
info : Detailed information on a Virtual Machine |
180 | 181 |
list : List Virtual Machines accessible by user |
181 | 182 |
metadata: Manage Server metadata (key:value pairs of server attributes) |
182 |
reboot : Reboot a server (VM)
|
|
183 |
rename : Set/update a server (VM) name
|
|
184 |
shutdown: Shutdown an active server (VM)
|
|
185 |
start : Start an existing server (VM)
|
|
186 |
stats : Get server (VM) statistics
|
|
183 |
reboot : Reboot a server (server)
|
|
184 |
rename : Set/update a server (server) name
|
|
185 |
shutdown: Shutdown an active server (server)
|
|
186 |
start : Start an existing server (server)
|
|
187 |
stats : Get server (server) statistics
|
|
187 | 188 |
resize : Set a different flavor for an existing server |
188 | 189 |
wait : Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE] |
189 | 190 |
|
... | ... | |
221 | 222 |
--more output results in pages (-n to set items per page, |
222 | 223 |
default 10) |
223 | 224 |
-n LIMIT, --number LIMIT |
224 |
limit number of listed VMs
|
|
225 |
limit number of listed servers
|
|
225 | 226 |
-j, --json show headers in json |
226 | 227 |
|
227 | 228 |
.. _using-history-ref: |
... | ... | |
406 | 407 |
[file]: exit |
407 | 408 |
[kamaki]: server |
408 | 409 |
[server]: list |
409 |
... (VMs listing) ...
|
|
410 |
... (servers listing) ...
|
|
410 | 411 |
[server]: exit |
411 | 412 |
[kamaki]: |
412 | 413 |
|
... | ... | |
424 | 425 |
[kamaki]: file list |
425 | 426 |
... (storage container listing) ... |
426 | 427 |
[kamaki]: server list |
427 |
... (VMs listing) ...
|
|
428 |
... (servers listing) ...
|
|
428 | 429 |
[kamaki]: |
429 | 430 |
|
430 | 431 |
Using Help |
... | ... | |
559 | 560 |
[context]: /anothercontext cmd1 cmd2 ... cmdN |
560 | 561 |
|
561 | 562 |
An example (4.3.1) that showcases how top-level access improves user experience |
562 |
is the creation of a VM. A VM is created with the command server-create. This
|
|
563 |
is the creation of a server. A server is created with the command server-create. This
|
|
563 | 564 |
command is called with three parameters: |
564 | 565 |
|
565 |
* the name of the new VM
|
|
566 |
* the name of the new server
|
|
566 | 567 |
* the flavor id |
567 | 568 |
* the image id |
568 | 569 |
|
569 | 570 |
It is often the case that a user who works in the context command, needs to |
570 |
create a new VM, but hasn't selected a flavor or an image id, or cannot recall
|
|
571 |
create a new server, but hasn't selected a flavor or an image id, or cannot recall
|
|
571 | 572 |
the id of that flavor or image. Therefore, it is necessary to list all |
572 | 573 |
available flavors (flavor-list) or images (image-compute-list). Both commands |
573 | 574 |
belong to different contexts. |
... | ... | |
575 | 576 |
.. code-block:: console |
576 | 577 |
:emphasize-lines: 1 |
577 | 578 |
|
578 |
Example 4.3.1: Create a VM from server context
|
|
579 |
Example 4.3.1: Create a server from server context
|
|
579 | 580 |
|
580 | 581 |
[server]: create -h |
581 | 582 |
create <name> <flavor id> <image id> ... |
Also available in: Unified diff