Contrail CNI can be installed on a Kubernetes cluster through multiple provisioning schemes.
This wiki will describe the most simplest of all: A single yaml based install
- A running Kubernetes cluster
- Add Contrail repository as insecure repository in docker. *** NOTE: This will need to be done on all nodes of your Kubernetes cluster ***
Step a:
cat <<EOF >>/etc/docker/daemon.json
{
"insecure-registries": ["ci-repo.englab.juniper.net:5010"]
}
EOF
Step b:
service docker restart
- Make sure that kubernetes master node ip has an entry in /etc/hosts file that resolves to the hostname.
File: /etc/hosts
x.x.x.x hostname hostname.fqname
- Docker version on all nodes should be >= 1.24
Installation of Contrail is a 1-step process.
Note: Replace x.x.x.x with the IP of your Kubernetes Master node.
K8S_MASTER_IP=x.x.x.x;CONTRAIL_REPO=ci-repo.englab.juniper.net:5010; CONTRAIL_RELEASE="latest"; mkdir -pm 777 /var/lib/contrail/kafka-logs; curl https://raw.githubusercontent.com/Juniper/contrail-kubernetes-docs/master/install/kubernetes/templates/contrail-single-step-cni-install-ubuntu.yaml | sed "s/{{ K8S_MASTER_IP }}/$K8S_MASTER_IP/g; s/{{ CONTRAIL_REPO }}/$CONTRAIL_REPO/g; s/{{ CONTRAIL_RELEASE }}/$CONTRAIL_RELEASE/g" | kubectl apply -f -
Hurray! Welcome to Contrail.
-
You installed Contrail CNI in your Kubernetes node. If new compute nodes are added to your Kubernetes cluster, Contrail CNI will be propogated to them auto-magically as it is backed by a Kubernetes DaemaonSet.
-
You installed entire Contrail Networking suite with rich Networking, Analytics, Security, Visualization functions, to name a few.
-
Contrail UI is available on port 8143 of your node. Feel free to play around. About Contrail
https://x.x.x.x:8143
Default credentials: admin/contrail123
You can get the status of Contrail components, by running "contrail-status" command line tool in your Kubernetes master node. This will list all Contrail components running in your system.
[root@foo ~]# contrail-status
Pod Service Original Name State Status
zookeeper contrail-external-zookeeper running Up 35 minutes
analytics alarm-gen contrail-analytics-alarm-gen running Up 35 minutes
analytics api contrail-analytics-api running Up 35 minutes
analytics collector contrail-analytics-collector running Up 35 minutes
analytics nodemgr contrail-nodemgr running Up 33 minutes
analytics query-engine contrail-analytics-query-engine running Up 35 minutes
analytics snmp-collector contrail-analytics-snmp-collector running Up 35 minutes
analytics topology contrail-analytics-topology running Up 34 minutes
config api contrail-controller-config-api running Up 35 minutes
config cassandra contrail-external-cassandra running Up 35 minutes
config device-manager contrail-controller-config-devicemgr running Up 35 minutes
config nodemgr contrail-nodemgr running Up 33 minutes
config rabbitmq contrail-external-rabbitmq running Up 35 minutes
config schema contrail-controller-config-schema running Up 35 minutes
config svc-monitor contrail-controller-config-svcmonitor running Up 35 minutes
control control contrail-controller-control-control running Up 35 minutes
control dns contrail-controller-control-dns running Up 35 minutes
control named contrail-controller-control-named running Up 35 minutes
control nodemgr contrail-nodemgr running Up 33 minutes
database cassandra contrail-external-cassandra running Up 35 minutes
database kafka contrail-external-kafka running Up 35 minutes
database nodemgr contrail-nodemgr running Up 34 minutes
kubernetes kube-manager contrail-kubernetes-kube-manager running Up 35 minutes
vrouter agent contrail-vrouter-agent running Up 34 minutes
vrouter nodemgr contrail-nodemgr running Up 33 minutes
webui job contrail-controller-webui-job running Up 35 minutes
webui web contrail-controller-webui-web running Up 35 minutes
WARNING: container with original name 'contrail-external-zookeeper' have Pod os Service empty. Pod: '' / Service: 'zookeeper'. Please pass NODE_TYPE with pod name to container's env
vrouter kernel module is PRESENT
== Contrail control ==
control: active
nodemgr: initializing (NTP state unsynchronized. ) . <-- Safe to ignore
named: active
dns: active
== Contrail kubernetes ==
kube-manager: active
== Contrail database ==
kafka: active
nodemgr: initializing (NTP state unsynchronized. ) . <-- Safe to ignore
zookeeper: inactive <-- Safe to ignore
cassandra: active
== Contrail analytics ==
nodemgr: initializing (NTP state unsynchronized. ) . <-- Safe to ignore
api: active
collector: active
query-engine: active
alarm-gen: active
== Contrail webui ==
web: active
job: active
== Contrail vrouter ==
nodemgr: initializing (NTP state unsynchronized. ) <-- Safe to ignore
agent: active
== Contrail config ==
api: active
zookeeper: inactive <-- Safe to ignore
svc-monitor: active
nodemgr: initializing (NTP state unsynchronized. ) . <-- Safe to ignore
device-manager: active
cassandra: active
rabbitmq: active
schema: active