Contrail_k8s installation using juju - ganeshahv/Contrail_SRE GitHub Wiki
Topology
- 1 juju controller
 - 1 contrail controller
 - 1 k8s_master
 - 2 k8s_nodes
 
Steps
- Create 5 EC2 instances using the following AMI
 
ami-0620d12a9cf777c87: (Canonical, Ubuntu, 18.04 LTS, amd64 bionic image build on 2020-01-12)
- Add a VPC to assign IPs. Create an Internet GW and attach it to the VPC. The SG should allow ICMP, TCP and UDP(for the tunnel between computes) in both egress and ingress.
 
3]. On to the juju controller make sure the hostnames of all the instances are populated in the /etc/hosts/
root@ip-192-168-1-235:~# cat /etc/hosts
127.0.0.1 localhost
192.168.1.235 ip-192-168-1-235.ap-south-1.compute.internal ip-192-168-1-235
192.168.1.56 ip-192-168-1-56.ap-south-1.compute.internal ip-192-168-1-56
192.168.1.6 ip-192-168-1-6.ap-south-1.compute.internal ip-192-168-1-6
192.168.1.154 ip-192-168-1-154.ap-south-1.compute.internal ip-192-168-1-154
192.168.1.50 ip-192-168-1-50.ap-south-1.compute.internal ip-192-168-1-50
4]. On the juju controller, install juju
sudo apt-get update
sudo apt-get upgrade
apt install snapd -y
snap install juju --classic
export $PATH=/snap/bin
juju
5]. On the juju controller, add the machines along with the constraints/tags
juju add-machine ssh:[email protected] --constraints tags=controller
juju add-machine ssh:[email protected] --constraints tags=k8s_master
juju add-machine ssh:[email protected] --constraints tags=k8s_node
juju add-machine ssh:[email protected] --constraints tags=k8s_node
6]. Get the contrail_k8s bundle from https://jaas.ai/u/juniper-os-software/contrail-k8s
7]. Edit the bundle file to set the correct machines, services and relations as in the example file.
8]. Deploy using the command juju deploy ./bundle.yaml --map-machines=existing,17=17,18=18,19=19,20=20
9]. Check the status using the command juju status
10]. To edit any values after deployment, use the command juju config <options>
Ex: juju config kubernetes-master enable-metrics=true