Virtual Machines on Grid’5000

It is possible to deploy virtual machines on top of bare nodes of Grid’5000. This hybrid approach is useful to take advantage of all resources available in each node. In this way several virtual machines with different roles can be coexist at the same time in a single node depending on the requirements. Actually, in the current implementation machines with different roles will not be colocalized (enoslib limitation) but several those with the same role can coexist. The provisioning of the virtual machines and their deployment is transparent to the user.

Basic configuration

The vmong5k provider relies on cluster names to group wanted resources in the same way the Grid’5000 provider does. It also take advantage of the virtual machine sizes of the Vagrant provider to describe resources.

Refer to the Getting Started section to install EnOS.

To access the Grid’5000 API, you must configure python-grid5000. Please refer to the corresponding documentation

The following is a valid resource 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: vmong5k
10  walltime: 01:00:00
11registry:
12  type: internal
13resources:
14  parapluie:
15    compute: 1
16    control: 1
17  paravance:
18    network: 1

Deployment

We suggest running the deployment from a dedicated node (specially for large deployments). To reserve a node prior the deployment and launch the deployment you can execute the commands after creating a valid configuration file and setting up the appropriate execution environment for EnOS:

frontend> oarsub -I -l 'walltime=2:00:00'
node> enos deploy

Default Provider Configuration

The provider comes with the following default options:

DEFAULT_CONFIG = {
    'type': 'vmong5k',      # Name of the provider
    'job_name': 'enos',     # Job name in oarstat/gant
    'walltime': '02:00:00'  # Reservation duration time
}

DEFAULT_FLAVOUR_BY_ROLE = {
    'control': 'extra-large',
    'network': 'large',
    'compute': 'medium'
}

These values be overridden in the configuration file.

Note

Some default values are implicit. They are the defaults from the other providers involved in the deployment and execution.

Advanced Configurations

A configuration equivalent to the basic one presented before shows a finer and more explicit definition of the resources:

 1enable_monitoring: false
 2inventory: inventories/inventory.sample
 3kolla:
 4  enable_heat: false
 5  kolla_base_distro: centos
 6  kolla_install_type: source
 7provider:
 8  image: /grid5000/virt-images/debian9-x64-base.qcow2
 9  job_name: enos-jenkins
10  resources:
11    machines:
12    - cluster: parapluie
13      flavour: medium
14      nodes: 1
15      roles:
16      - compute
17    - cluster: parapluie
18      flavour: extra-large
19      nodes: 1
20      roles:
21      - control
22    - cluster: paravance
23      flavour_desc:
24        core: 4
25        mem: 4096
26      nodes: 1
27      roles:
28      - network
29    networks:
30    - network_interface
31  type: vmong5k
32  walltime: 01:00:00
33registry:
34  type: internal

Other possibilities includes the customization of the topology, networking, etc. These options are described in Customizations and Network Emulation.

Note

The flavor of the resource can be set by name or using an inline description with flavour_desc as is the case of the network in the example.

Build an Image

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

In order to complete the image construction, after the execution of EnOS, a file with the same name of the virtual machine created during the enactment (for example: vm-ac28907433b45227ee0d784d24ac91fb-1-0) is located in the directory configured with the argument --directory (default ~/.enos). Rename this file and placed it in a permanent location visible on Grid’5000 such as ~/public/enos-openstack-image.qcow2, then the configuration can reuse that image setting the image as follows:

provider:
  type: vmong5k
  image: ~/public/enos-openstack-image.qcow2
  ...