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 membership Project membership management commands
69 reinstate Reinstate a terminated project (special privileges needed)
71 quota (Account/Astakos)
72 -----------------------
77 info Get quota for a service (cyclades, pithos, astakos)
84 list List user resources
86 flavor (Compute/Cyclades)
87 -------------------------
91 info: Get flavor details
94 Showcase: show details for flavor with id 43
95 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97 .. code-block:: console
100 * Enter flavor context *
103 * Get details about flavor with id 43 *
105 SNF:disk_template: drbd
112 image (Image/Plankton)
113 ----------------------
117 info Get image metadata
118 list List images accessible by user
119 register (Re)Register an image file to an Image service
120 modify Add / update metadata and properties for an image
121 unregister Unregister an image (does not delete the image file)
123 Showcase: Pick an image and list the properties
124 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126 .. code-block:: console
127 :emphasize-lines: 1,4,18
129 * Enter image context *
132 * list all available images *
134 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
135 container_format: bare
136 disk_format: diskdump
137 id: 926ab1c5-2d85-49d4-aebe-0fce712789b9
140 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
141 container_format: bare
142 disk_format: diskdump
143 id: 78262ee7-949e-4d70-af3a-85360c3de57a
146 5ed5a29b-292c-4fe0-b32c-2e2b65628635 ubuntu
147 container_format: bare
148 disk_format: diskdump
149 id: 5ed5a29b-292c-4fe0-b32c-2e2b65628635
152 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe Debian_Wheezy_Base
153 container_format: bare
154 disk_format: diskdump
155 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
159 * Get details for image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
160 [image]: info 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
161 name: Debian_Wheezy_Base
162 container_format: bare
163 disk_format: diskdump
164 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
167 owner: s0m3-u53r-1d (user@example.com)
168 DESCRIPTION: Debian Wheezy Base (Stable)
177 imagecompute (Compute/Cyclades)
178 -------------------------------
182 info Get detailed information on an image
184 modify Modify image properties (metadata)
185 delete Delete an image (WARNING: image file is also removed)
187 server (Compute/Cyclades)
188 -------------------------
192 info Detailed information on a Virtual Machine
193 modify Modify attributes of a virtual server
194 create Create a server (aka Virtual Machine)
195 list List virtual servers accessible by user
196 reboot Reboot a virtual server
197 start Start an existing virtual server
198 shutdown Shutdown an active virtual server
199 delete Delete a virtual server
200 wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
202 Showcase: Create a server
203 ^^^^^^^^^^^^^^^^^^^^^^^^^
205 .. code-block:: console
206 :emphasize-lines: 1,4,21,35,44,62
211 usage: create --name NAME --flavor-id FLAVOR_ID --image-id IMAGE_ID
212 [--personality PERSONALITY] [-h] [--config CONFIG] [--cloud CLOUD]
217 -v, --verbose More info at response
218 --personality PERSONALITY
219 add a personality file
220 -d, --debug Include debug output
221 -h, --help Show help message
222 -i, --include Include protocol headers in the output
223 --config CONFIG Path to configuration file
224 -s, --silent Do not output anything
225 --cloud CLOUD Chose a cloud to connect to
227 * List all available images *
228 [server]: /image compute list
229 1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
230 1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
231 18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
232 6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
233 6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
234 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
235 86bc2414-0fb3-4898-a637-240292243302 Fedora
236 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
237 b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
238 baf2321c-57a0-4a69-825d-49f49cea163a CentOS
239 c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
241 * See details of flavor with id 1 *
242 [server]: /flavor info 1
243 SNF:disk_template: drbd
250 * Create a debian server named 'My Small Debian Server'
251 [server]: create --name='My Small Debian Server' --flavor-id=1 --image-id=b2dffe52-64a4-48c3-8a4c-8214cc3165cf
252 adminPass: L8gu2wbZ94
253 created : 2012-11-23T16:56:04.190813+00:00
257 imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
261 name : My Small Debian Server
265 updated : 2012-11-23T16:56:04.761962+00:00
267 * wait for server to build (optional) *
269 Server 11687 still in BUILD mode ||||||||||||||||| | 80%
270 Server 11687 is now in ACTIVE mode
272 .. Note:: In kamaki shell, / is used to access commands from top-level
274 ip (Network/Cyclades)
275 ---------------------
279 info Get details on a floating IP
280 create Reserve an IP on a network
281 list List reserved floating IPs
282 delete Unreserve an IP (also delete the port, if attached)
284 port (Network/Cyclades)
285 -----------------------
289 info Get details about a port
291 create Create a new port (== connect server to network)
292 modify Modify the attributes of a port
293 delete Delete a port (== disconnect server from network)
294 wait Wait for port to finish [ACTIVE, DOWN, BUILD, ERROR]
296 Showcase: Reserve and attach IP to server
297 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
301 * Enter port context *
304 * Reserve an IP and see servers and networks*
310 [port]: /network list
314 * Attach IP to server
315 [port]: port create --device-id=43 --network-id=101 --ip-address=123.456.78.9 --wait
316 Creating new port 7 between server 43 and network 101
317 Port 7 still in BUILD mode ||||||||||||||||| | 80%
318 Port 7 is now in ACTIVE mode
320 .. Note:: In kamaki shell, / is used to access top-level command groups while
321 working in command group contexts
323 network (Network/Cyclades)
324 --------------------------
328 info Get details about a network
329 disconnect Disconnect a network from a device
330 modify Modify network attributes
331 create Create a new network
333 connect Connect a network with a device (server or router)
334 delete Delete a network
336 Showcase: Connect a network to a VM
337 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
339 .. code-block:: console
340 :emphasize-lines: 1,4,9,24,27,44
342 * Enter network context *
345 * List user-owned VMs *
346 [network]: /server list
347 11687 (My Small Debian Server)
348 11688 (An Ubuntu server)
350 * Try network-connect (to get help) *
353 usage: connect <network id> --device-id <DEVICE_ID> [-s] [-h] [-i] [--config CONFIG]
355 Connect a server to a network
357 Syntax: connect <server id> <network id>
358 --config : Path to configuration file
359 -d,--debug : Include debug output
360 -h,--help : Show help message
361 -i,--include: Include protocol headers in the output
362 -s,--silent : Do not output anything
363 -v,--verbose: More info at response
365 * Connect VM with id 11687 to network with id 1409
366 [network]: connect 11687 --device-id=1409 --wait
367 Creating port between network 1409 and server 11687
370 * Get details on network with id 1409
374 cidr : 192.168.1.0/24
376 created : 2012-11-23T17:17:20.560098+00:00
385 updated : 2012-11-23T17:18:25.095225+00:00
387 * Get connectivity details on VM with id 11687 *
388 [network]: /server info 11687 --nics
392 mac_address: aa:0f:c2:0b:0e:85
394 firewallProfile: DISABLED
396 ipv4 : 83.212.106.111
397 ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
398 mac_address : aa:0c:f2:12:0a:9e
401 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
403 container (Storage/Pithos+)
404 ---------------------------
408 info Get information about a container
409 modify Modify the properties of a container
410 create Create a new container
411 list List all containers, or their contents
412 empty Empty a container
413 delete Delete a container
415 group (Storage/Pithos+)
416 -----------------------
420 create Create a group of users
421 list List all groups and group members
422 delete Delete a user group
424 sharer (Storage/Pithos+)
425 ------------------------
429 info Details on a Pithos+ sharer account (default: current account)
430 list List accounts who share file objects with current user
432 file (Storage/Pithos+)
433 ----------------------
437 info Get information/details about a file
438 truncate Truncate remote file up to size
439 mkdir Create a directory
440 create Create an empty file
441 move Move objects, even between different accounts or containers
442 list List all objects in a container or a directory object
444 cat Fetch remote file contents
445 modify Modify the attributes of a file or directory object
446 append Append local file to (existing) remote object
447 download Download a remove file or directory object to local file system
448 copy Copy objects, even between different accounts or containers
449 overwrite Overwrite part of a remote file
450 delete Delete a file or directory object
452 Showcase: Upload and download a file
453 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
455 .. code-block:: console
456 :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
458 * Create a random binarry file at current OS path *
459 [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
462 20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
464 * Enter file context *
469 [file]: !ls -lh rndm_local.file
470 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
473 * Create two containers *
474 [file]: /container create mycont1
475 [file]: /container create mycont2
478 * List accessible containers *
479 [file]: /container list
480 1. mycont1 (0B, 0 objects)
481 2. mycont2 (0B, 0 objects)
482 3. pithos (0B, 0 objects)
483 4. trash (0B, 0 objects)
486 * Upload local file to 1st container *
487 [file]: upload /mycont1/rndm_local.file
490 * Check if file has been uploaded *
491 [file]: list /mycont1
492 1. 20M rndm_local.file
494 * Create directory mydir on second container *
495 [file]: mkdir /mycont2/mydir
497 * Move file from 1st to 2nd container (and in the directory) *
498 [file]: move /mycont1/rndm_local.file /mycont2/mydir/rndm_local.file
500 * Check contents of both containers *
501 [file]: list /mycont1
502 [file]: list /mycont2
504 2. 20M mydir/rndm_local.file
506 * Copy file from 2nd to 1st container, with a new name *
507 [file]: copy /mycont2/mydir/rndm_local.file /mycont1/rndm_remote.file
509 * Check pasted file *
510 [file]: list /mycont1
511 1. 20M rndm_remote.file
513 * Download pasted file to local file system *
514 [file]: download /mycont1/rndm_remote.file
515 Downloading: ||||||||||||||||| | 72%
517 * Check if file is downloaded and if it is the same to original *
518 [file]: !ls -lh *.file
519 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
520 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
521 [file]: !diff rndm_local.file rndm_remote.file
523 .. Note:: In kamaki shell, ! is used to execute OS shell commands (e.g., bash)