2017-05-29

Girl's love

Watching all the little kids running around at this public square in a summer evening, I was thinking to myself, "boy, that's a lot of kids. And each one of them came from a man and a woman, and they had to have sex at some point to make ...

continue reading
2017-05-29

Charm layer-basic

Copyright @ Lenovo US

Have you ever wondered what layer-basic is for? and why every charm needs to include it? In this article we will take a look at its code base to decipher this mystery.

Hooks

We already know hooks are hardcoded. Juju expects certain hooks and hook sequence is always executed in ...

continue reading
2017-05-28

Irresponsible response

Doesn't the title sound like a tongue twister? That's where the irony is. How can you make a response irresponsible? and what does it give? Any harm done? Does it matter? What does it mean when it happens? Why do ppl give such response? and why would ppl ...

continue reading
2017-05-27

Juju charm Python2

Copyright @ Lenovo US

Why do we want to build Python2 charms? Charms are claimed to built for Python3. However, the catch is that charms are also built for Ubuntu ecosystems ONLY if you care to examine its code base.

Take __init__.py in charmhelpers/charmhelpers for example:

try:
    import six  # flake8: noqa

      
      continue reading
    
  
2017-05-24

Consume the future

I was thinking about future value this morning. Why? because I was thinking about this Chinese phrase, 寅吃卯粮, which means that one consumes savings meant for future use. The term bears a negative emotion that is used to criticize someone or some action that is irresponsible (in view of the ...

continue reading
2017-05-23

Sync vs. Async

Irrelevant

Sync vs. Async. I have been thinking this to myself and have involved quite a few discussions with smart (and mostly young) developers which from time to time makes me wonder whether there is a definite answer for this at all.

One thing I can fairly state is that ...

continue reading
2017-05-18

父亲一家

爷爷,奶奶,幸福邨,夏炽宇(九弟)

父亲叫爷爷“大大”,奶奶“亲妈”

上海人。老家在青浦朱家角。爷爷是地主,后来战乱到了上海,在上海华山路幸 福邨租了房子,地点离上海交大本部2站路。我父亲最小,上面都三个哥哥一个 姐姐,我分别介绍。他们叫他九弟,中间的几个夭折了。他长大的时候家里经济 应该很拮据,主要靠大哥的收入维持,所以他从那时候就养成了节俭的习惯,后 来经历建国来的那些年代,加上后来分配到了东北,那里虽然当时是中国的工业 基地,但生活条件与南方差距甚远,所以更是对自己的生活变得很苛刻。

幸福邨

父亲还记得自己以前的事情。他说起幸福邨的日子,说起住在那里的人,很多时 候还以为家还在那里。幸福邨是联排屋,我大学的时候家还在那里,整整的一栋 都是,三层,一大家子人都在,以前爷爷奶奶住在顶层,不大下来,我没有见过 奶奶,那天说起亲妈 ...

continue reading
2017-05-13

What a day

I was sitting in this underground little food court, breathing the muggy air, eating a spicy food, watching people coming in and out, full of life, full of noise, full of hope. Yet, I kept wondering that everybody here has one type of headache or another in their lives, just ...

continue reading
2017-05-05

Nursing home evaluation

Due to Dad's deterioating condition, nursing home becomes a necessary option that we must consider as a way to handle this situation. The following are notes most based on recollection and first impression so that they are likely biased and are certainly opinionated.

Sites visited:

  1. 北京金手杖: recommended by my ...
continue reading
2017-04-30

My la la land

Maybe it's the travel, maybe it's the stress of my dad's worsening health condition, maybe I'm tired from all these and trying the impossible without knowing the loss is done already. But I know why I'm sad. The life went the way I hoped but ...

continue reading
2017-04-30

Bye Bye GFW

The GFW is nothing but an anti-humanity instance that blocks knowledge transfer and information sharing in the 21st century when brain is the competition advantage and this gov decides to sacrifice all the future with a vain hope that creativity can continue to flourish while its citizens are excluded from ...

continue reading
2017-04-24

Charm Reactive

Copyright @ Lenovo US

In this article we will study charm's reactive framework to get a firm understanding of what they mean by writing an reactive charm.

Hooks

Decorator: @hook Definition: charm.reactive/charms/reactive/decorators.py

Hooks give one a dedicated sequence that execution is guaranteed in that order and developer can ...

continue reading
2017-04-24

Charm chained states

Copyright @ Lenovo US

This charm is created to demonstrate chained states using Juju charm. Chained states is essentially mirroring a pattern of any sequential execution in a workflow. Potentially each execution block can also have conditions to set the next state, even though this type of knowledge should be exposed outside function element ...

continue reading
2017-04-24

You got mail

After becoming an Emacs user for the last few months, I acquired a burning desire to migrate as much as my daily text editing activities into Emacs environment, in particular, emails.

Having tried offlineimap for a bit, I ended up battling its ...

continue reading
2017-03-30

MAAS vs. Ironic

Copyright @ Lenovo US

This article is to analyze Openstack Ironic and Canonical MAAS, both are tools to turn baremetal into a pool of managed resources that are ready for consumption by upstream srervice. On the highest level, a baremetal is either managed or not-managed. Being managed requires that the manager is aware of ...

continue reading
2017-03-22

Baremetal provisioning

Copyright @ Lenovo US

Everyone of us has installed an operating system to a computer at some point in life. It is easy to perceive inserting a disk or USB key to make this happen because the OS files are there. A fancier version is to boot from network using PXE boot option, which ...

continue reading
2017-03-15

Openstack Ironic

Copyright @ Lenovo US

This article is an outcome of my writing a Juju-Ironic provider. The plan was to first figure out Ironic APIs that will achieve what Juju provider needs — start an instance on demand, then build those REST requests into Juju provider code. After playing with Ironic API and Openstack's Devstack ...

continue reading
2017-02-28

Introduction of Juju charms

Copyright @ Lenovo US

Juju charms are, charming. It promises a selection of blueprints that hold magic to make an application deployment easy. But devils are in the details, as always the case. In this article we will walk in the charm world to learn its design.

Bundle, charm, service, application

Juju terms can ...

continue reading
2017-02-08

Juju deploy and Provider

Copyright @ Lenovo US

In this article, we have demonstrated how Juju deploys a charm, including what makes a node eligible as a target and what files will be put on by the deployer.If you recall, there were four steps in a deploy process:

  1. Add a new machine to the cloud environment. In ...
continue reading
2017-01-21

Emacs

What a wonderful editor!

I wouldn't even call it an editor because it can do so much beyond text editing. Still on the learning curve to get a grasp of what it can do in my daily development workflow. Here is to document the init.el that I'm ...

continue reading