Openstack

The OpenStack provider allows you to use Enos on an OpenStack cloud. In other words this lets you run OpenStack on OpenStack. In the following, the under-cloud is the underlying OpenStack infrastructure, the over-cloud is the OpenStack configured by Enos.

The over-cloud configured by Enos needs a set of resources to be present on the under-cloud. The first step in the deployment workflow consists in checking or creating such resources. Some resources are mandatory and must be present before the deployment (base image, keypairs, …), some others can be created or reused during the deployment (private networks). For the latter, you can use the default values set by the provider.

For specific under-clouds (e.g Chameleon), specific providers deriving from the OpenStack provider may be used. They will enforce more default values that fit the under-cloud specificities (e.g specific DNS, base image, …)

Installation

In addition refer to Getting Started, extra dependencies are required. You can install them with

pip install enos[openstack]

Basic Configuration

The provider relies on flavor names to group the wanted resources. The folliwing gives an idea of the resource description available.

provider:
  type: openstack
  <options see below>

resources:
  m1.medium:
    control: 1
    network: 1
  m1.small:
    compute: 10

Default provider configuration

The OpenStack provider is shipped with the following default options. These options will be set automatically and thus may be omitted in the configuration file.

DEFAULT_CONFIG = {
    "type": "openstack",

    # True if Enos needs to create a dedicated network to work with
    # False means you already have a network, subnet and router to
    # your ext_net configured
    "configure_network": True,

    # Name of the network to use or to create
    # It will be use as external network for the upper-cloud
    "network": {'name': 'enos-network'},

    # Name of the subnet to use or to create
    "subnet": {'name': 'enos-subnet', 'cidr': '10.87.23.0/24'},

    # DNS server to use when creating the network
    "dns_nameservers": ['8.8.8.8', '8.8.4.4'],

    # Floating ips pool
    "allocation_pool": {'start': '10.87.23.10', 'end': '10.87.23.100'},

    # Whether one machine must act as gateway
    # - False means that you can connect directly to all the machines
    # started by Enos
    # - True means that one machine will be assigned a floating ip and used
    # as gateway to the others
    "gateway": True,

    # MANDATORY OPTIONS
    'key_name': None,
    'image': None,
    'user': None
}

These options can be overriden in the provider config.

Deployment

Enos will interact with the remote OpenStack APIs. In order to get authenticated you must source your rc file. To use Enos on Openstack there are two distinct cases :

  • You have direct access to all your machines. You can set gateway: False

Hint

In this case, prior to the Enos deployment, you have probably started a machine to act as a frontend. This machine is in the same network as those used by Enos

  • You don’t have direct access to all your machines. You have to set gateway: True in the configuration. EnOS will use a freshly started server as a gateway to access the other nodes.

Chameleon Cloud (KVM)

This provider is an OpenStack based provider where some options are set to fit the folllowing platform :

Basic Configuration

As more default values can be enforced automatically, the following is a valid resources description.

 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
---
provider:
  type: chameleonkvm
  key_name: enos_matt
  gateway: true
resources:
  m1.medium:
    compute: 1
    network: 1
    control: 1

# This will describe the topology of your services
inventory: inventories/inventory.sample

registry:
  type: internal

# Enos Customizations
enable_monitoring: no

# Kolla parameters
kolla_repo: https://git.openstack.org/openstack/kolla-ansible
kolla_ref: stable/queens

# Vars : globals.yml
kolla:
  kolla_base_distro: centos
  kolla_install_type: source
  docker_namespace: beyondtheclouds
  enable_heat: no

Default provider configuration

The following options will be set automatically and thus may be omitted in the configuration file :

DEFAULT_CONFIG = {
    'type': 'chameleonkvm',
    'image': 'CC-Ubuntu16.04',
    'user': 'cc',
    'dns_nameservers': ['129.114.97.1',
                        '129.114.97.2',
                        '129.116.84.203']
}

These options can be overriden in the provider config.

Chameleon Cloud (Bare Metal)

This provider is an OpenStack based provider where some options are set to fit the following platforms :

The provider interacts with blazar to claim automatically a lease.

Basic Configuration

 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
---
provider:
  type: chameleonbaremetal
  key_name: enos_matt
  gateway: true
resources:
  compute_haswell:
    compute: 1
    network: 1
    control: 1

# This will describe the topology of your services
inventory: inventories/inventory.sample

registry:
  type: internal

# Enos Customizations
enable_monitoring: no

# Kolla parameters
kolla_repo: https://git.openstack.org/openstack/kolla-ansible
kolla_ref: stable/queens

# Vars : globals.yml
kolla:
  kolla_base_distro: centos
  kolla_install_type: source
  docker_namespace: beyondtheclouds
  enable_heat: no

Note that on Chameleon, they are two groups of machines : compute and storage.

Default provider configuration

The following options will be set automatically and thus may be omitted in the configuration file.

DEFAULT_CONFIG = {
    'type': 'chameleonbaremetal',
    # Name os the lease to use
    'lease_name': 'enos-lease',
    # Glance image to use
    'image': 'CC-Ubuntu16.04',
    # User to use to connect to the machines
    # (sudo will be used to configure them)
    'user': 'cc',
    # True iff Enos must configure a network stack for you
    'configure_network': False,
    # Name of the network to use or to create
    'network': {'name': 'sharednet1'},
    # Name of the subnet to use or to create
    'subnet': {'name': 'sharednet1-subnet'},
    # DNS server to use when creating network
    'dns_nameservers': ['130.202.101.6', '130.202.101.37'],
    # Experiment duration
    'walltime': '02:00:00',
}

These options can be overriden in the provider config.

Warning

A shared-network is used and may limit the features of the over-cloud (e.g floating ips)