The Nuage Virtual Router and Switch (VRS) can be utilized on a number of different platforms including BareMetal Servers, ESXi, KVM and HyperV. In this post we’re going to utilize the VRS as part of a KVM Docker Server running on a CentOS7.3 Minimum Server. During the time of this post the version of Nuage being utilized is 4.0R8 but the process should be similar on future releases.
Prerequisites:
- VSD (standalone or cluster) and VSC (at least 1) must be deployed and operational
- CentOS Server with at least 1 NIC that has reachability to both the VSD and VSC/s
- CentOS Server must have internet access for updates
- Access to the nuage-openvswitch and nuage-docker-monitor rpm files
Server preparation
1. Stop and disable NetworkManager, start network and disable firewalld
systemctl stop NetworkManager systemctl disable NetworkManager systemctl start network systemctl stop firewalld systemctl disable firewalld
2. Disable SELINUX
vi /etc/selinux/config
SELINUX=disabled
3. Clean the cache and update the system
rm -fr /var/cache/yum/*
yum clean all
yum -y update
4. Reboot the Server
5. Verify version of OS
rpm --query centos-release
Output should look similar to:
centos-release-7-3.1611.el7.centos.x86_64
Install OS and VRS dependancies
1. Install the latest EPEL release
yum -y install epel-release
2. Enable the CentOS-Base.repo repository by editing the file
vi /etc/yum.repos.d/CentOS-Base.repo
enabled=1
3. Update the system
yum -y update
4. Install libvirt,python-twisted-core, qemu-kvm and virt-install
yum -y install libvirt
yum -y install python-twisted-core
yum -y install qemu-kvm
yum -y install virt-install
5. This one is just a habbit of mine:
enable vnc_listen = “0.0.0.0”
vi /etc/libvirt/qemu.conf
6. Install the nuage-openvswitch
mkdir -p /tmp/nuage/
cd /tmp/nuage/
scp root@nfs.lab.local:/share/nfs/nuage/4.0r8/extracted/nuage-openvswitch*.rpm ./
Remove python-openvswitch and apply nuage-openvswitch twice to clean up br-int and br-tun
yum -y remove python-openvswitch
yum -y remove openvswitch
yum -y install nuage-openvswitch*.rpm
yum -y remove openvswitch
yum -y install nuage-openvswitch*.rpm
7. Configure IP address of VSC within the VRS config file
vi /etc/default/openvswitch
ACTIVE_CONTROLLER=172.16.1.151 STANDBY_CONTROLLER=172.16.1.152
8. Restart the openvswitch
systemctl restart openvswitch
Install Docker
1. Install docker, get pip, docker-py and start docker on boot
yum -y install docker
yum -y install python-pip
pip install docker-py
pip install --upgrade pip
systemctl start docker
chkconfig docker on
2. Install nuage-docker-monitor
mkdir -p /tmp/nuage/
cd /tmp/nuage/
scp admin@nfs.lab.local:/share/nfs/nuage/4.0r8/extracted/nuage-docker-monitor*.rpm ./
Run the installation
yum -y install nuage-docker-monitor*.rpm
3. Restart the openvswitch
systemctl restart openvswitch
Verify installation
1. Verify VRS/OVS controller connection
ovs-vsctl show
2. Verify docker monitor is running
ps aux | grep nuage
Expected output to display “nuage-docker-monitor: monitoring pid 15546 healthy”
Running your first docker image with nuage
docker run -d -i -t -e "NUAGE-ENTERPRISE=acmecorp" -e "NUAGE-DOMAIN=Docker Domain" -e "NUAGE-ZONE=Docker Zone 1" -e "NUAGE-NETWORK=Subnet 1" -e "NUAGE-USER=docker" --name=centos1 --net=none centos /bin/bash
Note: NUAGE-ENTERPRISE, NUAGE-DOMAIN, NUAGE-ZONE, NUAGE-NETWORK and NUAGE-USER, are all specific to the VSD constructs. Make sure that whatever user you provide is added to the VSD Enterprise Administrators Group.
Using a Dockerfile with SSH Access
For advance deployment of the docker centos image with SSHd running follow my github dockerfile/centos instructions: https://github.com/scottairwin/dockerfile-centos
Categories: nuage
Reblogged this on Tricky Deadline and commented:
You saved me last night with this post. I couldn’t have made it work without it. thanks buddy.
LikeLiked by 1 person
No problem bud, glad I could help. Many occasions where you helped me… just repaying the favor 🙂
LikeLike
Here you have the role for your playbook my friend: https://github.com/p1nrojas/pk-nuage-multi/blob/master/roles/docker-install/tasks/1_docker_install.yml
LikeLike