Statistics
| Branch: | Tag: | Revision:

root / docs / setup.rst @ 329753ae

History | View | Annotate | Download (7.4 kB)

1
Setup
2
=====
3

    
4
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

    
6
Requirements
7
------------
8

    
9
* python 2.6 or better
10

    
11
* snf-common 0.10 or better
12

    
13
The snf-common package is part of the Synnefo project of the Greek Research and Development Network and is available from the same official sources as Kamaki (e.g. http://apt.dev.grnet.gr ).
14

    
15
Optional features
16
-----------------
17

    
18
* ansicolors
19
    * Make command line / console user interface responses pretier with text formating (colors, bold, etc.)
20
    * Can be switched on/off in kamaki configuration file: colors=on/off
21
    * Installation: pip install ansicolors
22

    
23
* progress 
24
    * Attach progress bars to various kamaki commands (e.g. kamaki store upload)
25
    * Installation: pip install progressbar
26
    * Since version 0.6.1 kamaki "requires" progress version 1.0.2 or better
27

    
28
Any of the above features can be installed at any time before or after kamaki installation.
29

    
30
Configuration options
31
---------------------
32

    
33
Kamaki comes with preset default values to all configuration options. All vital configurion 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.
34

    
35
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.
36

    
37
Using multiple setups
38
^^^^^^^^^^^^^^^^^^^^^
39

    
40
Kamaki setups are stored in configuration files. By default, a Kamaki installation stores options in *.kamakirc* file located at the user home directory.
41

    
42
If a user needs to switch between different setups, Kamaki can explicitely load configuration files with the --config option:
43

    
44
*kamaki --config <custom_config_file_path> [other options]*
45

    
46
Using many different configuration files for different cloud services is encouraged.
47

    
48
Modifying options at runtime
49
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50

    
51
All kamaki commands can be used with the -o option in order to overide configuration options at runtime. For example:
52

    
53
*kamaki store list -o global.account=anotheraccount -o global.token=aT0k3n==*
54

    
55
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.
56

    
57
Editing options
58
^^^^^^^^^^^^^^^
59

    
60
Kamaki config command allows users to see and manage all configuration options.
61

    
62
* kamaki config list
63
    lists all configuration options currently used by a Kamaki installation
64

    
65
* kamaki config get <group.option>
66
    show the value of a specific configuration option. Options must be of the form group.option
67

    
68
* kamaki config set <group.option> <value>
69
    set the group.option to value
70

    
71
* kamaki config delete <group.option>
72
    delete a configuration option
73

    
74
The above commands cause option values to be permanently stored in the Kamaki configuration file.
75

    
76
Editing the configuration file
77
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78

    
79
The configuration file is a simple text file that can be created by the user.
80

    
81
A simple way to create the configuration file is to set a configuration option using the kamaki config command. For example:
82

    
83
*kamaki config set account myusername@mydomain.com*
84

    
85
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.
86

    
87
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:
88

    
89
*[store]*
90
*url=https://okeanos.grnet.gr/pithos*
91
*account=myaccount@mydomain.com*
92

    
93
two configuration options are created: *store.url* and *store.account*. These values will be loaded at every future kamaki execution.
94

    
95
Available options
96
^^^^^^^^^^^^^^^^^
97

    
98
The [global] group is treated by kamaki as a generic group for arbitrary options, and it is used as a supergroup 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.
99

    
100
* global.colors <on|off>
101
    enable/disable colors in command line based uis. Requires ansicolors, otherwise it is ignored
102

    
103
* global.account <account name>
104
    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
105

    
106
* global.token <user authentication token>
107

    
108
* store.cli <UI command specifications for store>
109
    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.
110

    
111
* store.url <OOS storage or Pithos+ service url>
112
    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.
113

    
114
* store.account <account name>
115
    if set, it overrides possible global.account option for store level commands.
116

    
117
* compute.url <OOS compute or Cyclades service url>
118
    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.
119

    
120
* cyclades.cli <UI command specifications for cyclades>
121
    a special package that is used to load cyclades commands to kamaki UIs. Don't touch this unless you know what you are doing.
122

    
123
* flavor.cli <UI command specifications for VM flavors>
124
    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.
125

    
126
* network.cli <UI command specifications for virtual networks>
127
    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.
128

    
129
* image.url <Glance image service url>
130
    the url of the Glance service. Set to Okeanos.grnet.gr Plankton service be default. Users should set a different value if they need to use a different service.
131

    
132
* image.cli <UI command specifications for Glance and Cyclades image service>
133
    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.
134

    
135
* astakos.url <Astakos authentication service url>
136
    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.
137

    
138
* astakos.cli <UI command specifications for Astakos authentication service>
139
    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.
140

    
141
Hidden features
142
^^^^^^^^^^^^^^^
143

    
144
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

    
146
[test]
147
cli=test_cli
148

    
149
After that, users can run "kamaki test" commands to unittest the prepackaged client APIs. Unittests 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.