Revision f23a5cdb docs/usage.rst

b/docs/usage.rst
1 1
Usage
2 2
=====
3 3

  
4
Kamaki offers two command line interfaces: an one-command tool and an interactive shell. Both systems implement exactly the same command specifications. More details on the exact command specifications can be found in `Command Line Interfaces' section under 'Commands`. This guide covers the generic usage of both interfaces.
4
Kamaki offers two command line interfaces: an one-command tool and an interactive shell. Both systems implement the exact same command specifications. A detailed list of the command specifications can be found in `Commands <commands.html>`_ section. This guide covers the generic usage of both interfaces.
5

  
6
What's more, kamaki offers a clients API that allows the developement of external applications for synnefo. The clients API is listed in the `Clients lib <clients.html>`_ section. The recomended method of utilizing this API is explained in the present.
7

  
8
Setup
9
-----
10

  
11
Kamaki interfaces rely on a list of configuration options. In the initial state, kamaki is configured to communicate with the Okenos IaaS. A detailed guide for setting up kamaki can be found in the `Setup <setup.rst>`_ section.
12

  
13
Quick guide
14
^^^^^^^^^^^
15

  
16
It is essential for users to get a configuration token (to get in Okeanos.grnet.gr log `here <https://accounts.okeanos.grnet.gr/im/>`_) and provide it to kamaki:
17

  
18
.. code-block:: console
19

  
20
    $ kamaki set token myt0k3n==
21

  
22

  
23
    Example 1.1.1: Set user token to myt0k3n==
24

  
25
To use the storage service, a user should also provide the username:
26

  
27
.. code-block:: console
28

  
29
    $ kamaki set account user@domain.com
30

  
31

  
32
    Example 1.1.2: Set user name to user@domain.com
33

  
34
Run as shell
35
""""""""""""
36
Call kamaki
37

  
38
* without any parameters or arguments
39

  
40
.. code-block:: console
41

  
42
    $ kamaki
43

  
44

  
45
    Example 1.2.1: Running kamaki shell
46

  
47

  
48
* with any kind of '-' prefixed arguments, except '-h', '--help'.
49

  
50
.. code-block:: console
51

  
52
    $ kamaki --config myconfig.file
53

  
54
   
55
    Example 1.2.2: Running kamaki shell with custom configuration file
56

  
57

  
58
Run as one-command
59
""""""""""""""""""
60
Call kamaki:
61

  
62
* with the '-h' or '--help' arguments (help for kamaki one-command)
63

  
64
.. code-block:: console
65

  
66
    $kamaki -h
67

  
68

  
69
    Example 1.3.1: Kamaki help
70

  
71
* with one or more command parameters:
72

  
73
.. code-block:: console
74

  
75
    $ kamaki server list
76

  
77

  
78
    Example 1.3.2: List VMs managed by user
79

  
80
Command parameters
81
""""""""""""""""""
82

  
83
Typically, commands consist of a group name (e.g. store for storage commands) one or more terms (e.g. list for listing) and the command specific parameters (e.g. the name of the container), if any.
84

  
85
.. code-block:: console
86

  
87
    $ kamaki store list mycontainer
88

  
89

  
90
    Example 1.4.1: List stored files in container mycontainer
91

  
92
E.g. in example 1.3.2, the group is "server", the command is "list" and there are no parameters. Example 6 is another example using the "server" command group.
93

  
94
.. code-block:: console
95

  
96
    $ kamaki server info 42
97

  
98

  
99
    Example 1.4.2: Show information about a user-managed VM with id 42
5 100

  
6 101
One-command interface
7 102
---------------------
8 103

  
104

  
9 105
Interactive shell
10 106
-----------------
107

  
108
Creating applications over the Clients API
109
------------------------------------------

Also available in: Unified diff