Grid’5000

Quick start

To access the Grid’5000 API, you must configure python-grid5000. Roughly there is two possibilities. First, when you access to Grid’5000 from outside of it (e.g from your local workstation). In such a case, you need to specify the following configuration file:

$ echo '
username: MYLOGIN
password: MYPASSWORD
' > ~/.python-grid5000.yaml
$ chmod 600 ~/.python-grid5000.yaml

Second, when you access to the API from inside Grid’5000 (e.g., a Grid’5000 frontend). In such case, providing the username and password is unnecessary. The python-grid5000 lib only need to deal with SSL verification by specifying the path to the certificate to use:

$ echo '
verify_ssl: /etc/ssl/certs/ca-certificates.crt
' > ~/.python-grid5000.yaml

Note

You may want to refer to the installation section of python-grid5000 library to correctly configure your Grid’5000 connection information. See https://pypi.org/project/python-grid5000/

After that, ask Enos to create a new reservation.yaml file with the provider g5k. Then review the information in the file (especially, the walltime and cluster names for resources). And you are ready for the deployment of OpenStack.

$ enos new --provider=g5k
$ <editor> reservation.yaml  # optional
$ enos deploy

Note

On Grid’5000, we recommend to install Enos in a virtual environment. Refer to the Getting Started section for more information.

Grid’5000 tutorial

We provide a step-by-step tutorial explaining in details how to run Enos on Grid’5000: EnOS Tutorial on top of Grid’5000.

Provider configuration

The provider comes with the following default options:

DEFAULT_CONFIG = {
    'type': 'g5k',                   # Name of the provider
    'job_name': 'enos',              # Job name in oarstat/gant
    'walltime': '02:00:00',          # Reservation duration time
    'env_name': 'debian11-min',      # Environment to deploy (see `kaenv3 -l`)
    'job_type': 'deploy',            # deploy, besteffort, ...
    'queue': 'default'               # default, production, testing
}

They can be overriden in the configuration file.

Reservation

In order to reserve in advance the ressources needed by your deployment you can set the reservation key to the desired start date. And launch enos deploy.

# Reserve the 29. February 2020 at 19:00:00 for 14 hours
provider:
  type: g5k
  ...
  reservation: 2020-02-29 19:00:00
  walltime: 14:00:00
  ...

EnOS will wait for the job to start. You can keep the process running in the background (e.g using a screen). Alternatively you can stop it (once the reservation is done) and relaunch it later with the exact same configuration file. For this purpose you can leverage the -f options of EnOS.

Basic complete example

The provider relies on cluster names to group the wanted resources. For example the following is a valid resources description:

 1enable_monitoring: false
 2inventory: inventories/inventory.sample
 3kolla:
 4  enable_heat: false
 5  kolla_base_distro: centos
 6  kolla_install_type: source
 7provider:
 8  job_name: enos-jenkins
 9  type: g5k
10  walltime: 02:00:00
11registry:
12  type: external
13  ip: docker-cache.grid5000.fr
14  port: 80
15resources:
16  gros:
17    compute: 1
18    control: 1
19    network: 1

Deployment from a Grid’5000 node

If you want to run the deployment from within Grid’5000, we suggest you to run the deployment from a dedicated node (especially for large deployment). For now the recommended way to do so is to reserve one node prior to your reservation. In the case of an interactive deployment:

frontend$ oarsub -I -l 'walltime=2:00:00'
node$ source venv/bin/activate
node$ <edit configuration>
node$ enos deploy

Advanced example

The following is equivalent to the basic configuration but allows for a finer grained definition of the resources and associated roles.

 1inventory: inventories/inventory.sample
 2kolla:
 3  enable_heat: false
 4  kolla_base_distro: centos
 5  kolla_install_type: source
 6provider:
 7  job_name: enos-jenkins
 8  resources:
 9    machines:
10    - cluster: paravance
11      nodes: 1
12      primary_network: int-net
13      role: control
14      secondary_networks:
15      - ext-net
16    - cluster: paravance
17      nodes: 1
18      primary_network: int-net
19      role: compute
20      secondary_networks:
21      - ext-net
22    - cluster: paravance
23      nodes: 1
24      primary_network: int-net
25      role: network
26      secondary_networks:
27      - ext-net
28    networks:
29    - id: int-net
30      role: network_interface
31      site: rennes
32      type: kavlan
33    - id: ext-net
34      role: neutron_external_interface
35      site: rennes
36      type: kavlan
37  role_distribution: debug
38  type: g5k
39  walltime: 02:00:00
40registry:
41  type: internal

Building an Environment

A personalised environment stored in Grid’5000, containing all the dependencies to install OpenStack in subsequent deployments, may be built directly from command line on-the-fly without and intermediary deploy execution. Run the command enos build g5k, changing the default values accordingly (specially the --cluster one).

In order to complete the environment construction, after the execution of EnOS on the frontend execute the tgz-g5k command following the instructions of the Grid5000 documentation to finish the registration of the new environment.

Once the environment is registered in the database, the name of this environment can be used in the EnOS configuration replacing the default one. For example, let’s suppose we want to use a personalised environment named enos-debian10-x64-openstack, then the configuration can be set as follows:

provider:
  type: g5k
  env_name: enos-debian10-x64-openstack
  ...