cd ~/nf.io && git pull
git checkout tags/v.0.1.1
cd ~/nf.io-docker-images && git pull
sudo apt-get install git wget python-pip
sudo addgroup <username> fuse
sudo addgroup <username> docker
sudo pip install docker-py==1.1.0
sudo sed -i 's@.*DOCKER_OPTS=.*@DOCKER_OPTS="--ipv6=true -H unix:///var/run/docker.sock -H tcp://0.0.0.0:4444"@g' /etc/default/docker
sudo service docker restart
git clone https://github.com/WatNFV/nf.io.git
sudo mkdir /vnfsroot
sudo mkdir -p /vnfsroot/nf-types
sudo chown -R <username>:<username> /vnfsroot
sudo mkdir /nfio
sudo chown -R <username>:<username> /nfio
git pull
inside the directory nf.io-docker-images
before going to step 2 git clone https://github.com/WatNFV/nf.io-docker-images.git
cd
to a VNF directory, e.g., cd ufw
and build the docker image following the provided directions. These directions may differ for different VNF types, so, follow the directions provided in each VNF's own directory.
nf.io/src
directory run the following command:python nfio.py --nfio_root /vnfsroot --nfio_mount /nfio
python nfio.py -h
usage: nfio.py [-h] --nfio_root NFIO_ROOT --nfio_mount NFIO_MOUNT [--hypervisor HYPERVISOR] [--middlebox_module_root MIDDLEBOX_MODULE_ROOT] [--log_level LOG_LEVEL] nf.io File System for NFV Orchestration optional arguments: -h, --help show this help message and exit --nfio_root NFIO_ROOT Absolute path of nf.io root (default: None) --nfio_mount NFIO_MOUNT Absolute path of nf.io mount point (default: None) --hypervisor HYPERVISOR Hypervisor to use for VNF deployment (Docker/Libvirt) (default: Docker) --middlebox_module_root MIDDLEBOX_MODULE_ROOT Module directory inside the source tree containing middlebox specific implementation of system calls (default: middleboxes) --log_level LOG_LEVEL [debug|info|warning|error] (default: info)
nfio.py
as shown above if it is not running alreadycd nf.io-docker-images/ufw
docker build -t firewall .
cd /nfio/nf-types
mkdir firewall
cd firewall
mkdir edge-ufw-1
edge-ufw-1
cd edge-ufw-1
echo -n '127.0.0.1' > machine/ip
echo -n 'firewall' > machine/vm.image
-n
is used with echo
to avoid parsing issues with the \n
character.
echo -n 'activate' > action
stop
stops a running VNFstart
starts a stopped VNFdestroy
destroys a running/stopped VNFcat status && echo
\n
is not returned after the status (or any read data) to enable command pipes
cat stats/tx_bytes && echo
ssh root@$(cat machine/vm.ip)
pass
sudo sed -i 's@.*DOCKER_OPTS=.*@DOCKER_OPTS="--ipv6=true -H unix:///var/run/docker.sock -H tcp://0.0.0.0:4444"@g' /etc/default/docker
sudo service docker restart