Skip to content

Provision Contrail 4.0.1 (Ocata Openstack Containers) on a single node all in one cluster using Server Manager Lite

Ramprakash Ram Mohan edited this page Oct 13, 2017 · 21 revisions

Build Information

This Wiki describes the process involved in bringing up an All-in-One Contrail Cluster based on Openstack Docker Containers (Ocata). This Wiki is based on Contrail 4.0.2.0 of Server Manager. Please refer to the "Known Issues" section below for any manual workarounds required for this build.

Server Manager Lite Overview

Server Manager Lite is a "no-frills" version of Server Manager. Except for reimage, rest of the functionality is same as Server Manager.

User can choose any server/node to install SM Lite. There are multiple options to run SM Lite as given below.

  • a single node (or VM) to provision contrail, then user might install SM Lite on the same node and perform contrail provisioning.
  • a separate node (or VM) to install SM Lite, and provision contrail with the rest of nodes.
  • choose a node (or VM) which might have contrail roles to install SM Lite (typically config node)

Note:

If you are installing SM lite on a VM spawned from Horizon or any other VM spawned from Ubuntu cloud image please follow the below steps

Verify that the VM has been setup correctly with the correct hostname/domain details. For this domain name should be present in /etc/hosts and /etc/resolv.conf. Examples are below:

/etc/hosts has to have a line:

<Host non mgmt IP> <server hostname>.<domain_name> <server hostname>

/etc/resolv.conf has to have a line:

search <domain_name>

"hostname -f" should return < hostname >.< domain_name >

SM Lite Node Requirements for Ocata Containers

  • Ubuntu 16.04.2
  • Two or more interfaces when using Contrail 4.0.1.0 (neutron_server hijacks the interface that is given as neutron_external_interface). Contrail 4.0.2.0 can work with a single interface.

SM installer

Use regular contrail-server-manager-installer debian package. Example package is contrail-server-manager-installer_4.0.1.0-13~ocata_all.deb

dpkg –i </github-build/R4.0/<build_number>/ubuntu-16-04/ocata/artifacts/contrail-server-manager-installer_4.0.1.0-<build-number>~ocataa_all.deb>

SM-Lite install/provision

Help:
`/opt/contrail/contrail_server_manager/provision_containers.sh -h`  
    -h --help
    -c|--contrail-package <pkg>
    -d|--default-domain <domain name>
    -ni|--no-install-sm-lite
    -cp|--cleanup-puppet-agent
    -j|--json
    -t|--testbed <testbed.py>
    -swp|--sm-webui-port
    -ip|--hostip
    -cid|--cluster-id <cluster-id>
    -sku|--sku <openstack-sku>

-ni option is used to reprovision an existing cluster, create a new cluster, or upgrade an existing cluster with a different version.

-sku option MUST be used to provision Ocata containers

** NOTE: There is no testbed.py support to provision Ocata

Use the following command to begin provisioning /opt/contrail/contrail_server_manager/provision_containers.sh -j <json_file> -ip <server_manager_ip> -sku ocata

NOTE: SMlite's provisioning logs can be seen at /var/log/contrail-server-manager/debug.log

provision_containers.sh tool tasks are -

  1. Install sm-lite (includes sm client, sm webui, sm monitoring/inventory)
  2. Prepare the targets for provision by running preconfig.py script on them
  3. Add server manager objects - cluster, server, image - from the JSONs or Testbed.py provided
  4. The docker containers get loaded and pushed to registry in the background
  5. Once this is done, issue contrail provision using server-manager client cli

When provision is successful, the openstack environment variables can be found in /etc/kolla/admin-openrc.sh file on the open stack node. This file needs to be sourced before open stack commands can be executed.

The sample JSONS are provided below:

For details on the parameters inside the "kolla_globals" section, please refer to descriptions for each parameter in this file

Sample JSONs for all-in-one multi-interface node (Contrail 4.0.1.0)

Sample JSONs for all-in-one single-interface node (Contrail 4.0.2.0)

Sample JSONs for a Multi-Node Contrail-HA cluster - Use the cluster and image sections to craft your combined JSON file required for SMLite

Sample JSONs for a Multi-Node Contrail-HA and Openstack-HA cluster - Use the cluster and image sections to craft your combined JSON file required for SMLite

Known issues:

  • Bug 1716297 - This bug will only be seen when the SMLite node also hosts the "openstack" role. Following is the workaround to get past this issue:
  1. server-manager provision --cluster_id <image_id> --tasks=openstack_destroy
  2. reboot the SMLite node
  3. server-manager provision --cluster_id <image_id>
Clone this wiki locally