Commit b0c05399 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Update guides to comply with kamaki v0.12+


parent 9f37b42c
......@@ -643,7 +643,7 @@ image to Cyclades:
.. code-block:: console
$ kamaki image register --name="Debian Base" \
--location="pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump" \
--location=pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump \
--public \
--disk-format=diskdump \
--property OSFAMILY=linux --property ROOT_PARTITION=1 \
......@@ -2284,6 +2284,95 @@ though you may already have uploaded an Image on Pithos from a :ref:`previous
We will use the `kamaki <>`_
command line client to do the uploading and registering of the Image.
Installation of `kamaki`
You can install `kamaki` anywhere you like, since it is a standalone client of
the APIs and talks to the installation over `http`. For the purpose of this
guide we will assume that we have downloaded the `Debian Squeeze Base Image
<>`_ and stored it under node1's
``/srv/images`` directory. For that reason we will install `kamaki` on node1,
too. We do this by running:
.. code-block:: console
# apt-get install kamaki
Configuration of kamaki
Now we need to setup kamaki, by adding the appropriate URLs and tokens of our
installation. We do this by running:
.. code-block:: console
$ kamaki config set cloud.default.url \
$ kamaki config set cloud.default.token USER_TOKEN
Both the Authentication URL and the USER_TOKEN appear on the user's
`API access` web page on the Astakos Web UI.
You can see that the new configuration options have been applied correctly,
either by checking the editable file ``~/.kamakirc`` or by running:
.. code-block:: console
$ kamaki config list
A quick test to check that kamaki is configured correctly, is to try to
authenticate a user based on his/her token (in this case the user is you):
.. code-block:: console
$ kamaki user authenticate
The above operation provides various user information, e.g. UUID (the unique
user id) which might prove useful in some operations.
Upload an Image file to Pithos
Now, that we have set up `kamaki` we will upload the Image that we have
downloaded and stored under ``/srv/images/``. Although we can upload the Image
under the root ``Pithos`` container (as you may have done when uploading the
Image from the Pithos Web UI), we will create a new container called ``images``
and store the Image under that container. We do this for two reasons:
a) To demonstrate how to create containers other than the default ``Pithos``.
This can be done only with the `kamaki` client and not through the Web UI.
b) As a best organization practise, so that you won't have your Image files
tangled along with all your other Pithos files and directory structures.
We create the new ``images`` container by running:
.. code-block:: console
$ kamaki container create images
To check if the container has been created, list all containers of your
.. code-block:: console
$ kamaki file list /images
Then, we upload the Image file to that container:
.. code-block:: console
$ kamaki file upload /srv/images/debian_base-6.0-7-x86_64.diskdump /images
The first is the local path and the second is the remote container on Pithos.
Check if the file has been uploaded, by listing the container contents:
.. code-block:: console
$ kamaki file list /images
Alternatively check if the new container and file appear on the Pithos Web UI.
Register an existing Image file to Cyclades
......@@ -2296,8 +2385,14 @@ it to Cyclades, by running:
.. code-block:: console
$ kamaki image register "Debian Base" pithos:debian_base-6.0-x86_64 \
--metafile debian_base-6.0-x86_64.diskdump.meta --public
$ kamaki image register --name "Debian Base" \
--location /images/debian_base-6.0-11-x86_64.diskdump \
--public \
--disk-format=diskdump \
--property OSFAMILY=linux --property ROOT_PARTITION=1 \
--property description="Debian Squeeze Base System" \
--property size=451 --property kernel=2.6.32 --property GUI="No GUI" \
--property sortorder=1 --property USERS=root --property OS=debian
This command registers a Pithos file as an Image in Cyclades. This Image will
be public (``--public``), so all users will be able to spawn VMs from it.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment