Vagrant

Installation

To get started with the vagrant provider, you need to install

You’ll also need a virtualization backend. EnOS supports both Virtualbox and Libvirt as shown below.

Then, refer to the Getting Started section to install Enos.

Basic Configuration

The provider relies on virtual machine sizes to group the wanted resources. For example the following is a valid configuration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
provider:
  type: vagrant
  backend: virtualbox
  box: generic/debian9
resources:
  extra-large:
    control: 1
  medium:
    network: 1
    compute: 1
inventory: inventories/inventory.sample
registry:
  type: internal
enable_monitoring: no
kolla_repo: "https://git.openstack.org/openstack/kolla-ansible"
kolla_ref: "stable/queens"
kolla:
  kolla_base_distro: "centos"
  kolla_install_type: "source"
  enable_heat: "no"
  nova_compute_virt_type: "qemu"

The list of the sizes may be found here.

By default virtualbox will be used. See below to learn how to change the default virtualbox backend.

Use libvirt as the backend for Vagrant

Declaring your provider options as the following will spin up virtual machines using libvirt. Note that vagrant libvirt must be installed on your system.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
provider:
  type: vagrant
  backend: libvirt
  box: generic/debian9
resources:
  extra-large:
    control: 1
  medium:
    network: 1
    compute: 1
inventory: inventories/inventory.sample
registry:
  type: internal
enable_monitoring: no
kolla_repo: "https://git.openstack.org/openstack/kolla-ansible"
kolla_ref: "stable/queens"
kolla:
  kolla_base_distro: "centos"
  kolla_install_type: "source"
  enable_heat: "no"
  nova_compute_virt_type: "qemu"

Use the advanced syntax

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

 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
---
provider:
  type: vagrant
  backend: libvirt
  box: generic/debian9
  resources:
    machines:
      - role: control
        flavor: extra-large
        number: 1
        networks: ['network_interface', 'neutron_external_interface']
      - role: compute
        flavor: medium
        number: 1
        networks: ['network_interface', 'neutron_external_interface']
      - role: network
        flavor: medium
        number: 1
        networks: ['network_interface', 'neutron_external_interface']
inventory: inventories/inventory.sample
registry:
  type: internal
enable_monitoring: no
kolla_repo: "https://git.openstack.org/openstack/kolla-ansible"
kolla_ref: "stable/queens"
kolla:
  kolla_base_distro: "centos"
  kolla_install_type: "source"
  enable_heat: "no"

Default Configuration

DEFAULT_CONFIG = {
    'backend': 'virtualbox',
    'box': 'generic/debian9',
    'user': 'root',
}