Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Creating an LxCIPtable VNF Image

    You use this process to make the LxCIPtable VNF available in the Cloud CPE Centralized Deployment Model.

    To create an LxCIPtable Image:

    1. At http://cloud-images.ubuntu.com/releases/14.04/release/, determine the appropriate Ubuntu cloud image for your Contrail OpenStack server.
    2. Download the appropriate Ubuntu cloud image to the Contrail OpenStack server.

      For example:

      root@host:/# cd /tmp
      root@host:/tmp# wget http://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img
    3. On the Contrail OpenStack server, upload the Ubuntu image into the Glance software.
      root@host:/# glance image-create --name IPtables --is-public True --container-format bare --disk-format qcow2 < ubuntu-14.04-server-cloudimg-amd64-disk1.img

    4. In a local directory on the Contrail OpenStack node, create a metadata file for the image. For example:
      root@host:~/images# cat user-data.txt
      #cloud-config
      password: <PASSWORD>
      chpasswd: { expire: False }
      ssh_pwauth: True
    5. Create an instance of the image called IPtable-temp in this directory.
      root@host:~/images# nova boot --flavor m1.medium --user-data=./user-data.txt --image IPtables IPtable-temp --nic net-id=<management network id>

    6. From the OpenStack GUI, log in to the instance with the username ubuntu and the password specified in the user-data file.
    7. Customize the instance.

      1. Obtain the password specified in the section [ipTables_creds] of the file nfvo.conf.
      2. Set the root password to this value. For example:
        ubuntu@iptable-temp:~$sudo passwd root
        Enter new UNIX password:
        Retype new UNIX password:
        passwd: password updated successfully
        ubuntu@iptable-temp:~$
      3. In the file /etc/ssh/sshd_config, specify the following setting:
        PermitRootLogin = yes
      4. Restart the service.

        service ssh restart

      5. In the file /etc/network/interfaces, modify the eth0, eth1 and eth2 settings as follows:
        auto eth0
        iface eth0 inet dhcp
         metric 1
        auto eth1
        iface eth1 inet dhcp
         metric 100
        auto eth2
        iface eth2 inet dhcp
         metric 100
      6. Verify that IPtables is active.

        service ufw status

    8. Take a snapshot of the OpenStack Instance.

      1. Close the instance.

        sudo shutdown -h now

      2. From the OpenStack Instances page, select Create Snapshot for this instance, and specify the Name as LxcImg.
      3. Delete the temporary instance that you created in Step 5.

    Modified: 2016-01-27