4 The commands described bellow are grouped by service. The examples showcase a sample set of group commands. The kamaki interactive shell (check `Usage section <usage.html#interactive-shell>`_ for details) is chosen as the execution environment.
7 user (Identity Manager)
8 -----------------------
12 authenticate: Authenticate a user
14 Showcase: get user information
15 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 In the following, the token has been set in a previous step (see `setup section <setup.html>`_ or the `quick setup guide <usage.html#quick-setup>`_)
19 .. code-block:: console
22 * Enter user context *
27 auth_token_created: 2012-11-13T14:12:40.917034
28 auth_token_expires: 2012-12-13T14:12:40.917035
31 myotheraccount@grnet.gr
33 username : usually@an.email.org
34 uuid : ab1cde23-45fg-6h7i-8j9k-10l1m11no2pq
36 flavor (Compute/Cyclades)
37 -------------------------
41 info: Get flavor details
44 Showcase: show details for flavor with id 43
45 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 .. code-block:: console
50 * Enter flavor context *
53 * Get details about flavor with id 43 *
55 SNF:disk_template: drbd
62 image (Plankton commands + Compute Image subcommands)
63 -----------------------------------------------------
67 list : List images accessible by user
68 meta : Get image metadata
69 register : (Re)Register an image
70 unregister : Unregister an image (does not delete the image file)
71 shared : List shared images
72 compute : Compute Image API commands
75 info : Get image details
76 properties : Manage properties related to OS installation in an image
77 add : Add a property to an image
78 delete: Delete a property from an image
79 get : Get an image property
80 list : List all image properties
81 set : Add / update a set of properties for an image
82 members : Manage members (users who can modify an image)
83 add : Add a member to an image
84 delete : Remove a member from an image
85 list : List members of an image
86 set : Set the members of an image
88 Showcase: Pick an image and list the properties
89 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91 .. code-block:: console
92 :emphasize-lines: 1,4,18
94 * Enter image context *
97 * list all available images *
99 1. Windows Server 2008
100 container_format: bare
101 disk_format : diskdump
102 id : 926ab1c5-2d85-49d4-aebe-0fce712789b9
105 2. Windows Server 2012
106 container_format: bare
107 disk_format : diskdump
108 id : 78262ee7-949e-4d70-af3a-85360c3de57a
112 container_format: bare
113 disk_format : diskdump
114 id : 5ed5a29b-292c-4fe0-b32c-2e2b65628635
117 4. Debian_Wheezy_Base
118 container_format: bare
119 disk_format : diskdump
120 id : 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
124 * Get properties of image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
125 [image]: compute properties 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
126 description : Debian 6.0.6 (Squeeze) Base System
135 server (Compute/Cyclades)
136 -------------------------
140 addr : List a server's nic address
141 console : Get a VNC console
142 create : Create a server
143 delete : Delete a server
144 firewall: Manage server's firewall profile
145 set : Set the server's firewall profile
146 get : Get the server's firewall profile
147 info : Get server details
149 metadata: Manage Server Metadata
150 list : List server metadata
151 set : Add / update server metadata
152 delete: Delete a piece of server metadata
153 meta : Get a server's metadata
154 reboot : Reboot a server
155 rename : Update a server's name
156 shutdown: Shutdown a server
157 start : Start a server
158 stats : Get server statistics
159 wait : Wait for server to finish
161 Showcase: Create a server
162 ^^^^^^^^^^^^^^^^^^^^^^^^^
164 .. code-block:: console
165 :emphasize-lines: 1,4,21,35,44,62
167 * Enter server context *
170 * See server-create help *
172 usage: create <name> <flavor id> <image id>
173 [--personality PERSONALITY] [-h] [--config CONFIG]
178 -v, --verbose More info at response
179 --personality PERSONALITY
180 add a personality file
181 -d, --debug Include debug output
182 -h, --help Show help message
183 -i, --include Include protocol headers in the output
184 --config CONFIG Path to configuration file
185 -s, --silent Do not output anything
187 * List all available images *
188 [server]: /image compute list
189 1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
190 1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
191 18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
192 6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
193 6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
194 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
195 86bc2414-0fb3-4898-a637-240292243302 Fedora
196 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
197 b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
198 baf2321c-57a0-4a69-825d-49f49cea163a CentOS
199 c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
201 * See details of flavor with id 1 *
202 [server]: /flavor info 1
203 SNF:disk_template: drbd
210 * Create a debian server named 'My Small Debian Server'
211 [server]: create 'My Small Debian Server' 1 b2dffe52-64a4-48c3-8a4c-8214cc3165cf
212 adminPass: L8gu2wbZ94
213 created : 2012-11-23T16:56:04.190813+00:00
217 imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
222 name : My Small Debian Server
226 updated : 2012-11-23T16:56:04.761962+00:00
228 * wait for server to build (optional) *
230 Server 11687 still in BUILD mode ||||||||||||||||| | 80%
231 Server 11687 is now in ACTIVE mode
233 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
235 network (Compute/Cyclades)
236 --------------------------
240 connect : Connect a server to a network
241 create : Create a network
242 delete : Delete a network
243 disconnect: Disconnect a nic of a server to a network
244 info : Get network details
246 rename : Update network name
248 Showcase: Connect a network to a VM
249 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
251 .. code-block:: console
252 :emphasize-lines: 1,4,9,24,27,44
254 * Enter network context *
257 * List user-owned VMs *
258 [network]: /server list
259 11687 (My Small Debian Server)
260 11688 (An Ubuntu server)
262 * Try network-connect (to get help) *
265 usage: connect <server id> <network id> [-s] [-h] [-i] [--config CONFIG]
267 Connect a server to a network
269 Syntax: connect <server id> <network id>
270 --config : Path to configuration file
271 -d,--debug : Include debug output
272 -h,--help : Show help message
273 -i,--include: Include protocol headers in the output
274 -s,--silent : Do not output anything
275 -v,--verbose: More info at response
277 * Connect VM with id 11687 to network with id 1409
278 [network]: connect 11687 1409
280 * Get details on network with id 1409
284 cidr : 192.168.1.0/24
286 created : 2012-11-23T17:17:20.560098+00:00
294 type : PRIVATE_MAC_FILTERED
295 updated : 2012-11-23T17:18:25.095225+00:00
297 * Get connectivity details on VM with id 11687 *
298 [network]: /server addr 11687
302 mac_address: aa:0f:c2:0b:0e:85
304 firewallProfile: DISABLED
306 ipv4 : 83.212.106.111
307 ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
308 mac_address : aa:0c:f2:12:0a:9e
311 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
313 file (Storage/Pithos+)
314 ----------------------
318 append : Append local file to remote
319 cat : Print a file to console
320 copy : Copy an object
321 containerlimit: Container size limit commands
322 set : Set container data limit
323 get : Get container data limit
324 create : Create a container
325 delete : Delete a container [or an object]
326 download : Download a file or directory
327 group : Manage access groups and group members
328 delete: Delete a user group
329 list : List groups and group members
330 set : Set a user group
331 hashmap : Get the hashmap of an object
332 info : Get information for account [, container [or object]]
333 list : List containers, object trees or objects in a directory
334 manifest : Create a remote file with uploaded parts by manifestation
335 metadata : Metadata are attached on objects (key:value pairs)
336 delete: Delete metadata with given key
338 set : Set a piece of metadata
339 mkdir : Create a directory
340 move : Copy an object
341 overwrite : Overwrite part (from start to end) of a remote file
342 permissions : Manage user and group accessibility for objects
343 delete: Delete all permissions set on object
344 get : Get read and write permissions of an object
345 set : Set permissions for an object
346 publish : Publish an object
347 purge : Purge a container
348 quota : Get quota for account
349 sharers : List the accounts that share objects with default account
350 touch : Create an empty object (file)
351 truncate : Truncate remote file up to a size
352 unpublish : Unpublish an object
353 upload : Upload a file or directory
354 versioning : Manage the versioning scheme of current pithos user account
355 get: Get versioning for account or container
356 set: Set versioning mode (auto, none) for account or container
357 versions : Get the version list of an object
359 Showcase: Upload and download a file
360 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
362 .. code-block:: console
363 :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
365 * Create a random binarry file at current OS path *
366 [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
369 20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
371 * Enter file context *
376 [file]: !ls -lh rndm_local.file
377 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
380 * Create two containers *
381 [file]: create mycont1
382 [file]: create mycont2
385 * List accessible containers *
387 1. mycont1 (0B, 0 objects)
388 2. mycont2 (0B, 0 objects)
389 3. pithos (0B, 0 objects)
390 4. trash (0B, 0 objects)
393 * Upload local file to 1st container *
394 [file]: upload rndm_local.file mycont1
397 * Check if file has been uploaded *
399 1. 20M rndm_local.file
401 * Create directory mydir on second container *
402 [file]: mkdir mycont2:mydir
405 * Move file from 1st to 2nd container (and in the directory) *
406 [file]: move mycont1:rndm_local.file mycont2:mydir/rndm_local.file
408 * Check contents of both containers *
412 2. 20M mydir/rndm_local.file
415 * Copy file from 2nd to 1st container, with a new name *
416 [file]: copy mycont2:mydir/rndm_local.file mycont1:rndm_remote.file
419 * Check pasted file *
421 1. 20M rndm_remote.file
424 * Download pasted file to local file system *
425 [file]: download mycont1:rndm_remote.file rndm_remote.file
428 * Check if file is downloaded and if it is the same to original *
429 [file]: !ls -lh *.file
430 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
431 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
432 [file]: !diff rndm_local.file rndm_remote.file
434 .. Note:: In kamaki shell, ! is used to execute OS shell commands (bash in the above)
436 .. warning:: The container:object/path syntax does not function if the container and / or the object path contain one or more : characters. To use containers and objects with : use the --container and --dst-container arguments, e.g. to copy test.py object from grnet:dev container to grnet:deploy ::
438 $ kamaki file copy --container=grnet:dev test.py --dst-container=grnet:deploy