Skip to content

Manually provisioning contrail networking docker container package

sgurumurthy edited this page Sep 25, 2017 · 124 revisions

Table of Contents

  1. Topology
  2. Manual steps to deploy Contrail containers
  3. Manual steps to provision vrouter in the compute node
  4. Manual steps to provision neutron-plugin in the Openstack node
  5. Appendix

Topology

Manual steps to deploy Contrail containers

The following are the steps to manually provision the contrail networking docker container package You need to be in the 'root' user mode to perform the steps given below

  1. Install the docker-engine package. You can follow the steps given in the following page.

    Ubuntu:
    https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository

    Redhat:
    https://docs.docker.com/engine/installation/linux/rhel/

  2. contrail-networking-docker_4.1.0.0-61_trusty.tgz contains contrail-docker-images_4.1.0.0-61.tgz.

    tar -xzvf contrail-networking-docker_4.1.0.0-61_trusty.tgz

    Get the controller, analytics and analyticsdb container packages by untar'ing the contrail-docker-images_4.1.0.0-61.tgz

tar -xzvf contrail-docker-images_4.1.0.0-61.tgz

You will get the below files after untar'ing

contrail-controller-ubuntu14.04-4.1.0.0-61.tar.gz 
contrail-analytics-ubuntu14.04-4.1.0.0-61.tar.gz 
contrail-analyticsdb-ubuntu14.04-4.1.0.0-61.tar.gz
  1. Load the docker image
docker load -i /root/contrail-controller-ubuntu14.04-4.1.0.0-61.tar.gz
docker load -i /root/contrail-analytics-ubuntu14.04-4.1.0.0-61.tar.gz 
docker load -i /root/contrail-analyticsdb-ubuntu14.04-4.1.0.0-61.tar.gz  
  1. Create the /etc/contrailctl directory and and configure the following files
/etc/contrailctl/controller.conf
/etc/contrailctl/analytics.conf
/etc/contrailctl/analyticsdb.conf

controller.conf sample (This is sample with 3 controller instance HA)

[GLOBAL]
cloud_orchestrator = openstack
controller_nodes = 192.168.1.252,192.168.1.253,192.168.1.254
analytics_nodes  = 192.168.1.252,192.168.1.253,192.168.1.254
[KEYSTONE]
ip = 172.16.70.30
admin_password = contrail123

The full controller.conf sample is here: controller.conf full sample

analytics.conf sample (This is sample with 3 analytics instance HA)

[GLOBAL]
cloud_orchestrator = openstack
controller_nodes  = 192.168.1.252,192.168.1.253,192.168.1.254
analytics_nodes   = 192.168.1.252,192.168.1.253,192.168.1.254
analyticsdb_nodes = 192.168.1.252,192.168.1.253,192.168.1.254
[KEYSTONE]
ip = 172.16.70.30
admin_password = contrail123

The full analytics.conf sample is here: analytics.conf full sample

analyticsdb.conf sample (This is sample with 3 analyticsdb instance HA)

[GLOBAL]
cloud_orchestrator = openstack
controller_nodes = 192.168.1.252,192.168.1.253,192.168.1.254
analyticsdb_nodes = 192.168.1.252,192.168.1.253,192.168.1.254
analytics_nodes = 192.168.1.252,192.168.1.253,192.168.1.254
[KEYSTONE]
ip = 172.16.70.30
admin_password = contrail123

The full analyticsdb.conf sample is here: analyticsdb.conf full sample

  1. Run the docker image
docker run --net=host --cap-add=AUDIT_WRITE --privileged --env='CLOUD_ORCHESTRATOR=openstack' --name=contrail-controller --volume=/etc/contrailctl:/etc/contrailctl -itd <docker_image_id>

docker run --net=host --cap-add=AUDIT_WRITE --privileged --env='CLOUD_ORCHESTRATOR=openstack' --name=contrail-analytics --volume=/etc/contrailctl:/etc/contrailctl -itd <docker_image_id>

docker run --net=host --cap-add=AUDIT_WRITE --privileged --env='CLOUD_ORCHESTRATOR=openstack' --name=contrail-analyticsdb --volume=/etc/contrailctl:/etc/contrailctl -itd <docker_image_id>

Command for listing docker image : docker images

  1. Check if the containers are running Issue the 'docker ps' command
root@host05:/etc/contrailctl# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               
NAMES
f7cee96eb387        0a3a117841b6        "/bin/sh -c /entrypoi"   5 seconds ago       Up 4 seconds                            
contrail-controller
a71e918cf808        5fe9d6c6bc88        "/bin/sh -c /entrypoi"   45 seconds ago      Up 45 seconds                           
contrail-analytics
7429bc460e75        c2361c35bb56        "/bin/sh -c /entrypoi"   55 seconds ago      Up 54 seconds                           
contrail-analyticsdb

Manual steps to provision vrouter in the compute node

  1. The following packages needs to be installed first
Ubuntu:
    apt-get install contrail-vrouter-dkms
    apt-get install contrail-vrouter-agent
    apt-get install contrail-utils
    apt-get install contrail-vrouter-common
    apt-get install contrail-vrouter-init
    apt-get install contrail-nodemgr

Redhat:
    yum -y install contrail-vrouter-common contrail-vrouter contrail-vrouter-init
  1. Run the 'contrail-compute-setup' command as given in the link to provision vrouter-kernel mode successfully: contrail-compute-setup command

  2. Reboot the node

reboot

Manual steps to provision neutron-plugin in the Openstack node (where neutron-server is running)

1. Install Contrail Neutron plugin packages
   Ubuntu:  
       apt-get install neutron-plugin-contrail  

   Redhat:
       yum -y install neutron-plugin-contrail python-contrail contrail-heat python-neutron-lbaas
  1. Configure the /etc/default/neutron-server configuration file with the following
NEUTRON_PLUGIN_CONFIG="/etc/neutron/plugins/opencontrail/ContrailPlugin.ini"
  1. Configure the /etc/neutron/plugins/opencontrail/ContrailPlugin.ini (sample one below)
[APISERVER]
#Put the lb server ip
api_server_ip = 192.168.1.16
api_server_port = 8082
multi_tenancy = True

[KEYSTONE]
admin_user = admin
admin_password = password
admin_tenant_name = admin
auth_url = http://192.168.1.241:5000/v2.0
  1. Configure the following configurations in the /etc/neutron/neutron.conf
api_extensions_path=extensions:/usr/lib/python2.7/site-
packages/neutron_plugin_contrail/extensions:/usr/lib/python2.7/site-packages/neutron_lbaas/extensions 

core_plugin=neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCoreV2

service_plugins=neutron_plugin_contrail.plugins.opencontrail.loadbalancer.v2.plugin.LoadBalancerPluginV2     
contrail_extensions=ipam:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_ipam.NeutronPluginContrailIpam,policy:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_policy.NeutronPluginContrailPolicy,route-table:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_vpc.NeutronPluginContrailVpc,contrail:None
  1. Restart the neutron-server
service neutron-server restart

Appendix

Making changes to the configuration when the docker containers are already running

After making changes in the /etc/contrailctl/*.conf files, issue the below command for the configuration changes to take effect

if controller.conf file is modified, issue the command
/usr/bin/docker exec contrail-controller contrailctl config sync -c controller -F

if analytics.conf file is modified, issue the command
/usr/bin/docker exec contrail-analytics contrailctl config sync -c analytics -F 

if analyticsdb.conf file is modified, issue the command
/usr/bin/docker exec contrail-analyticsdb contrailctl config sync -c analyticsdb -F 
Clone this wiki locally