CPE Automation

CPE Automation@

Use this procedure to create NF Gateway enabled equipment automatically.

1. Summary@

This guide will cover the following sections@

  • Create an automation VM by using OVA provided by NetFoundry. This is a one-time setup.
  • Install CentOS7 OS on the CPE box.
  • Run the automation script from the automation VM to setup the CPE box
  • This guide will not cover@

  • This guide will only cover deployment of OVA with VMWare6.7, it will not cover all hypervisor out there. However, the provided OVA will work with VM Workstation 12 or EXSi 6.5 or later and VirtualBox.
  • This guide will not cover how to setup installation media of Cent7 OS. At the end of guide, it will describe where to find the OS image and some tools.
  • 2. Create Automation VM@

    Note

    This procedure only needs to execute once for all CPE boxes. It is recommended to create this VM using VMWare hypervisor.

    Obtain the CPE-Automation OVA@

    Todo

    We will need to put the OVA somewhere customer can download.

    Create the VM with the OVA@

    From your hypervisor, create a VM and use the Deploy from OVA option image

    Hit "Next", and you can choose your OVA image and give a name to the VM you are creating image

    Hit "Next", it will ask you which storage (Disk) you want to put your VM. Choose one that suits you. image

    Hit "Next“ and choose your Network. (Hint, "VM Network" is your default network, that usually is a good choice). For "Disk provisioning", you can leave it at the default choice of "Thin". image

    Hit "Next", and you are ready to deploy the OVA. Review the content carefully and hit "Finish" to deploy it. image

    After you hit "Finish", on the Task window, you should notice the VM been created. Once the it reaches 100%, your VM is created. And it should automatically start after the deployment is done. image

    Login and Check the automation VM@

    Once the VM is completely deployed, we need to make sure the VM is setup correctly.
    Go to the main VM window, right click on your VM,
    on the popup menu, choose "Console"->"Open browser console". image

    You will see a console window pop up like this: image

    Login to the console by using credential
    Username: nfadmin
    Password: nfadmin
    Check the IP setting by issuing "ip a" command. If you see a valid IP address, then your VM is on a network. image

    You can verify ssh access to the VM by using a ssh enabled terminal:

    > ssh nfadmin@[ip_address_of_the_automation_vm]
    

    Conclusion

    This is the end of deploying the automation VM.

    3. Installing CentOS 7 on the CPE@

    Note

    Have this ready before you start: You will need a CentOS 7 installation media before you start.

    Insert an Ethernet Cable into your CPE and bootup your CPE via the installation media, you will encounter the first screen: image

    Choose "Install CentOS 7" to continue.

    On the next screen, Choose your Language. And hit "Continue" image

    The "INSTALLATION SUMMARY" screen will appear.
    Check to make sure the step (1) "SOFTWARE SELECTION" is set to "Minimal Install".
    Then Click on step (2) "INSTALLATION DESTINATION" to setup the Disk. image

    Once in the "INSTALLATION DESTINATION" screen
    Choose your Disk (NOT the USB installation media)
    Click on "Automatically configure partitioning" Then hit "Done" at the top left screen to continue.
    image

    Once you are back to the "INSTALLATION SUMMARY" screen
    Choose step (3) "NETWORK & HOST NAME". The following screen should appear.
    Turn on the Ethernet by hitting the button marked (1).
    And then observe the IP Address appears below it (at area Marked (2)). (We will need that IP address when we run the automation).
    Then hit "Done" at the top left screen to continue. image

    You should be back to the "INSTALLATION SUMAMRY" screen again, and you can hit "Begin Installation"" to start the Installation.

    image

    During the installation, you need to create a user account. For our deployment, you do not need to create root Password. So, press on "USER CREATION" to create an Admin user. image

    On the "CREATE USER" screen, you need to fill the following:
    Username: nfadmin
    click on "Make this user administrator"
    Password: nfadmin
    You then need to click "Done" twice to exit this screen.
    image

    You will be sent back to the installation screen, wait for it to complete installation, and the "Reboot" button will appear for you to restart the CPE with the CentOS installed. image

    Conclusion

    This is the end of installing CentOS 7 on the CPE box.

    4. Run Automation to setup the CPE box@

    Note

    You will need the IP address of your automation VM and the IP address of your CPE to continue this step

    Connect to your automation VM via ssh from a terminal

    > ssh nfadmin@[ip_address_of_the_automation_vm]
    

    Login to the VM by using password: nfadmin

    Start the automation by issuing the following command:

    > ./setup-nfnbox.bash [ip_address_of_cpe]
    

    The automation will prompt you to enter
    "SSH password" to login to the CPE box (nfadmin)
    "BECOME password" (hit <ENTER> key) image

    The automation will take a few minutes to complete. At the end of automation, you will see message like this:

    PLAY RECAP ******************************************************************************************************************
    10.111.111.1               : ok=6    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
    192.168.1.184              : ok=35   changed=28   unreachable=0    failed=0    skipped=2    rescued=0    ignored=0
    

    Conclusion

    The CPE is now setup and ready.

    5. CentOS 7 Installation Media@

    Disclaimer

    There are many ways to obtain and setup the installation media. If you never set one up before, the quickest and easiest way to create one is by downloading the OS image and burn it to a USB by using disk utility.

    CentOS 7 image@

    You can obtain a copy of OS image by visiting centos.org. But since you need to get a CentOS 7 image (not the latest CentOS 8), here is a quick link to Cent7OS mirror sites:

    http://isoredirect.centos.org/centos/7/isos/x86_64/
    

    Recommend download the "CentOS-7-x86_64-DVD-xxxx.iso" (around 4.5G). This is the image tested. Since we use minimal installation from CentOS 7, so the minimal image should work also "CentOS-7-x86_64-Minimal-xxxx.iso" (around 1G)

    Burn Image to a USB stick@

    You can burn the image to a USB stick by using Rufus (if you are on a PC). You can find many tutorials on the internet if you have trouble