Skip to content

Latest commit

 

History

History
136 lines (105 loc) · 4.74 KB

Instructions-AIO.md

File metadata and controls

136 lines (105 loc) · 4.74 KB

Instructions for installing Contrail-Builder and All-In-One VM

The Contrail-Builder VM acts as a the installer and proxy for any and all connectivity to/from the Contrail-AIO VM.

Prep

  1. Obtain a routable/networked IP address (RFC1918) that can connect to the Internet to download updates, packages and applications. This IP is for the Contrail-Builder VM and gets assigned to eth0/vnic1.

    Note eth1/vnic2 is statically assigned for the build and setup in the next step.

  2. Create a new port-group on the ESXi server. This port-group should be a non-routed port-group that will only be used to connect the Contrail-Builder and Contrail-AOI VMs to each other.


Install

  1. Enable the "Guest IP Hack" on the ESXi server by connecting via SSH and running this command from the cli; esxcli system settings advanced set -o /Net/GuestIPHack -i 1 More information is available here: https://www.packer.io/docs/builders/vmware-iso.html

  2. Allow VNC through the ESXi firewall:

  3. chmod 644 /etc/vmware/firewall/service.xml

  4. chmod +t /etc/vmware/firewall/service.xml

  5. Then append the range of ports you want open to the end of the file:

 <service id="1000">
   <id>packer-vnc</id>
   <rule id="0000">
     <direction>inbound</direction>
     <protocol>tcp</protocol>
     <porttype>dst</porttype>
     <port>
       <begin>5900</begin>
       <end>6000</end>
     </port>
    </rule>
    <enabled>true</enabled>
    <required>true</required>
  </service>
4. Restore the Firewall permissions:
chmod 444 /etc/vmware/firewall/service.xml
esxcli network firewall refresh   
  1. Import the Contrail-Builder.ova file

  2. Power on the VM

  3. Log into the VM's console with root credentials list below.

  4. Change the IP address of eth0 (obtained in Prep step 1) in the /etc/network/interfaces file and save:

    iface eth0 inet static
    address 10.180.21.79          <--CHANGE_ME
    netmask 255.255.255.0         <--CHANGE_ME
    network 10.180.21.0           <--CHANGE_ME
    broadcast 10.180.21.255       <--CHANGE_ME
    gateway 10.180.21.254         <--CHANGE_ME
    #dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 10.180.21.21 10.180.21.22       <--CHANGE_ME
    dns-search lab.lab
    
  5. Reboot the VM

  6. You can connect as root via ssh or the console into the Builder VM.

  7. When editing this file, search for the string CHANGE_ME and change them to your appropriate information. Edit the following lines in the /Builder/Packer/variables.json file and save:

    remote_host (ESXi server) remote_datestore (on the ESXi server) remote_username (ESXi user) remote_password (ESXi password) ethernet0.networkName (vSwitch name on ESXi)

  8. Start the build process by running:

  cd /Builder/Packer

  packer build -var-file=variables.json Contrail-AIO.json
  1. This should start and complete the automatic Packer build process. Depending on the resources of the ESXi server, it should take 60-90 minutes from start to finish. You will see the output from Packer to builder cli while the builder scripts run. At a high level it does the following:

    1. Contrail-Builder runs in packer to create the VM itself on the ESXi server
    2. Downloads the Ubuntu server ISO and calls a pre-seed config file to build and configure the OS.
    3. Runs Ansible plays from a playbook to setup OpenStack and Contrail
    4. Upon successful completion the VM will gracefully shutdown.
  2. Power up and log into the Contrail-AIO VM console or ssh.

  3. Login and run the command sudo contrail-status. This will give you insight on all the services associated with contrail, all of which should show active.

    NOTE All services typically take ~5 minutes to start/restart. Additionally, if you only see 3-4 services listed, it means the install didn't fully complete. You can manually re-run the installer from inside the VM without worry;

    • cd /opt/contrail/utils then run fab setup_all.
    • If contrail-status returns a command not found, or something similar you will need to run;
    • cd /opt/contrail/utils and the fab install_contrail. Once that is complete, run fab setup_all
  4. You should now be able to access the Contrail and OpenStack GUIs:

GUI access

User Crendentials - CLI username/password

  • juniper/juniper123
  • root/juniper123

User Credentials - OpenStack and Contrail GUI

  • admin/juniper123