Commit b8e90894 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Document with client cli commands showcases

parent a6370d73
......@@ -98,6 +98,8 @@ To use kamaki as an one-command tool, run:
Commands
^^^^^^^^
Client commands are grouped by service (see example 3.1.1 on how to list available groups). Commands behavior is as uniform as possible, but there are still differences between groups due to the special nature of each service and server-side implementation.
Typically, commands consist of a group name (e.g. store for storage commands) one or more terms (e.g. list for listing) and the command specific parameters (e.g. the name of the container), if any.
.. code-block:: console
......@@ -132,7 +134,7 @@ The following pattern applies to all client commands up to version 0.6.1:
kamaki <group> <command> [arguments]
The commands supported in version 0.6.1 are described bellow, grouped by service:
The commands supported in version 0.6.1 are described bellow, grouped by service. The examples showcase a sample set of group commands and were run in the kamaki interactive shell:
astakos (Identity Manager)
""""""""""""""""""""""""""
......@@ -141,6 +143,24 @@ astakos (Identity Manager)
authenticate: Authenticate a user
Showcase: get user information, provided the token was set
.. code-block:: console
:emphasize-lines: 1, 2, 12
[kamaki]:astakos
[astakos]:authenticate
auth_token : s0m3t0k3nth@t1sr3m0v3d==
auth_token_created: 2012-11-13T14:12:40.917034
auth_token_expires: 2012-12-13T14:12:40.917035
groups :
default
has_credits : False
has_signed_terms : True
uniq : myaccount@grnet.gr
username : 4215th3b357num9323v32
[astakos]:
flavor (Compute/Cyclades)
"""""""""""""""""""""""""
......@@ -149,6 +169,21 @@ flavor (Compute/Cyclades)
info: Get flavor details
list: List flavors
Showcase: show details for flavor with id 43
.. code-block:: console
:emphasize-lines: 1, 2, 9
[kamaki]: flavor
[flavor]: info 43
SNF:disk_template: drbd
cpu : 4
disk : 10
id : 43
name : C4R2048D10
ram : 2048
[flavor]:
image (Compute/Cyclades + Glance)
""""""""""""""""""""""""""""""""""
......@@ -170,18 +205,34 @@ image (Compute/Cyclades + Glance)
setproperty: Update an image property
shared : List shared images
network (Compute/Cyclades)
""""""""""""""""""""""""""
.. code-block:: text
Showcase: show a list of public images, list the properties of Debian Base
connect : Connect a server to a network
create : Create a network
delete : Delete a network
disconnect: Disconnect a nic of a server to a network
info : Get network details
list : List networks
rename : Update network name
.. code-block:: console
:emphasize-lines: 1, 2, 14, 23
[kamaki]:image
[image]:list
1395fdfb-51b4-419f-bb02-f7d632860611 (Ubuntu Desktop LTS (Long Term Support))
1580deb4-edb3-4496-a27f-7a246c4c0528 (Ubuntu Desktop)
18a82962-43eb-4b32-8e28-8f8880af89d7 (Kubuntu LTS (Long Term Support))
6aa6eafd-dccb-422d-a904-67fe2bdde87e (Debian Desktop)
6b5681e4-7502-46ae-b1e9-9fd837932095 (maelstrom)
78262ee7-949e-4d70-af3a-85360c3de57a (Windows Server 2012)
86bc2414-0fb3-4898-a637-240292243302 (Fedora)
926ab1c5-2d85-49d4-aebe-0fce712789b9 (Windows Server 2008)
b2dffe52-64a4-48c3-8a4c-8214cc3165cf (Debian Base)
baf2321c-57a0-4a69-825d-49f49cea163a (CentOS)
c1d27b46-d875-4f5c-b7f1-f39b5af62905 (Kubuntu)
[image]:properties b2dffe52-64a4-48c3-8a4c-8214cc3165cf
description : Debian 6.0.6 (Squeeze) Base System
gui : No GUI
kernel : 2.6.32
os : debian
osfamily : linux
root_partition: 1
sortorder : 1
users : root
[image]:
server (Compute/Cyclades)
"""""""""""""""""""""""""
......@@ -206,6 +257,135 @@ server (Compute/Cyclades)
stats : Get server statistics
wait : Wait for server to finish
Showcase: Create a server: Show create help, find a flavor and an image make a server. Wait for server to be build, get server details. Note that the progress bar feature is optional (see )
.. code-block:: console
:emphasize-lines: 1, 2, 17, 34, 41, 57, 60, 67
[kamaki]:server
[server]:create -h
usage: create <name> <flavor id> <image id>
[--personality PERSONALITY] [-h] [--config CONFIG]
Create a server
optional arguments:
-v, --verbose More info at response
--personality PERSONALITY
add a personality file
-d, --debug Include debug output
-h, --help Show help message
-i, --include Include protocol headers in the output
--config CONFIG Path to configuration file
-s, --silent Do not output anything
[server]:/image list
1395fdfb-51b4-419f-bb02-f7d632860611 (Ubuntu Desktop LTS (Long Term Support))
1580deb4-edb3-4496-a27f-7a246c4c0528 (Ubuntu Desktop)
18a82962-43eb-4b32-8e28-8f8880af89d7 (Kubuntu LTS (Long Term Support))
6aa6eafd-dccb-422d-a904-67fe2bdde87e (Debian Desktop)
6b5681e4-7502-46ae-b1e9-9fd837932095 (maelstrom)
78262ee7-949e-4d70-af3a-85360c3de57a (Windows Server 2012)
86bc2414-0fb3-4898-a637-240292243302 (Fedora)
926ab1c5-2d85-49d4-aebe-0fce712789b9 (Windows Server 2008)
b2dffe52-64a4-48c3-8a4c-8214cc3165cf (Debian Base)
baf2321c-57a0-4a69-825d-49f49cea163a (CentOS)
c1d27b46-d875-4f5c-b7f1-f39b5af62905 (Kubuntu)
[server]:/flavor info 1
SNF:disk_template: drbd
cpu : 1
disk : 20
id : 1
name : C1R1024D20
ram : 1024
[server]:create 'My Small Debian Server' 1 b2dffe52-64a4-48c3-8a4c-8214cc3165cf
adminPass: L8gu2wbZ94
created : 2012-11-23T16:56:04.190813+00:00
flavorRef: 1
hostId :
id : 11687
imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
metadata :
values:
os : debian
users: root
name : My Small Debian Server
progress : 0
status : BUILD
suspended: False
updated : 2012-11-23T16:56:04.761962+00:00
[server]:wait 11687
Server 11687 still in BUILD mode ||||||||||||||||| | 80% - 3s
Server 11687 is now in ACTIVE mode
[server]:
network (Compute/Cyclades)
""""""""""""""""""""""""""
.. code-block:: text
connect : Connect a server to a network
create : Create a network
delete : Delete a network
disconnect: Disconnect a nic of a server to a network
info : Get network details
list : List networks
rename : Update network name
Showcase: Connect a network to a VM: create a network, list available VMs, connect to 'My Small Debian Server', check network info and server connectivity.
.. code-block:: console
:emphasize-lines: 1, 2, 5, 14, 15, 30, 42
[kamaki]:network
[network]:/server list
11687 (My Small Debian Server)
11688 (An Ubuntu server)
[network]:connect
Connect a server to a network
Syntax: connect <server id> <network id>
--config : Path to configuration file
-d,--debug : Include debug output
-h,--help : Show help message
-i,--include: Include protocol headers in the output
-s,--silent : Do not output anything
-v,--verbose: More info at response
[network]: connect 11687 1409
[network]:info 1409
attachments:
nic-11687-1
cidr : 192.168.1.0/24
cidr6 : None
created : 2012-11-23T17:17:20.560098+00:00
dhcp : True
gateway : None
gateway6 : None
id : 1409
name : my network
public : False
status : ACTIVE
type : PRIVATE_MAC_FILTERED
updated : 2012-11-23T17:18:25.095225+00:00
[network]:/server addr 11687
id: nic-11687-1
ipv4 : 192.168.1.1
ipv6 : None
mac_address: aa:0f:c2:0b:0e:85
network_id : 1409
firewallProfile: DISABLED
id: nic-11687-0
ipv4 : 83.212.106.111
ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
mac_address : aa:0c:f2:12:0a:9e
network_id : 1369
[network]:
store (Storage/Pithos+)
"""""""""""""""""""""""
......@@ -403,7 +583,6 @@ To run kamaki in verbose mode use the -v or --verbose option
Client commands
"""""""""""""""
Client commands are grouped by service (see example 3.1.1 for how to list availabel groups). Commands behavior is as uniform as possible, but there are still differences between groups due to the special nature of each service and server-side implementation.
Kamaki commands can be used along with advanced shell features.
......@@ -414,10 +593,10 @@ Kamaki commands can be used along with advanced shell features.
Example 4.4.1: Store a vm list in file vmlist.txt in a unix shell
In that case, kamaki modifies the output (e.g. removes colors - if enabled)
Interactive shell
^^^^^^^^^^^^^^^^^
Creating applications over the Clients API
------------------------------------------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment