Revision 904091dd docs/setup.rst

b/docs/setup.rst
11 11
Existing kamaki users should consult the
12 12
`migration guide <#migrating-from-kamaki-0-8-x-to-0-9>`_ first.
13 13

  
14
Kamaki has to be configured to use a specific Synnefo deployment.
15

  
16
Since Synnefo version 0.14, each deployment offers a single authentication
17
url, which has to be set as the default url for kamaki (Example 1.1).
14
Kamaki has to be configured to use a specific Synnefo deployment url and a user
15
token.
18 16

  
19 17
.. code-block:: console
20
    :emphasize-lines: 1, 2
21

  
22
    Example 1.1: Set https://astakos.example.com/astakos/identity/v2.0/ as the
23
    default single authentication url 
24 18
    
25
    $ kamaki config set remote.default.url https://astakos.example.com/astakos/identity/v2.0/
26

  
27
Kamaki also needs a user authentication token (Example 1.2).
28

  
29
.. code-block:: console
30
    :emphasize-lines: 1
31

  
32
    Example 1.2: Set user token to myt0k3n==
33

  
19
    $ kamaki config set remote.default.url <cloud-authentication-URL>
34 20
    $ kamaki config set remote.default.token myt0k3n==
35 21

  
22
Since Synnefo version 0.14, a synnefo cloud remote UI offers a single
23
authentication URL, which can to be set as the default URL for kamaki. All
24
service-specific URLs are now retrieved and handled automatically. Users of
25
synnefo clouds >= 0.14 are advised against using any service-specific URLs.
26

  
36 27
Migrating from kamaki 0.8.X to 0.9
37 28
----------------------------------
38 29

  
......
46 37
Existing kamaki users should convert their configuration files to v3. To do
47 38
that, kamaki 0.9 inspects the configuration file and suggests a list of config
48 39
file transformations, which are performed automatically on user permission.
49
This mechanism is invoked when the first API-releated kamaki command is fired.
50
We suggest the command of the example 2.1.
40
This mechanism is invoked when the first API-related kamaki command is fired.
41
We suggest the `user authenticate` command, as shown on example 2.1.
51 42

  
52 43
.. code-block:: console
53 44
    :emphasize-lines: 1
54 45

  
55
    Example 2.1: Try to authenticate user but convert config file instead
46
    Example 2.1: Convert config file while authenticating user "exampleuser"
56 47

  
57 48
    $ kamaki user authenticate
58 49
    Config file format version >= 3.0 is required
......
76 67
    Overwrite file /home/exampleuser/.kamakirc ? [Y, y]
77 68

  
78 69
At this point, we should examine the kamaki output. Most options are renamed to
79
be accessible by the new kamaki.
70
be understood by the new kamaki.
80 71

  
81 72
Let's take a look at the discarded options:
82 73

  
83
* global.account and user.account are not used anymore. The same is true for
84
    store.account and pithos.account which were ways to explicitly set a user
85
    account name to a pithos call. After the latest Synnefo evolutions, these
86
    features are meaningless and therefore omitted.
74
* `global.account` and `user.account` are not used anymore.
75
    The same is true for the synonyms `store.account` and `pithos.account`.
76
    These options were used to explicitly set a user account or uuid to a
77
    pithos call. In the latest Synnefo version (>= 0.14), these features are
78
    meaningless and therefore omitted.
87 79

  
88
* global.data_log option has never been a valid kamaki config option. In this
89
    example, the user accidentally mixed the terms "log_data" (which is a valid
90
    kamaki config option) with "data_log". To fix this, the user should set the
91
    correct option after the conversion is complete (Example 2.2)
80
* `global.data_log` option has never been a valid kamaki config option.
81
    In this example, the user accidentally misspelled the terms `log_data`
82
    (which is a valid kamaki config option) as `data_log`. To fix this, the
83
    user should set the correct option after the conversion is complete
84
    (Example 2.2).
92 85

  
93 86
Users should press *y* when they are ready. Kamaki has now modified the default
94 87
config file to conform with kamaki config file v3. Now users should rescue
......
101 94

  
102 95
    $ kamaki config set log_data on
103 96

  
104
In order to convert more files, users may run kamaki with the -c option
105
(Example 2.3) and apply the steps described above.
97
In order to convert more files, users may run kamaki with the -c option, which
98
runs kamaki with a different configuration file (Example 2.3) and apply the
99
steps described above.
106 100

  
107 101
.. code-block:: console
108 102
    :emphasize-lines: 1
......
111 105

  
112 106
    $ kamaki -c .myfilerc user authenticate
113 107

  
108
Multiple cloud remotes
109
----------------------
110

  
111
The following refers to users of multiple Synnefo and/or Open Stack
112
deployments. In the following, a Synnefo or Open Stack cloud deployment will
113
frequently be called as a **remote** or a **cloud remote**.
114

  
115
Kamaki supports accessing multiple cloud remotes from the same kamaki setup.
116
Bofore kamaki 0.9, this was possible only by using multiple config files. Since
117
0.9, kamaki supports multiple cloud remotes in the same configuration.
118

  
119
Each cloud remote corresponds to a Synnefo (or Open Stack) cloud deployment.
120
Since Synnefo version 0.14, each deployment offers a single point of
121
authentication, as an **authentication URL** and **token** pair. Users can
122
retrieve this information through the cloud UI.
123

  
124
Once a user has retrieved one URL/token pair per cloud remote, it is time to
125
assign a name to each cloud and let kamaki know about them.
126

  
127
For example, let the user have access to two remote clouds with the following authentication information ::
128

  
129
    cloud alias: devel
130
    authentication URL: https://devel.example.com/astakos/identity/v2.0/
131
    authentication token: myd3v3170k3n==
132

  
133
    cloud alias: testing
134
    autentication URL: https://testing.example.com/astakos/identity/v2.0/
135
    authentication token: my73571ng70k3n==
136

  
137
.. note:: the cloud alias is arbitrary and decided by the user. It is just a
138
    name to call a cloud setup in the kamaki context.
139

  
140
The user should let kamaki know about these setups:
141

  
142
.. code-block:: console
143

  
144
    $ kamaki config set remote.devel.url https://devel.example.com/astakos/identity/v2.0/
145
    $ kamaki config set remote.devel.token myd3v3170k3n==
146
    $
147
    $ kamaki config set remote.testing.url https://testing.example.com/astakos/identity/v2.0/
148
    $ kamaki config set remote.testing.token my73571ng70k3n==
149
    $
150

  
151
To check if all settings are loaded, a user may list all remotes, as shown
152
bellow:
153

  
154
.. code-block:: console
155

  
156
    $ kamaki config get remote
157
     remote.default.url = https://example.com/astakos.identity/v2.0/
158
     remote.default.url = myd3f4u1770k3n==
159
     remote.devel.url = https://devel.example.com/astakos/identity/v2.0/
160
     remote.devel.token = myd3v3170k3n==
161
     remote.testing.url = https://testing.example.com/astakos/identity/v2.0/
162
     remote.testing.token = my73571ng70k3n==
163
    $
164

  
165
or query kamaki for a specific cloud remote:
166

  
167
.. code-block:: console
168

  
169
    $ kamaki config get remote.devel
170
     remote.devel.url = https://devel.example.com/astakos/identity/v2.0/
171
     remote.devel.token = myd3v3170k3n==
172
    $
173

  
174
Now kamaki can use any of there remotes, with the **- - cloud** attribute. If
175
the **- - cloud** option is ommited, kamaki will query the `default` cloud remote.
176

  
177
One way to test this, is the `user athenticate` command:
178

  
179
.. code-block:: console
180

  
181
    $ kamaki --cloud=devel user authenticate
182
     ...
183
     user          : 
184
        id         :  725d5de4-1bab-45ac-9e98-38a60a8c543c
185
        name       :  Devel User
186
    $
187
    $ kamaki --cloud=testing user authenticate
188
     ...
189
     user          : 
190
        id         :  4ed5d527-bab1-ca54-89e9-c345c8a06a83
191
        name       :  Testing User
192
    $
193
    $ kamaki --cloud=default user authenticate
194
     ...
195
     user          : 
196
        id         :  4d3f4u17-u53r-4u7h-451n-4u7h3n7ic473
197
        name       :  Default User
198
    $
199
    $ kamaki user authenticate
200
     ...
201
     user          : 
202
        id         :  4d3f4u17-u53r-4u7h-451n-4u7h3n7ic473
203
        name       :  Default User
204
    $
205

  
206
In interactive cell, the cloud remote is picked when invoking the shell, with
207
the **- - cloud** option.
208

  
114 209
Optional features
115 210
-----------------
116 211

  
......
127 222
    * Allow unittests to run on kamaki.clients package
128 223
    * Needs mock version 1.X or better
129 224

  
225
* astakosclient
226
    * For advanced users mostly
227
    * Allows the use of a full astakos command line client
228

  
130 229
Any of the above features can be installed at any time before or after kamaki installation.
131 230

  
132 231
Configuration options
133 232
---------------------
134 233

  
135
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.
234
There are two kinds of configuration options:
136 235

  
137
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.
236
* kamaki-related (global)
237
    interface settings and constants of the kamaki internal mechanism, e.g.
238
    colors in the output, maximum threads per connection, custom logging or
239
    history files, etc.
138 240

  
139
Using multiple setups
140
^^^^^^^^^^^^^^^^^^^^^
241
* cloud-related (remote.XXX)
242
    information needed to connect and use one or more remote clouds. There are
243
    some mandatory options (url, token) and some advanced / optional (e.g.
244
    service-specific url overrides or versions)
141 245

  
142
Kamaki setups are stored in configuration files. By default, a Kamaki installation stores options in *.kamakirc* file located at the user home directory.
246
Kamaki comes with preset default values to all kamaki-releated configuration
247
options. Cloud-related information is not included in presets and should be
248
provided. Kamaki-related options can also be modified.
143 249

  
144
If a user needs to switch between different setups, Kamaki can explicitly load configuration files with the --config option:
250
There are two ways of managing configuration options: edit the config file or
251
use the kamaki config command.
252

  
253
Using multiple configuration files
254
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255

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

  
260

  
261
If a user needs to switch between different kamaki-related setups, Kamaki can
262
explicitly load configuration files with the **- - config** (or **- c**)
263
option:
145 264

  
146 265
.. code-block:: console
147 266

  
148 267
    $ kamaki --config <custom_config_file_path> [other options]
149 268

  
150
Using many different configuration files for different cloud services is encouraged.
269
.. note:: For access to multiple cloud remotes, users do NOT need to create
270
    multiple configuration files. Instead, we suggest using a single
271
    configuration file with multiple remote setups. More details can be found
272
    at the `multiple remotes guide <#multiple-cloud-remotes>`_.
151 273

  
152 274
Modifying options at runtime
153 275
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
156 278

  
157 279
.. code-block:: console
158 280

  
159
    $ kamaki file list -o global.account=anotheraccount -o global.token=aT0k3n==
160

  
161
will invoke *kamaki file list* with the specified options, but the initial global.account and global.token values will be restored to initial values afterwards.
281
    $ kamaki file list -o global.pithos_container=anothercontainer
162 282

  
163
.. note:: on-the-fly calls to file require users to explicetely provide the account uuid corresponding to this token. The account is actually the uuid field at the response of the following call::
164

  
165
    $kamaki user authenticate aT0k3n==
283
will invoke *kamaki file list* with the specified options, but the initial
284
global.pithos_container values will not be modified.
166 285

  
167 286
Editing options
168 287
^^^^^^^^^^^^^^^
......
173 292
    lists all configuration options currently used by a Kamaki installation
174 293

  
175 294
* kamaki config get <group.option>
176
    show the value of a specific configuration option. Options must be of the form group.option
295
    show the value of a specific configuration option. Options must be of the
296
    form *group.option*. The term *option* is equivalent to *global.option*
177 297

  
178 298
* kamaki config set <group.option> <value>
179
    set the group.option to value
299
    set the group.option to value. If no group is given, the defaults to
300
    *global*
180 301

  
181 302
* kamaki config delete <group.option>
182
    delete a configuration option
303
    delete a configuration option. If no group is given, the defaults to
304
    *global*
183 305

  
184 306
The above commands cause option values to be permanently stored in the Kamaki configuration file.
185 307

  
308
The commands above can also be used for **cloud remotes** handling, using the
309
`remote.` prefix. The remote handling cases are similar but with slightly
310
different semantics:
311

  
312
* kamaki config get remote[.<cloud alias>[.option]]
313
    * remote
314
        list all cloud remotes (including `default`) and their settings
315
    * remote.<cloud alias>
316
        list settings of the cloud remote aliased as <cloud alias>. If no
317
        special is configured, use the term `remote.default`
318
    * remote.<cloud alias>.<option>
319
        show the value of the specified option. If no special alias is
320
        configured, use `remote.default.<option>`
321

  
322
* kamaki config set remote.<cloud alias>.<option> <value>
323
    If the remote alias <cloud alias> does not exist, create it. Then, create
324
    (or update) the option <option> of this cloud remote, by setting its value
325
    to <value>.
326

  
327
* kamaki config delete remote.<cloud alias>[.<option>]
328
    * remote.<cloud alias>
329
        delete the cloud alias <cloud alias> and all its options
330
    * remote.<cloud alias>.<option>
331
        delete the <option> and its value from the cloud remote aliased as
332
        <cloud alias>
333

  
186 334
Editing the configuration file
187 335
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188 336

  
189 337
The configuration file is a simple text file that can be created by the user.
190 338

  
191
A simple way to create the configuration file is to set a configuration option using the kamaki config command. For example:
339
.. note:: users of kamaki < 0.9 can use kamaki 0.9.X to automatically convert
340
    their old configuration files to the new config file version (>= 3.0). To
341
    do this, follow `these instructions <#migrating-from-kamaki-0-8-x-to-0-9>`_
342
    
343
A simple way to create the configuration file is to set a configuration option
344
using the kamaki config command. For example:
192 345

  
193 346
.. code-block:: console
194 347

  
195
    $ kamaki config set token myT0k3N==
348
    $ kamaki config set global.log_file /home/exampleuser/logs/kamaki.log
196 349

  
197
In the above example, if the kamaki configuration file does not exist, it will be created with all the default values plus the *global.token* option set to *myT0k3n==* value.
350
In the above example, if the kamaki configuration file does not exist, it will
351
be created with all the default values plus the *global.log_file* option set to
352
`/home/exampleuser/logs/kamaki.log`
198 353

  
199 354
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::
200 355

  
201
    [file]
202
    url=https://okeanos.grnet.gr/pithos
203
    token=my0th3rT0k3n==
356
    [global]
357
    log_file = /home/exampleuser/logs/kamaki.log
358
    max_threads = 7
359
    colors = off
360

  
361
    [remote "default"]
362
    url =
363
    token =
364

  
365
A bunch of configuration options are created and set to their default options,
366
except the log_file option which is set to whatever the specified value.
204 367

  
205
two configuration options are created: *file.url* and *file.token*. These values will be loaded at every future kamaki execution.
368
The [remote "default"] section is special and is used to configure the default
369
cloud remote. Kamaki will not be able to run without setting the url and token
370
values to that section.
371

  
372
More cloud remotes can be created  on the side of the default remote, e.g
373
using the examples at the `multiple remotes guide <#multiple-cloud-remotes>`_::
374

  
375
    [remote "devel"]
376
    url = https://devel.example.com/astakos/identity/v2.0/
377
    token = myd3v3170k3n==
378

  
379
    [remote "testing"]
380
    url = https://testing.example.com/astakos/identity/v2.0/
381
    token = my73571ng70k3n==
206 382

  
207 383
Available options
208 384
^^^^^^^^^^^^^^^^^
209 385

  
210
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 token, url, cli. In case of conflict, the most specific options overrides the global ones.
386
The [global] group is treated by kamaki as a generic group for kamaki-related
387
settings, namely command cli specifications, the thread limit, console colors,
388
history and log files, log detail options and pithos-specific options.
211 389

  
212 390
* global.colors <on|off>
213 391
    enable / disable colors in command line based uis. Requires ansicolors, otherwise it is ignored
214 392

  
215
* global.token <user authentication token>
216

  
217 393
* global.log_file <logfile full path>
218 394
    set a custom location for kamaki logging. Default value is ~/.kamaki.log
219 395

  
......
221 397
    allow kamaki to log user tokens
222 398

  
223 399
* global.log_data <on|off>
224
    allow kamaki to log http data (by default, it logs only method, URL and headers)
225

  
226
* file.cli <UI command specifications for file>
227
    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.
400
    allow kamaki to log http data (by default, it logs only method, URL and
401
    headers)
228 402

  
229
* file.url <OOS storage or Pithos+ service url>
230
    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.
403
* global.file_cli <UI command specifications for file>
404
    a special package that is used to load storage commands to kamaki UIs.
405
    Don't touch this unless if you know what you are doing.
231 406

  
232
* file.token <token>
233
    it set, it overrides possible global.token option for file level commands
407
* global.cyclades_cli <UI command specifications for cyclades>
408
    a special package that is used to load cyclades commands to kamaki UIs.
409
    Don't touch this unless you know what you are doing.
234 410

  
235
* compute.url <OOS compute or Cyclades service url>
236
    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.
411
* global.flavor_cli <UI command specifications for VM flavors>
412
    a special package that is used to load cyclades VM flavor commands to
413
    kamaki UIs. Don't touch this unless you know what you are doing.
237 414

  
238
* cyclades.cli <UI command specifications for cyclades>
239
    a special package that is used to load cyclades commands to kamaki UIs. Don't touch this unless you know what you are doing.
415
* global.network_cli <UI command specifications for virtual networks>
416
    a special package that is used to load cyclades virtual network commands to
417
    kamaki UIs. Don't touch this unless you know what you are doing.
240 418

  
241
* flavor.cli <UI command specifications for VM flavors>
242
    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.
243

  
244
* network.cli <UI command specifications for virtual networks>
245
    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.
246

  
247
* image.url <Plankton image service url>
248
    the url of the Plankton service. Set to Okeanos.grnet.gr Plankton service by default. Users should set a different value if they need to use a different service. Note that the *image compute* commands are depended on the compute.url instead.
249

  
250
* image.cli <UI command specifications for Plankton (and Compute) image service>
419
* global.image_cli <UI command specs for Plankton or Compute image service>
251 420
    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.
252 421

  
253
* user.url <Astakos authentication service url>
254
    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.
255

  
256
* user.cli <UI command specifications for Astakos authentication service>
257
    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.
422
* global.user_cli <UI command specs for Astakos authentication service>
423
    a special package that is used to load astakos-related commands to kamaki
424
    UIs. Don't touch this unless you know what you are doing.
258 425

  
259
* history.file <history file path>
260
    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
426
* global.history_file <history file path>
427
    the path of a simple file for inter-session kamaki history. Make sure
428
    kamaki is executed in a context where this file is accessible for reading
429
    and writing. Kamaki automatically creates the file if it doesn't exist
261 430

  
262 431
Additional features
263 432
^^^^^^^^^^^^^^^^^^^
264 433

  
265
Log file location
266
"""""""""""""""""
267

  
268
Kamaki log file path is set by the following command::
269

  
270
    $ kamaki config set log_file <logfile path>
271

  
272
By default, kamaki logs at ~/.kamaki.log
273

  
274
When initialized, kamaki attempts to open one of these locations for writing, in the order presented above and uses the first accessible for appending logs. If the log_file option is set, kamaki prepends the value of this option to the logfile list, so the custom location will be the first one kamaki will attetmpt to log at.
275

  
276
Kamaki will not crush if the logging location is not accessible.
277

  
278
Richer connection logs
279
""""""""""""""""""""""
280

  
281
Kamaki logs down the http requests and responses in /var/log/kamaki/clients.log (make sure it is accessible). The request and response data and user authentication information is excluded from the logs be default. The former may render the logs unreadable and the later are sensitive information. Users my activate data and / or token logging my setting the global options log_data and log_token respectively::
282

  
283
    $ kamaki config set log_data on
284
    $ kamaki config set log_token on
285

  
286
Either or both of these options may be switched off either by setting them to ``off`` or by deleting them.
287

  
288
    $ kamaki config set log_data off
289
    $ kamaki config delete log_token
290

  
291
Set custom thread limit
292
"""""""""""""""""""""""
293

  
294
Some operations (e.g. download and upload) may use threaded http connections for better performance. Kamaki.clients utilizes a sophisticated mechanism for dynamically adjusting the number of simultaneous threads running, but users may wish to enforce their own upper thread limit. In that case, the max_threads option may be set to the configuration file::
295

  
296
    $ kamaki config set max_threads 3
297

  
298
If the value is not a positive integer, kamaki will ignore it and a warning message will be logged.
299

  
300 434
The livetest suite
301 435
""""""""""""""""""
302 436

  
303
Kamaki contains a live test suite for the kamaki.clients API, where "live" means that the tests are performed against active services that up and running. The live test package is named "livetest", it is accessible as kamaki.clients.livetest and it is designed to check the actual relation between kamaki and synnefo services.
437
Kamaki contains a live test suite for the kamaki.clients API, where "live"
438
means that the tests are performed against active services that up and running.
439
The live test package is named "livetest", it is accessible as kamaki.clients.
440
livetest and it is designed to check the actual relation between kamaki and
441
synnefo services.
304 442

  
305 443
The livetest suite can be activated with the following option on the configuration file::
306 444

  
307
    [livetest]
308
    cli=livetest
445
    [global]
446
    livetest_cli=livetest
447

  
448
or with this kamaki command::
309 449

  
310
In most tests, livetest will run as long as an Astakos identity manager service is accessible and kamaki is set up to authenticate a valid token on this server.
450
    kamaki config set livetest_cli livetest
311 451

  
312
In specific, a setup file needs at least the following mandatory settings in the configuration file:
452
In most tests, livetest will run as long as the default remote is configured
453
correctly. Some commands, though, need some extra settings related to the cloud
454
the test is performed against, or the example files used in kamaki.
313 455

  
314
* If authentication information is used for default kamaki clients::
456
Here is a list of settings needed:
315 457

  
316
    [user]
317
    url=<Astakos Identity Manager URL>
318
    token=<A valid user token>
458
* for all tests::
459
    * livetest.testremote = <the cloud alias this test will run against>
319 460

  
320
* else if this authentication information is only for testing add this under [livetest]::
461
* for astakos client::
462
    * livetest.astakos_details = <A file with an authentication output>
463
        To create this file, pipeline the output of an authentication command
464
        with the -j option for raw jason output
321 465

  
322
    user_url=<Astakos Identity Manager URL>
323
    user_token=<A valid user token>
466
        .. code-block:: console
324 467

  
325
Each service tested in livetest might need some more options under the [livetest] label, as shown bellow:
468
            $ kamaki user authenticate -j > astakos.details
326 469

  
327
* kamaki livetest astakos::
470
    * livetest.astakos_name = <The exact "real" name of testing user>
471
    * livetest.astakos_id = <The valid unique user id of the testing user>
328 472

  
329
    astakos_email = <The valid email of testing user>
330
    astakos_name = <The exact "real" name of testing user>
331
    astakos_username = <The username of the testing user>
332
    astakos_uuid = <The valid unique user id of the testing user>
473
* for image client:
474
    * livetest.image_details = <A file with the image's metadata>
475
        To create this file, pipeline the output of an image metadata command
476
        with the -j option for raw jason output
333 477

  
334
* kamaki livetest pithos::
478
        .. code-block:: console
335 479

  
336
    astakos_uuid = <The valid unique user id of the testing user>
480
            $ kamaki image meta <img id> -j > img.details
337 481

  
338
* kamaki livetest cyclades / image::
482
    * livetest.image_id = <A valid image id used for testing>
483
    * livetest.image_local_path = <The local path of the testing image>
339 484

  
340
    image_id = <A valid image id used for testing>
341
    image_local_path = <The local path of the testing image>
342
    image_details = <A text file containing testing image details in a python dict>
485
* for flavors (part of the compute client):
486
    * livetest.flavor_details = <A file with the flavor details>
487
        To create this file, pipeline the output of a flavor info command
488
        with the -j option for raw jason output
343 489

  
344
    - example image.details content:
345
    {
346
        u'id': u'b3e68235-3abd-4d60-adfe-1379a4f8d3fe',
347
        u'metadata': {
348
            u'values': {
349
                u'description': u'Debian 6.0.6 (Squeeze) Base System',
350
                u'gui': u'No GUI',
351
                u'kernel': u'2.6.32',
352
                u'os': u'debian',
353
                u'osfamily': u'linux',
354
                u'root_partition': u'1',
355
                u'sortorder': u'1',
356
                u'users': u'root'
357
            }
358
        },
359
        u'name': u'Debian Base',
360
        u'progress': u'100',
361
        u'status': u'ACTIVE',
362
        u'created': u'2012-11-19T14:54:57+00:00',
363
        u'updated': u'2012-11-19T15:29:51+00:00'
364
    }
490
        .. code-block:: console
365 491

  
366
    flavor_details = <A text file containing the testing images' flavor details in a python dict>
492
            $ kamaki flavor info <flavor id> -j > flavor.details
367 493

  
368
    - example flavor.details content:
369
    {
370
        u'name': u'C1R1drbd',
371
        u'ram': 1024,
372
        u'id': 1,
373
        u'SNF:disk_template': u'drbd',
374
        u'disk': 20,
375
        u'cpu': 1
376
    }
377 494

  
378 495
After setup, kamaki can run all tests::
379 496

  
......
390 507
The unit testing system
391 508
"""""""""""""""""""""""
392 509

  
393
Kamaki container a set of finegrained unit tests for the kamaki.clients package. This set is not used when kamaki is running. Instead, it is aimed to developers who debug or extent the kamaki clients library. For more information, check the `Going Agile <developers/extending-clients-api.html#going-agile>`_ entry at the `developers section <developers/extending-clients-api.html>`_.
510
Kamaki container a set of finegrained unit tests for the kamaki.clients
511
package. This set is not used when kamaki is running. Instead, it is aimed to
512
developers who debug or extent the kamaki clients library. For more
513
information, check the
514
`Going Agile <developers/extending-clients-api.html#going-agile>`_ entry at the
515
`developers section <developers/extending-clients-api.html>`_.

Also available in: Unified diff