4 Kamaki commands follow this scheme::
6 [kamaki] <object> <action> [identifiers] [non-positional arguments]
8 In this context, objects are not services, but virtual objects like a server, a
9 file or an image. The action concerns objects of the specified type. Some
10 actions (e.g. "delete" or "info") need to operate on an existing object. The
11 identifiers strictly identify this object and they should have the form of an id
12 (e.g., `server delete <SERVER_ID>`).
14 The examples bellow showcase some commands. The kamaki-shell (check
15 `Usage section <usage.html#interactive-shell>`_ for details) is chosen as the
16 execution environment.
19 user (Identity/Astakos)
20 -----------------------
24 info Get info for (current) session user
25 uuid2name Get user name(s) from uuid(s)
26 authenticate Authenticate a user and get all authentication information
27 list List (cached) session users
28 add Authenticate user by token and add to kamaki session (cache)
29 name2uuid Get user uuid(s) from name(s)
30 select Select user from the (cached) list as current session user
31 delete Delete user (token) from the (cached) list of session users
33 Showcase: get user information
34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 In the following, cloud URL and TOKEN were set in a previous step (see
37 `setup section <setup.html>`_ or the
38 `quick setup guide <usage.html#quick-setup>`_)
40 .. code-block:: console
43 * Enter user context *
50 id: ab1cde23-45fg-6h7i-8j9k-10l1m11no2pq
60 info Get details for a project
61 unsuspend Resume a suspended project (special privileges needed)
62 suspend Suspend a project (special privileges needed)
63 list List all projects
64 create Apply for a new project
65 modify Modify a project
66 terminate Terminate a project (special privileges needed)
67 application Application management commands
68 reinstate Reinstate a terminated project (special privileges needed)
75 info Details on a membership
76 enroll Enroll somebody to a project you manage
78 list List all memberships
79 accept Accept a membership for a project you manage
80 leave Leave a project you have membership to
81 remove Remove a membership for a project you manage
82 reject Reject a membership for a project you manage
83 cancel Cancel your (probably pending) membership to a project
85 quota (Account/Astakos)
86 -----------------------
91 info Get quota for a service (cyclades, pithos, astakos)
98 list List user resources
100 flavor (Compute/Cyclades)
101 -------------------------
105 info: Get flavor details
108 Showcase: show details for flavor with id 43
109 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 .. code-block:: console
112 :emphasize-lines: 1,4
114 * Enter flavor context *
117 * Get details about flavor with id 43 *
119 SNF:disk_template: drbd
126 image (Image/Plankton)
127 ----------------------
131 info Get image metadata
132 list List images accessible by user
133 register (Re)Register an image file to an Image service
134 modify Add / update metadata and properties for an image
135 unregister Unregister an image (does not delete the image file)
137 Showcase: Pick an image and list the properties
138 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 .. code-block:: console
141 :emphasize-lines: 1,4,18
143 * Enter image context *
146 * list all available images *
148 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
149 container_format: bare
150 disk_format: diskdump
151 id: 926ab1c5-2d85-49d4-aebe-0fce712789b9
154 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
155 container_format: bare
156 disk_format: diskdump
157 id: 78262ee7-949e-4d70-af3a-85360c3de57a
160 5ed5a29b-292c-4fe0-b32c-2e2b65628635 ubuntu
161 container_format: bare
162 disk_format: diskdump
163 id: 5ed5a29b-292c-4fe0-b32c-2e2b65628635
166 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe Debian_Wheezy_Base
167 container_format: bare
168 disk_format: diskdump
169 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
173 * Get details for image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
174 [image]: info 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
175 name: Debian_Wheezy_Base
176 container_format: bare
177 disk_format: diskdump
178 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
181 owner: s0m3-u53r-1d (user@example.com)
182 DESCRIPTION: Debian Wheezy Base (Stable)
191 imagecompute (Compute/Cyclades)
192 -------------------------------
196 info Get detailed information on an image
198 modify Modify image properties (metadata)
199 delete Delete an image (WARNING: image file is also removed)
201 server (Compute/Cyclades)
202 -------------------------
206 info Detailed information on a Virtual Machine
207 modify Modify attributes of a virtual server
208 create Create a server (aka Virtual Machine)
209 list List virtual servers accessible by user
210 reboot Reboot a virtual server
211 start Start an existing virtual server
212 shutdown Shutdown an active virtual server
213 delete Delete a virtual server
214 console Create a VMC console and show connection information
215 wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
217 Showcase: Create a server
218 ^^^^^^^^^^^^^^^^^^^^^^^^^
220 .. code-block:: console
221 :emphasize-lines: 1,4,21,35,44,62
226 usage: create --name NAME --flavor-id FLAVOR_ID --image-id IMAGE_ID
227 [--personality PERSONALITY] [-h] [--config CONFIG] [--cloud CLOUD]
232 -v, --verbose More info at response
233 --personality PERSONALITY
234 add a personality file
235 -d, --debug Include debug output
236 -h, --help Show help message
237 -i, --include Include protocol headers in the output
238 --config CONFIG Path to configuration file
239 -s, --silent Do not output anything
240 --cloud CLOUD Chose a cloud to connect to
242 * List all available images *
243 [server]: /image compute list
244 1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
245 1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
246 18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
247 6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
248 6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
249 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
250 86bc2414-0fb3-4898-a637-240292243302 Fedora
251 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
252 b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
253 baf2321c-57a0-4a69-825d-49f49cea163a CentOS
254 c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
256 * See details of flavor with id 1 *
257 [server]: /flavor info 1
258 SNF:disk_template: drbd
265 * Create a debian server named 'My Small Debian Server'
266 [server]: create --name='My Small Debian Server' --flavor-id=1 --image-id=b2dffe52-64a4-48c3-8a4c-8214cc3165cf
267 adminPass: L8gu2wbZ94
268 created : 2012-11-23T16:56:04.190813+00:00
272 imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
276 name : My Small Debian Server
280 updated : 2012-11-23T16:56:04.761962+00:00
282 * wait for server to build (optional) *
284 Server 11687 still in BUILD mode ||||||||||||||||| | 80%
285 Server 11687 is now in ACTIVE mode
287 .. Note:: In kamaki shell, / is used to access commands from top-level
289 ip (Network/Cyclades)
290 ---------------------
294 info Get details on a floating IP
295 create Reserve an IP on a network
296 list List reserved floating IPs
297 delete Unreserve an IP (also delete the port, if attached)
298 attach Attach an IP on a virtual server
299 detach Detach an IP from a virtual server
301 port (Network/Cyclades)
302 -----------------------
306 info Get details about a port
308 create Create a new port (== connect server to network)
309 modify Modify the attributes of a port
310 delete Delete a port (== disconnect server from network)
311 wait Wait for port to finish [ACTIVE, DOWN, BUILD, ERROR]
313 Showcase: Reserve and attach IP to server
314 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
318 * Enter port context *
321 * Reserve an IP and see servers and networks*
327 [port]: /network list
331 * Attach IP to server
332 [port]: port create --device-id=43 --network-id=101 --ip-address=123.456.78.9 --wait
333 Creating new port 7 between server 43 and network 101
334 Port 7 still in BUILD mode ||||||||||||||||| | 80%
335 Port 7 is now in ACTIVE mode
337 .. Note:: In kamaki shell, / is used to access top-level command groups while
338 working in command group contexts
340 network (Network/Cyclades)
341 --------------------------
345 info Get details about a network
346 disconnect Disconnect a network from a device
347 modify Modify network attributes
348 create Create a new network
350 connect Connect a network with a device (server or router)
351 delete Delete a network
353 Showcase: Connect a network to a VM
354 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
356 .. code-block:: console
357 :emphasize-lines: 1,4,9,24,27,44
359 * Enter network context *
362 * List user-owned VMs *
363 [network]: /server list
364 11687 (My Small Debian Server)
365 11688 (An Ubuntu server)
367 * Try network-connect (to get help) *
370 usage: connect <network id> --device-id <DEVICE_ID> [-s] [-h] [-i] [--config CONFIG]
372 Connect a server to a network
374 Syntax: connect <server id> <network id>
375 --config : Path to configuration file
376 -d,--debug : Include debug output
377 -h,--help : Show help message
378 -i,--include: Include protocol headers in the output
379 -s,--silent : Do not output anything
380 -v,--verbose: More info at response
382 * Connect VM with id 11687 to network with id 1409
383 [network]: connect 11687 --device-id=1409 --wait
384 Creating port between network 1409 and server 11687
387 * Get details on network with id 1409
391 cidr : 192.168.1.0/24
393 created : 2012-11-23T17:17:20.560098+00:00
402 updated : 2012-11-23T17:18:25.095225+00:00
404 * Get connectivity details on VM with id 11687 *
405 [network]: /server info 11687 --nics
409 mac_address: aa:0f:c2:0b:0e:85
411 firewallProfile: DISABLED
413 ipv4 : 83.212.106.111
414 ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
415 mac_address : aa:0c:f2:12:0a:9e
418 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
420 container (Storage/Pithos+)
421 ---------------------------
425 info Get information about a container
426 modify Modify the properties of a container
427 create Create a new container
428 list List all containers, or their contents
429 empty Empty a container
430 delete Delete a container
432 group (Storage/Pithos+)
433 -----------------------
437 create Create a group of users
438 list List all groups and group members
439 delete Delete a user group
441 sharer (Storage/Pithos+)
442 ------------------------
446 info Details on a Pithos+ sharer account (default: current account)
447 list List accounts who share file objects with current user
449 file (Storage/Pithos+)
450 ----------------------
454 info Get information/details about a file
455 truncate Truncate remote file up to size
456 mkdir Create a directory
457 create Create an empty file
458 move Move objects, even between different accounts or containers
459 list List all objects in a container or a directory object
461 cat Fetch remote file contents
462 modify Modify the attributes of a file or directory object
463 append Append local file to (existing) remote object
464 download Download a remove file or directory object to local file system
465 copy Copy objects, even between different accounts or containers
466 overwrite Overwrite part of a remote file
467 delete Delete a file or directory object
469 Showcase: Upload and download a file
470 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
472 .. code-block:: console
473 :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
475 * Create a random binarry file at current OS path *
476 [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
479 20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
481 * Enter file context *
486 [file]: !ls -lh rndm_local.file
487 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
490 * Create two containers *
491 [file]: /container create mycont1
492 [file]: /container create mycont2
495 * List accessible containers *
496 [file]: /container list
497 1. mycont1 (0B, 0 objects)
498 2. mycont2 (0B, 0 objects)
499 3. pithos (0B, 0 objects)
500 4. trash (0B, 0 objects)
503 * Upload local file to 1st container *
504 [file]: upload /mycont1/rndm_local.file
507 * Check if file has been uploaded *
508 [file]: list /mycont1
509 1. 20M rndm_local.file
511 * Create directory mydir on second container *
512 [file]: mkdir /mycont2/mydir
514 * Move file from 1st to 2nd container (and in the directory) *
515 [file]: move /mycont1/rndm_local.file /mycont2/mydir/rndm_local.file
517 * Check contents of both containers *
518 [file]: list /mycont1
519 [file]: list /mycont2
521 2. 20M mydir/rndm_local.file
523 * Copy file from 2nd to 1st container, with a new name *
524 [file]: copy /mycont2/mydir/rndm_local.file /mycont1/rndm_remote.file
526 * Check pasted file *
527 [file]: list /mycont1
528 1. 20M rndm_remote.file
530 * Download pasted file to local file system *
531 [file]: download /mycont1/rndm_remote.file
532 Downloading: ||||||||||||||||| | 72%
534 * Check if file is downloaded and if it is the same to original *
535 [file]: !ls -lh *.file
536 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
537 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
538 [file]: !diff rndm_local.file rndm_remote.file
540 .. Note:: In kamaki shell, ! is used to execute OS shell commands (e.g., bash)