4 The commands described bellow are grouped by service. The examples showcase a
5 sample set of group commands. The kamaki interactive shell (check
6 `Usage section <usage.html#interactive-shell>`_ for details) is chosen as the
10 user (Identity Manager)
11 -----------------------
15 authenticate: Authenticate a user
17 Showcase: get user information
18 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 In the following, the token has been set in a previous step (see
21 `setup section <setup.html>`_ or the
22 `quick setup guide <usage.html#quick-setup>`_)
24 .. code-block:: console
27 * Enter user context *
35 uuid: ab1cde23-45fg-6h7i-8j9k-10l1m11no2pq
37 .. note:: actual call returns a full list of service endpoints accessible to
38 the user with a specific token
40 flavor (Compute/Cyclades)
41 -------------------------
45 info: Get flavor details
48 Showcase: show details for flavor with id 43
49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 .. code-block:: console
54 * Enter flavor context *
57 * Get details about flavor with id 43 *
59 SNF:disk_template: drbd
66 image (Plankton commands + Compute Image subcommands)
67 -----------------------------------------------------
71 list : List images accessible by user
72 meta : Get image metadata
73 register : (Re)Register an image
74 unregister: Unregister an image (does not delete the image file)
75 shared : List shared images
76 compute : Compute Image API commands
79 info : Get image details
80 properties: Manage properties related to OS installation in an image
81 add : Add a property to an image
82 delete: Delete a property from an image
83 get : Get an image property
84 list : List all image properties
85 set : Add / update a set of properties for an image
86 members : Manage members (users who can modify an image)
87 add : Add a member to an image
88 delete: Remove a member from an image
89 list : List members of an image
90 set : Set the members of an image
92 Showcase: Pick an image and list the properties
93 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 .. code-block:: console
96 :emphasize-lines: 1,4,18
98 * Enter image context *
101 * list all available images *
103 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
104 container_format: bare
105 disk_format : diskdump
106 id : 926ab1c5-2d85-49d4-aebe-0fce712789b9
109 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
110 container_format: bare
111 disk_format : diskdump
112 id : 78262ee7-949e-4d70-af3a-85360c3de57a
115 5ed5a29b-292c-4fe0-b32c-2e2b65628635 ubuntu
116 container_format: bare
117 disk_format : diskdump
118 id : 5ed5a29b-292c-4fe0-b32c-2e2b65628635
121 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe Debian_Wheezy_Base
122 container_format: bare
123 disk_format : diskdump
124 id : 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
128 * Get properties of image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
129 [image]: compute properties 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
130 description : Debian 6.0.6 (Squeeze) Base System
139 server (Compute/Cyclades)
140 -------------------------
144 addr : List a server's nic address
145 console : Get a VNC console
146 create : Create a server
147 delete : Delete a server
148 firewall: Manage server's firewall profile
149 set : Set the server's firewall profile
150 get : Get the server's firewall profile
151 info : Get server details
153 metadata: Manage Server Metadata
154 list : List server metadata
155 set : Add / update server metadata
156 delete: Delete a piece of server metadata
157 meta : Get a server's metadata
158 reboot : Reboot a server
159 rename : Update a server's name
160 shutdown: Shutdown a server
161 start : Start a server
162 stats : Get server statistics
163 wait : Wait for server to finish
165 Showcase: Create a server
166 ^^^^^^^^^^^^^^^^^^^^^^^^^
168 .. code-block:: console
169 :emphasize-lines: 1,4,21,35,44,62
171 * Enter server context *
174 * See server-create help *
176 usage: create <name> <flavor id> <image id>
177 [--personality PERSONALITY] [-h] [--config CONFIG] [--cloud CLOUD]
182 -v, --verbose More info at response
183 --personality PERSONALITY
184 add a personality file
185 -d, --debug Include debug output
186 -h, --help Show help message
187 -i, --include Include protocol headers in the output
188 --config CONFIG Path to configuration file
189 -s, --silent Do not output anything
190 --cloud CLOUD Chose a cloud to connect to
192 * List all available images *
193 [server]: /image compute list
194 1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
195 1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
196 18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
197 6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
198 6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
199 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
200 86bc2414-0fb3-4898-a637-240292243302 Fedora
201 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
202 b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
203 baf2321c-57a0-4a69-825d-49f49cea163a CentOS
204 c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
206 * See details of flavor with id 1 *
207 [server]: /flavor info 1
208 SNF:disk_template: drbd
215 * Create a debian server named 'My Small Debian Server'
216 [server]: create 'My Small Debian Server' 1 b2dffe52-64a4-48c3-8a4c-8214cc3165cf
217 adminPass: L8gu2wbZ94
218 created : 2012-11-23T16:56:04.190813+00:00
222 imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
226 name : My Small Debian Server
230 updated : 2012-11-23T16:56:04.761962+00:00
232 * wait for server to build (optional) *
234 Server 11687 still in BUILD mode ||||||||||||||||| | 80%
235 Server 11687 is now in ACTIVE mode
237 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
239 network (Compute/Cyclades)
240 --------------------------
244 connect : Connect a server to a network
245 create : Create a network
246 delete : Delete a network
247 disconnect: Disconnect a nic of a server to a network
248 info : Get network details
250 rename : Update network name
252 Showcase: Connect a network to a VM
253 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255 .. code-block:: console
256 :emphasize-lines: 1,4,9,24,27,44
258 * Enter network context *
261 * List user-owned VMs *
262 [network]: /server list
263 11687 (My Small Debian Server)
264 11688 (An Ubuntu server)
266 * Try network-connect (to get help) *
269 usage: connect <server id> <network id> [-s] [-h] [-i] [--config CONFIG]
271 Connect a server to a network
273 Syntax: connect <server id> <network id>
274 --config : Path to configuration file
275 -d,--debug : Include debug output
276 -h,--help : Show help message
277 -i,--include: Include protocol headers in the output
278 -s,--silent : Do not output anything
279 -v,--verbose: More info at response
281 * Connect VM with id 11687 to network with id 1409
282 [network]: connect 11687 1409
284 * Get details on network with id 1409
288 cidr : 192.168.1.0/24
290 created : 2012-11-23T17:17:20.560098+00:00
299 updated : 2012-11-23T17:18:25.095225+00:00
301 * Get connectivity details on VM with id 11687 *
302 [network]: /server addr 11687
306 mac_address: aa:0f:c2:0b:0e:85
308 firewallProfile: DISABLED
310 ipv4 : 83.212.106.111
311 ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
312 mac_address : aa:0c:f2:12:0a:9e
315 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
317 file (Storage/Pithos+)
318 ----------------------
322 append : Append local file to remote
323 cat : Print a file to console
324 copy : Copy an object
325 containerlimit: Container size limit commands
326 set : Set container data limit
327 get : Get container data limit
328 create : Create a container
329 delete : Delete a container [or an object]
330 download : Download a file or directory
331 group : Manage access groups and group members
332 delete: Delete a user group
333 list : List groups and group members
334 set : Set a user group
335 hashmap : Get the hashmap of an object
336 info : Get information for account [, container [or object]]
337 list : List containers, object trees or objects in a directory
338 manifest : Create a remote file with uploaded parts by manifestation
339 metadata : Metadata are attached on objects (key:value pairs)
340 delete: Delete metadata with given key
342 set : Set a piece of metadata
343 mkdir : Create a directory
344 move : Copy an object
345 overwrite : Overwrite part (from start to end) of a remote file
346 permissions : Manage user and group accessibility for objects
347 delete: Delete all permissions set on object
348 get : Get read and write permissions of an object
349 set : Set permissions for an object
350 publish : Publish an object
351 purge : Purge a container
352 quota : Get quota for account
353 sharers : List the accounts that share objects with default account
354 touch : Create an empty object (file)
355 truncate : Truncate remote file up to a size
356 unpublish : Unpublish an object
357 upload : Upload a file or directory
358 versioning : Manage the versioning scheme of current pithos user account
359 get: Get versioning for account or container
360 set: Set versioning mode (auto, none) for account or container
361 versions : Get the version list of an object
363 Showcase: Upload and download a file
364 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
366 .. code-block:: console
367 :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
369 * Create a random binarry file at current OS path *
370 [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
373 20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
375 * Enter file context *
380 [file]: !ls -lh rndm_local.file
381 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
384 * Create two containers *
385 [file]: create mycont1
386 [file]: create mycont2
389 * List accessible containers *
391 1. mycont1 (0B, 0 objects)
392 2. mycont2 (0B, 0 objects)
393 3. pithos (0B, 0 objects)
394 4. trash (0B, 0 objects)
397 * Upload local file to 1st container *
398 [file]: upload rndm_local.file mycont1
401 * Check if file has been uploaded *
403 1. 20M rndm_local.file
405 * Create directory mydir on second container *
406 [file]: mkdir mycont2:mydir
409 * Move file from 1st to 2nd container (and in the directory) *
410 [file]: move mycont1:rndm_local.file mycont2:mydir/rndm_local.file
412 * Check contents of both containers *
416 2. 20M mydir/rndm_local.file
419 * Copy file from 2nd to 1st container, with a new name *
420 [file]: copy mycont2:mydir/rndm_local.file mycont1:rndm_remote.file
423 * Check pasted file *
425 1. 20M rndm_remote.file
428 * Download pasted file to local file system *
429 [file]: download mycont1:rndm_remote.file rndm_remote.file
432 * Check if file is downloaded and if it is the same to original *
433 [file]: !ls -lh *.file
434 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
435 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
436 [file]: !diff rndm_local.file rndm_remote.file
438 .. Note:: In kamaki shell, ! is used to execute OS shell commands (e.g. bash)
440 .. warning:: The container:object/path syntax does not function if the
441 container and / or the object path contain one or more : characters. To use
442 containers and objects with : use the --container and --dst-container
443 arguments, e.g. to copy test.py object from grnet:dev container to
446 $ kamaki file copy --container=grnet:dev test.py --dst-container=grnet:deploy