Statistics
| Branch: | Tag: | Revision:

root / docs / setup.rst @ d88ba587

History | View | Annotate | Download (7.6 kB)

1 85e3803d Stavros Sachtouris
Setup
2 85e3803d Stavros Sachtouris
=====
3 0c24b26b Stavros Sachtouris
4 85e3803d Stavros Sachtouris
Kamaki is easy to install from source or as a package. Some ui features are optional and can be install separately. Kamaki behavior can be configured in the kamaki config file.
5 0c24b26b Stavros Sachtouris
6 0c24b26b Stavros Sachtouris
Optional features
7 0c24b26b Stavros Sachtouris
-----------------
8 0c24b26b Stavros Sachtouris
9 961e6040 Stavros Sachtouris
For installing any all of the following, consult the `kamaki installation guide <installation.html#install-progress-and-or-ansicolors-optional>`_
10 961e6040 Stavros Sachtouris
11 0c24b26b Stavros Sachtouris
* ansicolors
12 7536c9bf Stavros Sachtouris
    * Make command line / console user interface responses prettier with text formating (colors, bold, etc.)
13 0c24b26b Stavros Sachtouris
    * Can be switched on/off in kamaki configuration file: colors=on/off
14 0c24b26b Stavros Sachtouris
15 329753ae Stavros Sachtouris
* progress 
16 329753ae Stavros Sachtouris
    * Attach progress bars to various kamaki commands (e.g. kamaki store upload)
17 329753ae Stavros Sachtouris
    * Since version 0.6.1 kamaki "requires" progress version 1.0.2 or better
18 0c24b26b Stavros Sachtouris
19 0c24b26b Stavros Sachtouris
Any of the above features can be installed at any time before or after kamaki installation.
20 0c24b26b Stavros Sachtouris
21 0c24b26b Stavros Sachtouris
Configuration options
22 0c24b26b Stavros Sachtouris
---------------------
23 0c24b26b Stavros Sachtouris
24 7536c9bf Stavros Sachtouris
Kamaki comes with preset default values to all configuration options. All vital configuration options are set to use the okeanos.grnet.gr cloud services. User information is not included and should be provided either through the kamaki config command or by editing the configuration file.
25 0c24b26b Stavros Sachtouris
26 85e3803d Stavros Sachtouris
Kamaki configuration options are vital for correct Kamaki behavior. An incorrect option may render some command groups dysfunctional. There are two ways of managing configuration options: edit the config file or use the kamaki config command.
27 0c24b26b Stavros Sachtouris
28 0c24b26b Stavros Sachtouris
Using multiple setups
29 0c24b26b Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^
30 0c24b26b Stavros Sachtouris
31 0c24b26b Stavros Sachtouris
Kamaki setups are stored in configuration files. By default, a Kamaki installation stores options in *.kamakirc* file located at the user home directory.
32 0c24b26b Stavros Sachtouris
33 7536c9bf Stavros Sachtouris
If a user needs to switch between different setups, Kamaki can explicitly load configuration files with the --config option:
34 0c24b26b Stavros Sachtouris
35 03d661d8 Stavros Sachtouris
.. code-block:: console
36 03d661d8 Stavros Sachtouris
37 03d661d8 Stavros Sachtouris
    $ kamaki --config <custom_config_file_path> [other options]
38 0c24b26b Stavros Sachtouris
39 0c24b26b Stavros Sachtouris
Using many different configuration files for different cloud services is encouraged.
40 0c24b26b Stavros Sachtouris
41 0c24b26b Stavros Sachtouris
Modifying options at runtime
42 0c24b26b Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 0c24b26b Stavros Sachtouris
44 7536c9bf Stavros Sachtouris
All kamaki commands can be used with the -o option in order to override configuration options at runtime. For example::
45 0c24b26b Stavros Sachtouris
46 03d661d8 Stavros Sachtouris
.. code-block:: console
47 03d661d8 Stavros Sachtouris
48 03d661d8 Stavros Sachtouris
    $ kamaki store list -o global.account=anotheraccount -o global.token=aT0k3n==
49 0c24b26b Stavros Sachtouris
50 329753ae Stavros Sachtouris
will invoke *kamaki store list* with the specified options, but the initial global.account and global.token values will be restored to initial values afterwards.
51 0c24b26b Stavros Sachtouris
52 0c24b26b Stavros Sachtouris
Editing options
53 0c24b26b Stavros Sachtouris
^^^^^^^^^^^^^^^
54 0c24b26b Stavros Sachtouris
55 0c24b26b Stavros Sachtouris
Kamaki config command allows users to see and manage all configuration options.
56 0c24b26b Stavros Sachtouris
57 0c24b26b Stavros Sachtouris
* kamaki config list
58 0c24b26b Stavros Sachtouris
    lists all configuration options currently used by a Kamaki installation
59 0c24b26b Stavros Sachtouris
60 0c24b26b Stavros Sachtouris
* kamaki config get <group.option>
61 0c24b26b Stavros Sachtouris
    show the value of a specific configuration option. Options must be of the form group.option
62 0c24b26b Stavros Sachtouris
63 0c24b26b Stavros Sachtouris
* kamaki config set <group.option> <value>
64 0c24b26b Stavros Sachtouris
    set the group.option to value
65 0c24b26b Stavros Sachtouris
66 329753ae Stavros Sachtouris
* kamaki config delete <group.option>
67 0c24b26b Stavros Sachtouris
    delete a configuration option
68 0c24b26b Stavros Sachtouris
69 0c24b26b Stavros Sachtouris
The above commands cause option values to be permanently stored in the Kamaki configuration file.
70 0c24b26b Stavros Sachtouris
71 0c24b26b Stavros Sachtouris
Editing the configuration file
72 0c24b26b Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 0c24b26b Stavros Sachtouris
74 329753ae Stavros Sachtouris
The configuration file is a simple text file that can be created by the user.
75 0c24b26b Stavros Sachtouris
76 03d661d8 Stavros Sachtouris
A simple way to create the configuration file is to set a configuration option using the kamaki config command. For example:
77 03d661d8 Stavros Sachtouris
78 03d661d8 Stavros Sachtouris
.. code-block:: console
79 0c24b26b Stavros Sachtouris
80 03d661d8 Stavros Sachtouris
    $ kamaki config set account myusername@mydomain.com
81 0c24b26b Stavros Sachtouris
82 0c24b26b Stavros Sachtouris
In the above example, if the kamaki configuration file does not exist, it will be created with all the default values plus the *global.account* option set to *myusername@mydomain.com* value.
83 0c24b26b Stavros Sachtouris
84 7536c9bf Stavros Sachtouris
The configuration file is formatted so that it can be parsed by the python ConfigParser module. It consists of command sections that are denoted with brackets. Every section contains variables with values. For example::
85 0c24b26b Stavros Sachtouris
86 7536c9bf Stavros Sachtouris
    [store]
87 7536c9bf Stavros Sachtouris
    url=https://okeanos.grnet.gr/pithos
88 7536c9bf Stavros Sachtouris
    account=myaccount@mydomain.com
89 0c24b26b Stavros Sachtouris
90 0c24b26b Stavros Sachtouris
two configuration options are created: *store.url* and *store.account*. These values will be loaded at every future kamaki execution.
91 0c24b26b Stavros Sachtouris
92 0c24b26b Stavros Sachtouris
Available options
93 0c24b26b Stavros Sachtouris
^^^^^^^^^^^^^^^^^
94 0c24b26b Stavros Sachtouris
95 7536c9bf Stavros Sachtouris
The [global] group is treated by kamaki as a generic group for arbitrary options, and it is used as a super-group for vital Kamaki options, namely account, token, url, cli. This feature does not work for types of configuration options. For example if global.account option is set and store.account option is not set, store services will use the global.account option instead. In case of conflict, the most specific options override the global ones.
96 0c24b26b Stavros Sachtouris
97 0c24b26b Stavros Sachtouris
* global.colors <on|off>
98 7536c9bf Stavros Sachtouris
    enable / disable colors in command line based uis. Requires ansicolors, otherwise it is ignored
99 0c24b26b Stavros Sachtouris
100 0c24b26b Stavros Sachtouris
* global.account <account name>
101 85e3803d Stavros Sachtouris
    the username or user email that is user to connect to the cloud service. It can be omitted if provided as a service-specific option
102 0c24b26b Stavros Sachtouris
103 85e3803d Stavros Sachtouris
* global.token <user authentication token>
104 0c24b26b Stavros Sachtouris
105 0c24b26b Stavros Sachtouris
* store.cli <UI command specifications for store>
106 0c24b26b Stavros Sachtouris
    a special package that is used to load storage commands to kamaki UIs. Don't touch this unless if you know what you are doing.
107 0c24b26b Stavros Sachtouris
108 0c24b26b Stavros Sachtouris
* store.url <OOS storage or Pithos+ service url>
109 0c24b26b Stavros Sachtouris
    the url of the OOS storage or Pithos+ service. Set to Okeanos.grnet.gr Pithos+ storage service by default. Users should set a different value if they need to use a different storage service.
110 0c24b26b Stavros Sachtouris
111 0c24b26b Stavros Sachtouris
* store.account <account name>
112 85e3803d Stavros Sachtouris
    if set, it overrides possible global.account option for store level commands.
113 0c24b26b Stavros Sachtouris
114 0c24b26b Stavros Sachtouris
* compute.url <OOS compute or Cyclades service url>
115 0c24b26b Stavros Sachtouris
    the url of the OOS compute or Cyclades service. Set to Okeanos.grnet.gr Cyclades IaaS service by default. Users should set a different value if they need to use a different IaaS service.
116 0c24b26b Stavros Sachtouris
117 0c24b26b Stavros Sachtouris
* cyclades.cli <UI command specifications for cyclades>
118 0c24b26b Stavros Sachtouris
    a special package that is used to load cyclades commands to kamaki UIs. Don't touch this unless you know what you are doing.
119 0c24b26b Stavros Sachtouris
120 0c24b26b Stavros Sachtouris
* flavor.cli <UI command specifications for VM flavors>
121 0c24b26b Stavros Sachtouris
    a special package that is used to load cyclades VM flavor commands to kamaki UIs. Don't touch this unless you know what you are doing.
122 0c24b26b Stavros Sachtouris
123 0c24b26b Stavros Sachtouris
* network.cli <UI command specifications for virtual networks>
124 0c24b26b Stavros Sachtouris
    a special package that is used to load cyclades virtual network commands to kamaki UIs. Don't touch this unless you know what you are doing.
125 0c24b26b Stavros Sachtouris
126 d88ba587 Stavros Sachtouris
* image.url <Plankton image service url>
127 d88ba587 Stavros Sachtouris
    the url of the Plankton service. Set to Okeanos.grnet.gr Plankton service be default. Users should set a different value if they need to use a different service.
128 0c24b26b Stavros Sachtouris
129 d88ba587 Stavros Sachtouris
* image.cli <UI command specifications for Plankton and Cyclades image service>
130 0c24b26b Stavros Sachtouris
    a special package that is used to load image-related commands to kamaki UIs. Don't touch this unless you know what you are doing.
131 0c24b26b Stavros Sachtouris
132 0c24b26b Stavros Sachtouris
* astakos.url <Astakos authentication service url>
133 0c24b26b Stavros Sachtouris
    the url of the Astakos authentication service. Set to the Okeanos.grnet.gr Astakos service by default. Users should set a different value if they need to use a different service.
134 0c24b26b Stavros Sachtouris
135 0c24b26b Stavros Sachtouris
* astakos.cli <UI command specifications for Astakos authentication service>
136 329753ae Stavros Sachtouris
    a special package that is used to load astakos-related commands to kamaki UIs. Don't touch this unless you know what you are doing.
137 329753ae Stavros Sachtouris
138 a6370d73 Stavros Sachtouris
* history.file <history file path>
139 7536c9bf Stavros Sachtouris
    the path of a simple file for inter-session kamaki history. Make sure kamaki is executed in a context where this file is accessible for reading and writing. Kamaki automatically creates the file if it doesn't exist
140 a6370d73 Stavros Sachtouris
141 329753ae Stavros Sachtouris
Hidden features
142 329753ae Stavros Sachtouris
^^^^^^^^^^^^^^^
143 329753ae Stavros Sachtouris
144 03d661d8 Stavros Sachtouris
Since version 0.6.1 kamaki contains a test suite for the kamaki.clients API. The test suite can be activated with the following option on the configuration file::
145 329753ae Stavros Sachtouris
146 03d661d8 Stavros Sachtouris
    [test]
147 03d661d8 Stavros Sachtouris
    cli=test_cli
148 329753ae Stavros Sachtouris
149 7536c9bf Stavros Sachtouris
After that, users can run "kamaki test" commands to unit-test the prepackaged client APIs. Unit-tests are still experimental and there is a high probability of false alarms due to some of the expected values being hard-coded in the testing code.