Juju charms for Contrail services.
Contrail 5.0 would provide support for Docker containers. The existing contrail components, which run as services on a BMS or VM, would be running within a Docker container in contrail 5.0. This document describes how to deploy contrail 5.0 Docker containers, which would be running the several contrail service components using contrail-charms
- Install cloud and juju on the dedicated machine from where the deploy is started:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install juju
- Configure juju:
juju add-cloud <cloud-name>
juju add-credential <cloud name>
You can see possible clouds that you can use with juju clouds
command.
$ juju clouds
Cloud Regions Default Type Description
aws 15 us-east-1 ec2 Amazon Web Services
aws-china 1 cn-north-1 ec2 Amazon China
aws-gov 1 us-gov-west-1 ec2 Amazon (USA Government)
azure 26 centralus azure Microsoft Azure
azure-china 2 chinaeast azure Microsoft Azure China
cloudsigma 5 hnl cloudsigma CloudSigma Cloud
google 13 us-east1 gce Google Cloud Platform
joyent 6 eu-ams-1 joyent Joyent Cloud
oracle 5 uscom-central-1 oracle Oracle Cloud
rackspace 6 dfw rackspace Rackspace Cloud
localhost 1 localhost lxd LXD Container Hypervisor
You can add private or custom clouds for the following provider types:
$ juju add-cloud
Cloud Types
maas
manual
openstack
oracle
vsphere
As an example for maas:
juju add-cloud mymaas #select cloud type: maas, enter the API endpoint url)
juju add-credential mymaas #add credentials
As an example for amazon:
juju add-credential aws #add credentials
- Create controller:
juju bootstrap --bootstrap-series=bionic <cloud name> <controller name>
- Download charms:
git clone https://github.com/Juniper/contrail-charms -b R5
- Deploy Contrail:
You can deploy charms in bundle or manually.
-
With bundle:
- Create or modify the Juju deployment bundle yaml file to point to machines in which the contrail-charms should be deployed and to include options you need.
- Deploy the bundle using the command
juju deploy <bundle_yaml_file>
- Example of bundle.yaml file for deployment of OpenStack and Contrail in Amazon environment for Ubuntu 18.04.
- Example of bundle.yaml file for deployment of OpenStack and Contrail without analyticsdb in Amazon environment for Ubuntu 18.04.
- Example of bundle.yaml file for deployment of OpenStack and Contrail in Amazon environment for Ubuntu 20.04.
- Example of bundle.yaml file for deployment of Kubernetes and Contrail in Amazon environment.
- Example of bundle.yaml file for deployment of Kubernetes and Contrail in Nested mode.
- Example of bundle.yaml file for Contrail CNI (K8S) Deployment Using Existing Keystone.
-
Manually
How to deploy Contrail with OpenStack
How to deploy Contrail with Kubernetes
Using the Manual cloud with Juju
- Analyticsdb is optional and can be omitted. In this case analyticsdb, alarm and snmp will not be installed.
- You can check the status of your deployment using
juju status
command. Unit status. Juju documentation.
CTRL/DATA network - network for data traffic of workload and for control traffic between compute nodes and control services. API/MGMT network - network where API services are listening on and for accessing instances.
By default, charms are using the default network for API/MGMT and CTRL/DATA.
To specify API/MGMT network set control-network
parameter for contrail-controller and contrail-analytics. If contrail-analyticsdb or contrail-kubernetes-master is applied set control-network
parameter for it as well. It can be the IP addresses with netmasks of the control network or physical device name.
To specify CTRL/DATA network set data-network
parameter for contrail-controller. It can be the IP addresses with netmasks of the control network or physical device name. If data-network
isn't specified it will use the same network as control-network
.
juju config contrail-controller control-network=192.168.0.0/24 data-network=ens4
juju config contrail-analytics control-network=192.168.0.0/24
juju config contrail-analyticsdb control-network=192.168.0.0/24
When contollers are placed in different AZ/networks then it can be possible to specify like this:
juju config contrail-controller control-network="192.168.0.0/24 192.168.1.0/24 192.168.2.0/24" data-network=ens4
In this case each controller will choose the address from its own network.
It is possible to run contrail containers using containerd runtime. It can be set by using container_runtime
parameter.
WARNING: all possible contrail-charms should use the same contailner_runtime
. It should be set on bundle or in the beginnig of deploy and cannot be changed after.
The charms that support containerd:
- contrail-agent
- contrail-analytics
- contrail-analyticsdb
- contrail-controller
- contrail-kubernetes-master
- contrail-kubernetes-node
- contrail-openstackl
Sometimes kubectl fails to exec commands in POD due to lack of ACL for kubectl. Cluster can be deployed but it might not work.
Sometimes mysql can not start. Cluster is not up.
After successful cluster deploy tests may fail due to races in keepalive