Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Overview of contrail-ansible-deployer used in Contrail Command for Installing Contrail with Microservices Architecture

Contrail Release 5.0 introduces microservices architecture. This section provides an overview of using contrail-ansible-deployer used by The Contrail Command tool for installing Contrail Networking with a microservices architecture. For an introduction to Contrail microservices, refer to Introduction to 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 5.x with microservices architecture.

The contrail-ansible-deployer contains three plays:


This play provisions the operating system instances for hosting the containers, currently for these infrastructure providers:

  • kvm

  • gce

  • aws


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


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

Preparing to Install with Contrail

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


Make sure your system is operational with the following before installation with contrail-command-deployer.

  • CentOS 7.4, kernel >= 3.10.0-693.17.1

  • Ansible

  • 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 17.03.1-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

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

Supported Providers

The playbooks support installing Contrail 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:


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-hosted environment.

BMS Provider Example

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

AWS Provider Example

Use this example if you are in an Amazon Web Services 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, 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.

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 All-in-One Instance

The following example uses three AWS EC2 instances to deploy, and an all-in-one high availability setup with all roles and default parameters.

KVM Contrail Plane Instance

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

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.