There is a launchpadapi python client/library let you use launchpad web api easily.
The key concept is to get the launchpad object. And then manipulate the objects.

I recommended trying lp-shell in lptools packages. With lp-shell utility which provides an interactive python shell, developer could use launchpadlib python library interactively and explore functions and properties of launchpadlib.
Example:

Due to some software issues not fixing for long time on logdown.com [2], I decided to finding other blog solutions for hosting my tech blog. After considering several options (Such as Hugo, Ghost, Octopress, Jekyll, Jekyll-Now). The final choice goes to Hugo. Hugo is a popular static website generator which built on top of Golang. The community support is actively. Over 18 thousands stars on Hugo github repository. And Debian/Ubuntu has hugo packages which is very easily for normal user to install.

For migrating to Hugo, I exported all my articles on logdown, which content is served with similar format to Octopress. And then dump all the markdown files into content/post/ folder in newly created hugo repository. Everything went well except two steps were needed.

I used sed script in [1] to change date format, otherwise the hugo will print parsing error.

Remove all the

layout: post

line in the octopress markdown article

In fact I spent some time (more thant I expected) to select the Hugo theme. At begining none of the themes seems fit my need (Easy setup, Large font, Readibility, Clear article information such as date information).

hugo-geo

Pro: Great design, Great Readibility.

Cons: Lack of date and tag information in article page. Only summary in front page.

hyde-x

Pro: Simple. Allow showing full article in index.html.

Cons: Lack of hugo tag support.

Finally I decided to use hugo-geo theme which is great. And customized hugo-geo by adding my personal wanted features:

Recently I’ve trace how cloud-init is being run. First, I try to find service file in /etc/system/system or /lib/systemd/system. Although I can locate the unit files, I can’t see any systemd target that will bring up these cloud-init services. I did’t see how cloud-init.target is activated by systemd.

Finally, I found that cloud-init project utilize the systemd generator to generate the unit files dynamically. The dynamic unit files is located at /run/system/generator.early/multi-user.target.wants/cloud-init.target. With this unit file, when the multi-user.target is activated by systemd, the cloud-init.target will also be activated. Then the systemd will further activate related cloud-init service in /etc/systemd/system/cloud-init.target.wants/.

Below I give some simple command to run a ubuntu:16.04 lxd container. LXD container is fast, very efficient, very low-footprint virtual machine. I recommend people who didn’t need low-level system control (such as disk, loopback device) give it a try. I think this kind of lightweight virtual machine would benefit people who study machine learning or similar scientific computing.

Note that lxd has some limitaions. Such as you can’t
- setup loopback device
- mount fuse file system
- have bridged network.
- load/remove kernel module
…
(But if you choose to run a priviledged lxd virtual machine, some limitations might not exist anymore. But I haven’t dig into it currently.)

Note that this article introduces how to build Debian/Ubuntu LiveCD iso image from scratch. With this method, you have great flexibility to customize the LiveCD.

However, if you only want to customize the LiveCD a little bit. Such as adding some packages for installation, or changing the preseed configuration, you can refer to DebianCustomCD, Simple-CDD and LiveCDCustomization