Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Understanding contrail-ansible-deployer used in Contrail Command

This topic provides an overview of contrail-ansible-deployer used by Contrail Command tool. It is used for installing Contrail Networking with microservices architecture.

To understand Contrail microservices, refer to Understanding Contrail Microservices Architecture. For step by step procedure on how to install Contrail using Contrail Command deployer, refer to Installing Contrail Cluster using Contrail Command and instances.yml.

What is the contrail-ansible-deployer?

The contrail-ansible-deployer is a set of Ansible playbooks designed to deploy Contrail Networking with microservices architecture.

The contrail-ansible-deployer contains three plays:

playbooks/provision_instances.yml

This play provisions the operating system instances for hosting the containers. It supports the following infrastructure providers:

  • kvm.

  • gce.

  • aws.

playbooks/configure_instances.yml

This play configures the provisioned instances. The playbook installs software and configures the operating system to meet the required prerequisite standards. This is applicable to all providers.

playbooks/install_contrail.yml

This play pulls, configures, and starts the Contrail containers.

Preparing to Install with Contrail Command

This section helps you prepare your system before installing Contrail Networking using contrail-command-deployer.

Prerequisites

Make sure your system meets the following requirements before running contrail-command-deployer.

  • CentOS 7.6—Linux Kernel Version 3.10.0-957.12.1

  • Ansible 2.4.2.0.

  • Name resolution is operational for long and short host names of the cluster nodes, through either DNS or the host file.

  • Docker engine (tested version is 18.06.0-ce).

  • The docker-compose installed (tested version is 1.17.0).

  • The docker-compose Python library (tested version is 1.9.0).

  • If using Kubernetes (k8s), the tested version is 1.12

  • For high availability (HA), the time must be in sync between the cluster nodes.

  • The time must be synchronized between the cluster nodes using Network Time Protocol (ntp).

Supported Providers

The playbooks support installing Contrail Networking on the following providers:

  • bms—bare metal server.

  • kvm—kernel-based virtual machine (KVM)-hosted virtual machines.

  • gce—Google compute engine (GCE)-hosted virtual machines.

  • aws—Amazon Web Services (AWS)-hosted virtual machines.

Configure a Yaml File for Your Environment

The configuration for all three plays is contained in a single file, config/instances.yaml.

The configuration has multiple main sections, including:

The main sections of the config/instances.yaml file are described in this section. Using the sections that are appropriate for your system, configure each with parameters specific to your environment.

Provider Configuration

The section provider_config configures provider-specific settings.

KVM Provider Example

Use this example if you are in a kernel-based virtual machine (kvm) hosted environment.

Note:

Passwords are provided in this output for illustrative purposes only. We suggest using unique passwords in accordance with your organization’s security guidelines in your environment.

BMS Provider Example

Use this example if you are in a bare metal server (bms) environment.

Note:

Passwords are provided in this output for illustrative purposes only. We suggest using unique passwords in accordance with your organization’s security guidelines in your environment.

CAUTION:

SSH Host Identity Keys must be accepted or installed on the Deployer node before proceeding with Contrail installation.

To do so:

  • Make SSH connection to each target machine from the Deployer VM using Deployer user credentials and click Yes to accept the SSH Host Key.

    or

  • Set the environmental variable ANSIBLE_HOST_KEY_CHECKING value to False.

    or

  • Set [defaults] host_key_checking value to False in ansible.cfg file.

AWS Provider Example

Use this example if you are in an Amazon Web Services (AWS) environment.

GCE Provider Example

Use this example if you are in a Google Cloud environment.

Global Services Configuration

This section sets global service parameters. All parameters are optional.

Contrail Services Configuration

This section sets global Contrail service parameters. All parameters are optional.

For a complete list of parameters available for contrail_configuration.md, see Contrail Configuration Parameters for Ansible Deployer.

Kolla Services Configuration

If OpenStack Kolla is deployed, this section defines the parameters for Kolla.

Instances Configuration

Instances are the operating systems on which the containers will be launched. The instance configuration has a few provider-specific knobs. The instance configuration specifies which roles are installed on which instance. Additionally, instance-wide and role-specific Contrail and Kolla configurations can be specified, overwriting the parameters from the global Contrail and Kolla configuration settings.

KVM Contrail Plane Instance

The following example is a KVM-based instance only, installing Contrail control plane containers.

GCE Default All-in-One Instance

The following example is a very simple all-in-one GCE instance. It will install all Contrail roles and the Kubernetes master and node, using the default configuration.

AWS Default Three Node HA Instance

The following example uses three AWS EC2 instances to deploy a three node high availability setup with all roles and default parameters.

Installing a Contrail System

To perform a full installation of a Contrail system, refer to the installation instructions in: Installing Contrail Cluster using Contrail Command and instances.yml.