Onebox Deployment - futurewei-cloud/alcor-int GitHub Wiki

Step by step deployment on clean ubuntu 16.04 physical machine

Build and Deployment

Base machine setup

  1. Install latest git version
    1. add-apt-repository ppa:git-core/ppa
    2. apt-get update
    3. apt-get install git
  2. Install docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/
  3. Clone and setup Alcor Control Agent + Mizar:
    1. cd ~/dev
    2. git clone --recurse-submodules -j8 https://github.com/futurewei-cloud/mizar-mp
    3. cd ~/dev/mizar-mp && git submodule update --init --recursive
    4. ./build/aca_build.sh
  4. Install python3.6 if running Ubuntu 16.04: https://www.tecmint.com/install-python-in-ubuntu/
  5. python3.6 -m pip install netaddr
  6. python3.6 -m pip install docker
  7. Run AlcorControlAgent/mizar/kernelpatch.sh and reboot the OS as required

Kafka Deployment

Install and run this Kafka Docker image: https://hub.docker.com/r/spotify/kafka/

  1. docker pull spotify/kafka
  2. docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=docker-machine ip \docker-machine active`` --env ADVERTISED_PORT=9092 spotify/kafka --name alcor-kafka Default port 9092 for Kafka was used, you can change to another port if needed, but you will need to change the Alcor configuration file under AlcorController/src/resources/application.properties

Controller Deployment

  1. cd ~/dev/mizar-mp/AlcorController
  2. ./scripts/build.sh
  3. ./scripts/deploy.sh

Host Deployment

  1. cd ~/dev/mizar-mp/AlcorControlAgent/test/e2e_tests
  2. (optional) Modify the test code to change the number of host: vim test_aca_mizar.py (default is 10, change line 24 "n_aca_droplets" to the desired number between 1-100)
  3. Execute the host deployment script: python3.6 -W ignore -m unittest test_aca_mizar.py

End to End Testing

Endpoint Creation and Dataplane Programming

Call Alcor controller to program dataplane

  1. cd ~/dev/mizar-mp/AlcorController
  2. ./scripts/sampleVpcTest.sh localhost 8080 false
  3. ./scripts/sampleEP2.sh localhost 8080 false

Connectivity Testing

  1. docker exec -it ephost_0 /bin/bash
  2. (to look at Alcor Control Agent and Mizar logs) tail -f /var/log/syslog
  3. (using ping) ip netns exec test_netw_ns ping 10.0.0.7
  4. (install and use fping) apt-get install fping
  5. ip netns exec test_netw_ns fping -g 10.0.0.7 10.0.0.15