Showing posts from February, 2018

Quote of the day

"The man who moves a mountain begins by carrying away small stones"
~Phil Knight

Install a python package from a local directory with pip

Normally you will use pip to install a python package from pypi. But, actually you can do it from a local directory using the "-e" parameter:

pip install -e /local/directory

Reinstall docker-ce after a purge and config dir deleted.

I purged the docker-ce package and deleted the /etc/docker directory and It brings me trouble... I cannot reinstall it. Every time I try to reinstall with the following command:

sudo apt install --reinstall docker-ce

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for detail
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/docker.service.d
   Active: activating (auto-restart) (Result: exit-code) since 토 2018-02-17 22:54:41 KST; 5ms ago
  Process: 28307 ExecStart=/usr/bin/dockerd --config-file=/etc/docker/daemon.json (code=exited, status=1/FAILURE)
 Main PID: 28307 (code=exited, status=1/FAILURE)

 2월 17 22:54:41 anda-stack systemd[1]: F…

Deploy OpenWRT as QoS VNF on OpenStack Tacker

So I just updated the OpenWRT VNFM management driver of OpenStack Tacker to support more services like DHCP, DNS, and QoS (the code is under review now). But, if you are so eager to try, here is how:

1. Download the custom image of OpenWRT from here (because the default OpenWRT image doesn't have qos-scripts installed).

2. Upload that image to your OpenStack instance:

openstack image create OpenWRT --disk-format qcow2 \
                               --container-format bare \
                               --file /path_to_image/openwrt.img \

3. Use this VNFD template to generate VNF:

Note: Use this at your own risk.



Deploy OpenWRT as DHCP and DNS VNF on OpenStack Tacker

The OpenWRT management driver of Tacker VNFM currently only supports the firewall and network service. That raises a need to update that driver so that we can deploy more network services as VNF using OpenWRT. So to achieve the goal of this blog post, I have to do as follow:

1. Update the OpenWRT VNFM management driver. I just submitted a blueprint on launchpad to work on it. Hopefully, it will be approved soon:

Code review:

Here is a quick change: modify this file /opt/stack/tacker/tacker/vnfm/mgmt_drivers/openwrt/ at line 94

KNOWN_SERVICES = ('firewall', 'network') 
KNOWN_SERVICES = ('firewall', 'network', 'dnsmasq') 

2. Use this VNFD template to deploy the DHCP and DNS services on Tacker

Notice: I do not test this yet, use it at your own risk.


Deploy OpenWRT as NAT VNF on OpenStack Tacker

The opensource project for router OpenWRT is quite powerful which can be used to deploy as VNF in OpenStack Tacker. Here is a sample of VNF template (VNFD) which will be used to deploy NAT service in Tacker using OpenWRT.

Basically, the VNF will apply 2 NAT rules:

1. Redirect all requests to port 80 of any clients on the 'wan' interface of the OpenWRT to port 80 of the client with IP address which is linked to the 'lan' interface.

2. Redirect all requests to port 22001 of any client on the wan interface to port 22 of  any clients on the 'lan' interface of the VNF.

Note: Please read the official OpenStack documentation on how to deploy the VNF.