Warning!

Make sure you are in root@pod01-srv1 during these steps.

Configure base Operating System on pod01-srv1

As with any Linux application installation, there are some operating system parameters that must be modified to facilitate the operation of your application. We have grouped the requirements ahead of each component installation of Contiv.

Use of Centos 7.2 for this lab

Centos is a Linux distribution that provides a free solution that is functionally compatible with RedHat Enterprise Linux.

During this lab, you will be leveraging two Centos7 systems in order to install the different components needed such as Contiv, Ansible, Docker that allow us to create our containers.

Step 1 - Configure HOSTS file for Name Resolution

Setting proper hostnames definition plays a key role in the setup of various components of Contiv There are three things that need to match for Contiv to properly operate. The first part is that the hostname is correct in the file /etc/hosts. The second is the environment variable HOSTNAME that is derived in the system. The third is the hostname definition in /etc/hostname.

pod01-srv1
1
# This is the copy group: 1
cat <<EOF > /etc/hosts 127.0.0.1 localhost localhost.localdomain 10.0.236.17 pod01-srv1 pod01-srv1.ecatsrtpdmz.cisco.com EOF
pod01-srv1
2
# This is the copy group: 2
cat <<EOF > /etc/hostname pod01-srv1 EOF

Step 2 - Disable Network Manager Service and enable network

After we have modified the Hosts Name Resolution, we need to restart the network services in order to take effect the previous changes.

pod01-srv1
3
# This is the copy group: 3
systemctl disable NetworkManager.service systemctl stop NetworkManager.service systemctl mask NetworkManager.service chkconfig network on systemctl restart network

Step 3 - Disable FirewallD

In this step you will be disabling the FirewallD service in order to allow for you to install and set up Contiv:

pod01-srv1
4
# This is the copy group: 4
systemctl stop firewalld systemctl disable firewalld
pod01-srv1
5
# This is the copy group: 5
systemctl status firewalld
    # systemctl status firewalld
    firewalld.service - firewalld - dynamic firewall daemon
       Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
       Active: inactive (dead)
    

Now flush the iptables chains to ensure that everything has been cleaned up.

pod01-srv1
6
# This is the copy group: 6
iptables -F

Step 4 - Disable SELinux Enforcement

In this step you will be disabling SELinux enforcement. SELinux can operate in one of two modes:

pod01-srv1
7
# This is the copy group: 7
sudo setenforce 0
pod01-srv1
8
# This is the copy group: 8
sestatus
    [root@pod01-srv1 ~]# sestatus
    SELinux status:                 disabled  
    

Downloading and Upgrading software required for Contiv

In the following steps we will be downloanding some packages needed for Contiv to work properly. It is important to always check the required packages based in your version of code and system.

Step 5 - EPEL packages needed for Contiv

pod01-srv1
9
# This is the copy group: 9
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh epel-release-latest-7.noarch.rpm

Step 6 - Packages needed for Contiv

pod01-srv1
10
# This is the copy group: 10
yum -y install bzip2 sudo easy_install pip pip install netaddr yum -y install python2-crypto.x86_64 yum -y install python2-paramiko

Step 7- Upgrade system packages

Upgrade all the packages from the original ISO PXEBOOT install disk.

pod01-srv1
11
# This is the copy group: 11
yum makecache yum -y upgrade

Interface Configuration

Step 8- Enable Interface

During this step we will be enabling the interface that connects to the ACI fabric:

pod01-srv1
12
# This is the copy group: 12
ip a

[root@pod01-srv1 ~]# ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:0c:01:04 brd ff:ff:ff:ff:ff:ff
    inet 10.0.236.17/24 brd 10.0.236.255 scope global dynamic eth0
       valid_lft 320sec preferred_lft 320sec
    inet6 fe80::250:56ff:fe0c:104/64 scope link
       valid_lft forever preferred_lft forever
3: eth1:  mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:50:56:8c:42:0d brd ff:ff:ff:ff:ff:ff
    

Step 8 - Change the physical interface states to operational.

pod01-srv1
13
# This is the copy group: 13
ifconfig eth1 up

Step 9 - Restart network stack to activate interface.

pod01-srv1
14
# This is the copy group: 14
systemctl restart network

Step 10 - Check status of interfaces after network restart.

Using the command ip a we can see the status of the uplink interfaces that have been defined.

pod01-srv1
15
# This is the copy group: 15
ip a
[root@pod01-srv1 ~]#ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:0c:01:03 brd ff:ff:ff:ff:ff:ff
    inet 10.0.236.17/24 brd 10.0.236.255 scope global dynamic eth0
       valid_lft 544sec preferred_lft 544sec
    inet6 fe80::250:56ff:fe0c:103/64 scope link
       valid_lft forever preferred_lft forever
3: eth1:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:8c:2e:a5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::250:56ff:fe8c:2ea5/64 scope link
       valid_lft forever preferred_lft forever
    
© Copyright Cisco Systems 2017