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 can have the form of an id
12 (e.g., `server delete <SERVER_ID>`) or a foreign key (e.g.,
13 `port create <NETWORK_ID> <DEVICE_ID>`)
15 The examples bellow showcase some commands. The kamaki-shell (check
16 `Usage section <usage.html#interactive-shell>`_ for details) is chosen as the
17 execution environment.
20 user (Identity/Astakos)
21 -----------------------
25 info Get info for (current) session user
26 uuid2name Get user name(s) from uuid(s)
27 authenticate Authenticate a user and get all authentication information
28 list List (cached) session users
29 add Authenticate user by token and add to kamaki session (cache)
30 name2uuid Get user uuid(s) from name(s)
31 select Select user from the (cached) list as current session user
32 delete Delete user (token) from the (cached) list of session users
34 Showcase: get user information
35 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37 In the following, cloud URL and TOKEN were set in a previous step (see
38 `setup section <setup.html>`_ or the
39 `quick setup guide <usage.html#quick-setup>`_)
41 .. code-block:: console
44 * Enter user context *
51 id: ab1cde23-45fg-6h7i-8j9k-10l1m11no2pq
61 info Get details for a project
62 unsuspend Resume a suspended project (special privileges needed)
63 suspend Suspend a project (special privileges needed)
64 list List all projects
65 create Apply for a new project
66 modify Modify a project
67 terminate Terminate a project (special privileges needed)
68 application Application management commands
69 membership Project membership management commands
70 reinstate Reinstate a terminated project (special privileges needed)
72 quota (Account/Astakos)
73 -----------------------
78 info Get quota for a service (cyclades, pithos, astakos)
85 list List user resources
87 flavor (Compute/Cyclades)
88 -------------------------
92 info: Get flavor details
95 Showcase: show details for flavor with id 43
96 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 .. code-block:: console
101 * Enter flavor context *
104 * Get details about flavor with id 43 *
106 SNF:disk_template: drbd
113 image (Image/Plankton)
114 ----------------------
118 info Get image metadata
119 list List images accessible by user
120 register (Re)Register an image file to an Image service
121 modify Add / update metadata and properties for an image
122 unregister Unregister an image (does not delete the image file)
124 Showcase: Pick an image and list the properties
125 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127 .. code-block:: console
128 :emphasize-lines: 1,4,18
130 * Enter image context *
133 * list all available images *
135 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
136 container_format: bare
137 disk_format: diskdump
138 id: 926ab1c5-2d85-49d4-aebe-0fce712789b9
141 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
142 container_format: bare
143 disk_format: diskdump
144 id: 78262ee7-949e-4d70-af3a-85360c3de57a
147 5ed5a29b-292c-4fe0-b32c-2e2b65628635 ubuntu
148 container_format: bare
149 disk_format: diskdump
150 id: 5ed5a29b-292c-4fe0-b32c-2e2b65628635
153 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe Debian_Wheezy_Base
154 container_format: bare
155 disk_format: diskdump
156 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
160 * Get details for image with id 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe *
161 [image]: info 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
162 name: Debian_Wheezy_Base
163 container_format: bare
164 disk_format: diskdump
165 id: 1f8454f0-8e3e-4b6c-ab8e-5236b728dffe
168 owner: s0m3-u53r-1d (user@example.com)
169 DESCRIPTION: Debian Wheezy Base (Stable)
178 imagecompute (Compute/Cyclades)
179 -------------------------------
183 info Get detailed information on an image
185 modify Modify image properties (metadata)
186 delete Delete an image (WARNING: image file is also removed)
188 server (Compute/Cyclades)
189 -------------------------
193 info Detailed information on a Virtual Machine
194 modify Modify attributes of a virtual server
195 create Create a server (aka Virtual Machine)
196 list List virtual servers accessible by user
197 reboot Reboot a virtual server
198 start Start an existing virtual server
199 shutdown Shutdown an active virtual server
200 delete Delete a virtual server
201 wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
203 Showcase: Create a server
204 ^^^^^^^^^^^^^^^^^^^^^^^^^
206 .. code-block:: console
207 :emphasize-lines: 1,4,21,35,44,62
212 usage: create --name NAME --flavor-id FLAVOR_ID --image-id IMAGE_ID
213 [--personality PERSONALITY] [-h] [--config CONFIG] [--cloud CLOUD]
218 -v, --verbose More info at response
219 --personality PERSONALITY
220 add a personality file
221 -d, --debug Include debug output
222 -h, --help Show help message
223 -i, --include Include protocol headers in the output
224 --config CONFIG Path to configuration file
225 -s, --silent Do not output anything
226 --cloud CLOUD Chose a cloud to connect to
228 * List all available images *
229 [server]: /image compute list
230 1395fdfb-51b4-419f-bb02-f7d632860611 Ubuntu Desktop LTS
231 1580deb4-edb3-4496-a27f-7a246c4c0528 Ubuntu Desktop
232 18a82962-43eb-4b32-8e28-8f8880af89d7 Kubuntu LTS
233 6aa6eafd-dccb-422d-a904-67fe2bdde87e Debian Desktop
234 6b5681e4-7502-46ae-b1e9-9fd837932095 maelstrom
235 78262ee7-949e-4d70-af3a-85360c3de57a Windows Server 2012
236 86bc2414-0fb3-4898-a637-240292243302 Fedora
237 926ab1c5-2d85-49d4-aebe-0fce712789b9 Windows Server 2008
238 b2dffe52-64a4-48c3-8a4c-8214cc3165cf Debian Base
239 baf2321c-57a0-4a69-825d-49f49cea163a CentOS
240 c1d27b46-d875-4f5c-b7f1-f39b5af62905 Kubuntu
242 * See details of flavor with id 1 *
243 [server]: /flavor info 1
244 SNF:disk_template: drbd
251 * Create a debian server named 'My Small Debian Server'
252 [server]: create --name='My Small Debian Server' --flavor-id=1 --image-id=b2dffe52-64a4-48c3-8a4c-8214cc3165cf
253 adminPass: L8gu2wbZ94
254 created : 2012-11-23T16:56:04.190813+00:00
258 imageRef : b2dffe52-64a4-48c3-8a4c-8214cc3165cf
262 name : My Small Debian Server
266 updated : 2012-11-23T16:56:04.761962+00:00
268 * wait for server to build (optional) *
270 Server 11687 still in BUILD mode ||||||||||||||||| | 80%
271 Server 11687 is now in ACTIVE mode
273 .. Note:: In kamaki shell, / is used to access commands from top-level
275 ip (Network/Cyclades)
276 ---------------------
280 info Get details on a floating IP
281 create Reserve an IP on a network
282 list List reserved floating IPs
283 delete Unreserve an IP (also delete the port, if attached)
285 port (Network/Cyclades)
286 -----------------------
290 info Get details about a port
292 create Create a new port (== connect server to network)
293 modify Modify the attributes of a port
294 delete Delete a port (== disconnect server from network)
295 wait Wait for port to finish [ACTIVE, DOWN, BUILD, ERROR]
297 Showcase: Reserve and attach IP to server
298 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
302 * Enter port context *
305 * Reserve an IP and see servers and networks*
311 [port]: /network list
315 * Attach IP to server
316 [port]: port create --device-id=43 --network-id=101 --ip-address=123.456.78.9 --wait
317 Creating new port 7 between server 43 and network 101
318 Port 7 still in BUILD mode ||||||||||||||||| | 80%
319 Port 7 is now in ACTIVE mode
321 .. Note:: In kamaki shell, / is used to access top-level command groups while
322 working in command group contexts
324 network (Network/Cyclades)
325 --------------------------
329 info Get details about a network
330 disconnect Disconnect a network from a device
331 modify Modify network attributes
332 create Create a new network
334 connect Connect a network with a device (server or router)
335 delete Delete a network
337 Showcase: Connect a network to a VM
338 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
340 .. code-block:: console
341 :emphasize-lines: 1,4,9,24,27,44
343 * Enter network context *
346 * List user-owned VMs *
347 [network]: /server list
348 11687 (My Small Debian Server)
349 11688 (An Ubuntu server)
351 * Try network-connect (to get help) *
354 usage: connect <network id> <device id> [-s] [-h] [-i] [--config CONFIG]
356 Connect a server to a network
358 Syntax: connect <server id> <network id>
359 --config : Path to configuration file
360 -d,--debug : Include debug output
361 -h,--help : Show help message
362 -i,--include: Include protocol headers in the output
363 -s,--silent : Do not output anything
364 -v,--verbose: More info at response
366 * Connect VM with id 11687 to network with id 1409
367 [network]: connect 11687 1409 --wait
368 Creating port between network 1409 and server 11687
371 * Get details on network with id 1409
375 cidr : 192.168.1.0/24
377 created : 2012-11-23T17:17:20.560098+00:00
386 updated : 2012-11-23T17:18:25.095225+00:00
388 * Get connectivity details on VM with id 11687 *
389 [network]: /server info 11687 --nics
393 mac_address: aa:0f:c2:0b:0e:85
395 firewallProfile: DISABLED
397 ipv4 : 83.212.106.111
398 ipv6 : 2001:648:2ffc:1116:a80c:f2ff:fe12:a9e
399 mac_address : aa:0c:f2:12:0a:9e
402 .. Note:: In kamaki shell, / is used to access top-level command groups while working in command group contexts
404 container (Storage/Pithos+)
405 ---------------------------
409 info Get information about a container
410 modify Modify the properties of a container
411 create Create a new container
412 list List all containers, or their contents
413 empty Empty a container
414 delete Delete a container
416 group (Storage/Pithos+)
417 -----------------------
421 create Create a group of users
422 list List all groups and group members
423 delete Delete a user group
425 sharer (Storage/Pithos+)
426 ------------------------
430 info Details on a Pithos+ sharer account (default: current account)
431 list List accounts who share file objects with current user
433 file (Storage/Pithos+)
434 ----------------------
438 info Get information/details about a file
439 truncate Truncate remote file up to size
440 mkdir Create a directory
441 create Create an empty file
442 move Move objects, even between different accounts or containers
443 list List all objects in a container or a directory object
445 cat Fetch remote file contents
446 modify Modify the attributes of a file or directory object
447 append Append local file to (existing) remote object
448 download Download a remove file or directory object to local file system
449 copy Copy objects, even between different accounts or containers
450 overwrite Overwrite part of a remote file
451 delete Delete a file or directory object
453 Showcase: Upload and download a file
454 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
456 .. code-block:: console
457 :emphasize-lines: 1,7,11,16,21,29,33,37,41,44,51,55,60,64
459 * Create a random binarry file at current OS path *
460 [kamaki]: !dd bs=4M if=/dev/zero of=rndm_local.file count=5
463 20971520 bytes (21 MB) copied, 0.016162 s, 1.3 GB/s
465 * Enter file context *
470 [file]: !ls -lh rndm_local.file
471 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
474 * Create two containers *
475 [file]: /container create mycont1
476 [file]: /container create mycont2
479 * List accessible containers *
480 [file]: /container list
481 1. mycont1 (0B, 0 objects)
482 2. mycont2 (0B, 0 objects)
483 3. pithos (0B, 0 objects)
484 4. trash (0B, 0 objects)
487 * Upload local file to 1st container *
488 [file]: upload /mycont1/rndm_local.file
491 * Check if file has been uploaded *
492 [file]: list /mycont1
493 1. 20M rndm_local.file
495 * Create directory mydir on second container *
496 [file]: mkdir /mycont2/mydir
498 * Move file from 1st to 2nd container (and in the directory) *
499 [file]: move /mycont1/rndm_local.file /mycont2/mydir/rndm_local.file
501 * Check contents of both containers *
502 [file]: list /mycont1
503 [file]: list /mycont2
505 2. 20M mydir/rndm_local.file
507 * Copy file from 2nd to 1st container, with a new name *
508 [file]: copy /mycont2/mydir/rndm_local.file /mycont1/rndm_remote.file
510 * Check pasted file *
511 [file]: list /mycont1
512 1. 20M rndm_remote.file
514 * Download pasted file to local file system *
515 [file]: download /mycont1/rndm_remote.file
516 Downloading: ||||||||||||||||| | 72%
518 * Check if file is downloaded and if it is the same to original *
519 [file]: !ls -lh *.file
520 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:36 rndm_local.file
521 -rw-rw-r-- 1 ******** ******** 20M Nov 26 15:42 rndm_remote.file
522 [file]: !diff rndm_local.file rndm_remote.file
524 .. Note:: In kamaki shell, ! is used to execute OS shell commands (e.g., bash)