Skip to content

Commit

Permalink
Merge pull request #1484 from AntonioSanch3z/patch-1
Browse files Browse the repository at this point in the history
Update gstarted.rst
  • Loading branch information
micafer authored May 9, 2023
2 parents 7943076 + c857142 commit 49fa556
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions doc/source/gstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,26 @@ See full reference in :ref:`IM client manual page <inv-client>`.
Authentication file
^^^^^^^^^^^^^^^^^^^
To access the IM service an authentication file must be created. It must have one line per authentication element.
**It must have at least one line with the authentication data for the IM service** and another one for the Cloud/s
provider/s the user want to access. In case of InfrastructureManager credentials you can use any user/password
**It must have at least one line with the authentication data for the IM service** and another one for each Cloud
provider the user wants to access. In case of InfrastructureManager credentials you can use any user/password
pair as the service is free to use by default).

An example to access an OpenNebula and/or an OpenStack site::

#auth.dat
id = im; type = InfrastructureManager; username = user; password = pass # mandatory
id = one; type = OpenNebula; host = osenserver:2633; username = user; password = pass
id = ost; type = OpenStack; host = https://ostserver:5000; username = user; password = pass; tenant = tenant

See all the options of the auth file are describe in section :ref:`auth-file`.
See all the options of the auth file described in section :ref:`auth-file`.

RADL basic example
^^^^^^^^^^^^^^^^^^^

Then the user must describe in a input file the cloud topology. It can be done in the IM native language (RADL) or
the TOSCA standard. In this first example we will so how to launch a single VM using RADL::
The user must describe in an input file the cloud topology. It can be done in the IM native language (RADL) or
the TOSCA standard. In this first example we will show how to launch a single VM using RADL::

#radlExample.radl
network net (outbound = 'yes')
system node (
cpu.count >= 2 and
Expand All @@ -50,9 +52,9 @@ the TOSCA standard. In this first example we will so how to launch a single VM u
)
deploy node 1

In this RADL user is requesting 1 VM with at least 2 CPUs and 2 GB of RAM connected with a public IP. Finally
In this RADL the user is requesting 1 VM with at least 2 CPUs and 2 GB of RAM connected with a public IP. Finally
the user must specify the image used to boot the VM with the field `disk.0.image.url`. In this URL the user must
specify an existing image on the cluod provider where VM will be launched. O.S. image URLs for different
specify an existing image on the Cloud provider where VM will be launched. O.S. image URLs for different
Cloud providers:

* **one://<server>:<port>/<image-id>**, for OpenNebula;
Expand All @@ -75,9 +77,10 @@ See full information about RADL language at :ref:`RADL section <radl>`
TOSCA basic example
^^^^^^^^^^^^^^^^^^^

In case of you want to use a TOSCA file to define a similar example to the previous RADL one the file
should be like that::
In case you want to use a TOSCA file to define a similar example to the previous RADL one, the file
will look like this::

#toscaExample.tosca
tosca_definitions_version: tosca_simple_yaml_1_0

imports:
Expand Down Expand Up @@ -116,36 +119,36 @@ You can see some input examples at
Basic IM Client usage
^^^^^^^^^^^^^^^^^^^^^

Now that we have the authentication file and the RADL input file we can create our first infrastructure using
Now that we have the authentication file and the RADL/TOSCA input file we can create our first infrastructure using
the IM client::

$ im_client.py -a auth.dat create input_file

By default this command expects the IM to be hosted on the `localhost` machine. If the server is located at other
By default this command expects the IM server to be hosted on the `localhost` machine. If the server is located at other
host you must specify the `-r` parameters to set the URL of the REST API::

$ im_client.py -a auth.dat create input_file -r https://im.egi.eu/im

To avoid putting this parameters on all the IM Cleint calls, create/edit the `im_client.cfg` file with the
To avoid putting this parameters on all the IM Client calls, create/edit the `im_client.cfg` file with the
default options to use. See all the options at the :ref:`IM client manual page <inv-client>`.

In this moment the IM client with contact the IM service to start the creation of the infrastructure. It will require
some time depending on the number of VMs or the cloud provider. Finally when all the VMs are created it will retun a
message like that::
In this moment the IM client will contact the IM service to start the creation of the infrastructure. It will require
some time depending on the number of VMs or the Cloud provider. Finally when all the VMs are created it will return a
message like the following::

Connected with: https://im.egi.eu/im
Infrastructure successfully created with ID: 573c4b0a-67d9-11e8-b75f-0a580af401da

In case of error in the creation of all the VMs it will return an error message describing the errors raised.
If only some of them fails it will return the ID and the user must check the status of the VMs and take the
corresponding decissions. To get the state of of the infrastructure call the `getstate` option of the client::
corresponding decisions. To get the state of the infrastructure, call the `getstate` option of the client::

$ im_client.py getstate 573c4b0a-67d9-11e8-b75f-0a580af401da

The infrastructure is in state: running
VM ID: 0 is in state: running.

You have to wait untill your infrastructure is the state `configured`. In the meanwhile you can get the output
You will have to wait until your infrastructure is in the `configured` state. In the meanwhile you can get the output
of the contextualization process to follow the status::

$ im_client.py getcontmsg 573c4b0a-67d9-11e8-b75f-0a580af401da
Expand All @@ -159,13 +162,13 @@ of the contextualization process to follow the status::
.

This message will show all the steps made by the IM to fully configure the VM including the outputs of all
Ansible processes. Then you can access via SSH the created VM with the command::
Ansible processes. Then you can access via SSH to the created VM with the command::

$ im_client.py ssh 573c4b0a-67d9-11e8-b75f-0a580af401da

And Enjoy you customized VM!!
And enjoy you customized VM!!

Finally to destroy the infrastructure and all the related resources call the `destroy` operation::
Finally to destroy the infrastructure and all related resources call the `destroy` operation::

$ im_client.py destroy 573c4b0a-67d9-11e8-b75f-0a580af401da

Expand Down

0 comments on commit 49fa556

Please sign in to comment.