This is an emulator built on top of Containernet to benchmark and evaluate solutions to the NFV-RA problem.
- Python 3.9
- Ubuntu 20.04
- Docker
- Install the required packages.
sudo apt-get install -y build-essential zlib1g-dev libffi-dev libssl-dev liblzma-dev libbz2-dev libreadline-dev libsqlite3-dev curl git tk-dev gcc python-dev libxml2-dev libxslt1-dev zlib1g-dev python-setuptools python3-venv
- Install pyenv.
curl https://pyenv.run | bash
Add the following lines to your .bashrc or .zshrc and .bash-profile or .profile file.
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Source your .bashrc or .zshrc file.
source ~/.bashrc
Add pyenv to the root user. This is important because mininet has to be run as the root user. Run the following command.
which pyenv
Copy the output leaving the trailing /pyenv
part.
Run the following command.
sudo visudo
Append the copied output to secure_path
as shown below.
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/username/.pyenv/bin"
- Install Python 3.9.
pyenv install 3.9
sudo pyenv install 3.9
- Install ansible.
sudo apt-get install ansible
- Clone containernet.
git clone https://github.com/Project-Kelvin/containernet
- Install containernet.
sudo ansible-playbook -i "localhost," -c local containernet/ansible/install.yml
- Add user to docker group.
sudo usermod -aG docker $USER
newgrp docker
- Install pipx.
python3 -m pip install --user pipx
python3 -m pipx ensurepath
Source your .bashrc or .zshrc file.
source ~/.bashrc
- Install poetry.
pipx install poetry
Add poetry
to the root user.
Run the following command.
which poetry
Copy the output leaving the trailing /poetry
part.
Run the following command.
sudo visudo
Append the copied output to secure_path
as shown below.
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/username/.pyenv/bin:/home/username/.local/bin"
- Clone OpenRASE.
git clone https://github.com/Project-Kelvin/OpenRASE
- Install OpenRASE. Move into the OpenRASE directory.
cd OpenRASE
Get the path of the Python 3.9 executable.
pyenv which python
Copy the output. Run the following command replacing the placehodler with the copied output.
poetry env use <path to python 3.9 executable>
Repeat for the root user. Get the path of the Python 3.9 executable.
sudo pyenv which python
Copy the output. Run the following command replacing the placehodler with the copied output.
sudo poetry env use <path to python 3.9 executable>
Install the dependencies.
sudo poetry install
- Install Ryu.
sudo poetry run python -m pip install ryu
Install eventlet.
sudo poetry run python -m pip install eventlet==0.30.2
- Initialize OpenRASE
sudo poetry run init
Restart the Docker service.
sudo service docker restart
Re-initialize OpenRASE
sudo poetry run init
- Run OpenRASE test.
sudo poetry run test