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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
enable_monitoring: false
inventory: inventories/inventory.sample
kolla:
  enable_heat: false
  kolla_base_distro: centos
  kolla_install_type: source
kolla_ref: stable/stein
kolla_repo: https://git.openstack.org/openstack/kolla-ansible
provider:
  job_name: enos-jenkins
  type: vmong5k
  walltime: 01:00:00
registry:
  type: internal
resources:
  parapluie:
    compute: 1
    control: 1
  paravance:
    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 = {
    'job_name': 'enos-vmong5k',
    'walltime': '02:00:00'
}

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:

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