Posts

Quote of the day

Image
"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
s.
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
           └─docker.conf
   Active: activating (auto-restart) (Result: exit-code) since 토 2018-02-17 22:54:41 KST; 5ms ago
     Docs: https://docs.docker.com
  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 \
                               --public

3. Use this VNFD template to generate VNF:



Note: Use this at your own risk.

References:

[0] https://wiki.openwrt.org/doc/howto/obtain.firmware.generate
[1] https://wiki.openwrt.org/doc/uci/qos
[2] https://hoverbear.org/2014/12/06/openwrt-qos/
[3] https://docs.openstack.org/tacker/latest/install/deploy_openwrt.html

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:

Blueprint: https://blueprints.launchpad.net/tacker/+spec/advanced-openwrt-driver
Code review: https://review.openstack.org/#/c/540310/2

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

KNOWN_SERVICES = ('firewall', 'network') 
to
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.

References:

https://wiki.openwrt.org/doc/uci/dhcp