OpenStack Havana Deploy by Rackspace Private Cloud v4.2.2

This HOWTO will guide you though a multi-node Openstack Havana deployment with Rackspace Private Cloud v4.2.2.

Before start I will assume you have a clean Ubuntu Server 12.04 installed with minimal packages requirement. It is strongly recommend to install Openstack for a new host, as it will modify a lot of default settings; from the other point of view, don't install Openstack on top of an online production that already well configured ;-)

OpenStack Havana Flat Network Example

After installing OpenStack Havana with Rackspace Private Cloud Software, one of the next important step is to enable its network access. General Havana's Neutron can be found from Configuring OpenStack Networking, and here I would like to provide an example setup similar as that of previous nova-network simple flat network architecture.

Announcing TWBS jQuery: Simple jQuery Update for Drupal 7

During TWBS development upgrade Drupal 7 core jQuery libraries into its latest version for Bootstrap is a must. BTW jQuery Update seems not my cup of tea because it give me too much trobule within previous site building experience: too complicated, bundle everything within its own archive (which I love to manage 3rd party libraries with drush make and Libraries API), and it is really too much for my use case. So why not just work out a simplified version?

After some research and development during Christmas holiday, I would like to introduce my helper module named "TWBS jQuery". The goal of TWBS jQuery is to provide a handy support for jQuery upgrade and act as the helper module for on going Drupal-Bootstrap-Remix development.

All replacement will be handled automatically. No additional configuration is required.

Key Features

NOTE: We don't officially support overlay.module as deprecated in favour of using together with TWBS.

Getting Started

Download and install with drush manually:

drush -y dl --dev twbs_jquery
drush -y make --no-core sites/all/modules/twbs_jquery/twbs_jquery.make

Package into your own drush .make file (e.g. drustack_core.make):

api = 2
core = 7.x
projects[twbs_jquery][download][branch] = 7.x-3.x
projects[twbs_jquery][download][type] = git
projects[twbs_jquery][download][url] = http://git.drupal.org/project/twbs_jquery.git
projects[twbs_jquery][subdir] = contrib

Live Demo

TWBS jQuery is now integrated into DruStack distribution, so you can try it in a live sandbox with simplytest.me.

Why Another jQuery Module?

For general and generic jQuery update functionality, you should always consider another jQuery Update module which started since 2007-04-26.

On the other hand you should consider about using this module because of:

  • Purely design for assist TWBS, which means you will have the best compatibility when using both together
  • Fetch libraries directly from original repository and handle initialization with Libraries API; jQuery Update bundle all libraries into it's own code repository and initialize manually
  • Only support latest official version of libraries which result as no additional configuration required; jQuery Update support multiple version of jQuery
  • Much simple implementation which handle all upgrade and replacement automatically; jQuery Update provide more customization options

Author

Please feel free to test it out and comment with your idea. Let's enjoy simplified jQuery update experience ;-)

Announcing TWBS LESS: Simple LESS Support for Drupal 7

During TWBS development I figure out that introducing LESS support in Drupal 7 would be a great idea when combine with Bootstrap and Font Awesome. After some research and development during Christmas holiday, I would like to introduce my helper module named "TWBS LESS". The goal of TWBS LESS is to provide a handy support for LESS and act as the helper module for on going Drupal-Bootstrap-Remix development.

Add your files just like any other CSS file, just with .less as the extension, and they will be automatically processed. No additional configuration is required.

Key Features

  • Provide drush make file for library download
  • Confirm library successfully initialized with hook_requirements()
  • Support both LTR *.less and RTL *-rtl.less, as like as that of locale_css_alter() supported
  • If Drupal's CSS aggregation enabled, all .less will automatically pre-compile as .css at server-side by lessphp before Drupal CSS aggregation
  • If Drupal's CSS aggregation disabled, all .less will link with rel set to "stylesheel/less" individually, so less.js will handle in client-side live- compile
  • Support FireLESS for .less debug with Firebug in client-side compile mode

Getting Started

Download and install with drush manually:

drush -y dl --dev twbs_less
drush -y make --no-core sites/all/modules/twbs_less/twbs_less.make

Package into your own drush .make file (e.g. build-drustack.make):

api = 2
core = 7.x
projects[twbs_less][download][branch] = 7.x-3.x
projects[twbs_less][download][type] = git
projects[twbs_less][download][url] = http://git.drupal.org/project/twbs_less.git
projects[twbs_less][subdir] = contrib

Live Demo

TWBS LESS is now integrated into DruStack distribution, so you can try it in a live sandbox with simplytest.me.

Why Another LESS Module?

For general and generic LESS support you should always consider another LESS CSS Preprocessor module which started since 2010-03-04.

On the other hand you should consider about using this module because of:

  • Purely design for assist TWBS, which means you will have the best compatibility when using both together
  • Support both server-side pre-compile / client-side live-compile with debug mode enable; LESS CSS Preprocessor support server-side pre-compile
  • RTL support with *-rtl.less just as simple as CSS *-rtl.css that Drupal core supported; LESS CSS Preprocessor RTL support will work as long as your files are named "somename.css.less"
  • Server-side pre-compile CSS will name based on its original .less md5_file() result, which means even you add a single space the cache file will also be regenerate; LESS CSS Preprocessor calculate based on filemtime()
  • Much simple implementation which handle all LESS support automatically as like as that of Drupal core CSS support; LESS CSS Preprocessor provide more customization options

Known Issues

IMHO, below limitation as not directly due to our current implementation:

  • Can't package into Drupal distribution hosted under drupal.org GIT repository directly (but able to include into your own build-*.make or simplytest.make), because:
  • LESS variables and mixins that defined by other else module/theme can't be reuse directly (e.g. You can't reuse . fa mixin that provided by TWBS Font Awesome into your own module/theme), because:
    • If using server-side pre-compile, all LESS/CSS should be sorted in correct order, all url() and @import should replace as correct absolute URL, and aggregated into a single-fat-file before compile into CSS at once
    • If using client-side live-compile, external .less should be referenced by @import with absolute URL correctly

Author

Please feel free to test it out and comment with your idea. Let's enjoy simplified theme development with LESS ;-)

OpenStack Swift + swift3 note

  * template[/etc/swift/proxy-server.conf] action create
    - update template[/etc/swift/proxy-server.conf] from f3a461 to 53dc90
        --- /etc/swift/proxy-server.conf    2013-09-25 11:55:44.761021775 +0800
        +++ /tmp/chef-rendered-template20130927-22717-s7qboe    2013-09-27 14:45:42.401640911 +0800
        @@ -26,7 +26,7 @@
         bind_port = 8080
         
         [pipeline:main]
        -pipeline = catch_errors healthcheck cache swift3 s3token ratelimit authtoken keystoneauth proxy-server

Sync Drupal Distribution Profile With GIT Managed Project

As managing my Drupal distribution - DruStack, with both Drupal.org version and GitHub version, one of the daily duty is to keep their submodules in synchonize. E.g. in case drupal-org.make say we would like to fetch drustack_core as below:

projects[drustack_core][download][branch] = 7.x-23.x
projects[drustack_core][download][type] = git
projects[drustack_core][download][url] = http://git.drupal.org/project/drustack_core.git
projects[drustack_core][subdir] = drustack

In GitHub submodule I need to check out the corresponding branch with "7.x-23.x". Moreover, in case drupal-org.make say we would like to fetch multiflex3 as below:

projects[multiflex3][subdir] = contrib
projects[multiflex3][version] = 3.2

In GitHub submodule I should check out the corresponding tag with "7.x-3.2", too.

So How to sync it in a handy way?

cat profiles/drustack/drupal-org.make | grep branch | while read LINE; do \
    echo $LINE; \
    PROJECT=`echo $LINE | sed 's/projects\[\(.*\)\]\[download\].* = \(.*\)/\1/g'`; \
    BRANCH=`echo $LINE | sed 's/projects\[\(.*\)\]\[download\].* = \(.*\)/\2/g'`; \
    GIT="git --git-dir=`find . -type f -name '.git' | grep \"\/$PROJECT\/\" | grep -v libraries`"; \
    $GIT fetch; \
    $GIT checkout $BRANCH; \
    $GIT pull; \
    $GIT status; \
done

cat profiles/drustack/drupal-org.make | grep version | while read LINE; do \
    echo $LINE; \
    PROJECT=`echo $LINE | sed 's/projects\[\(.*\)\]\[version\].* = \(.*\)/\1/g'`; \
    TAG="7.x-`echo $LINE | sed 's/projects\[\(.*\)\]\[version\].* = \(.*\)/\2/g'`"; \
    GIT="git --git-dir=`find . -type f -name '.git' | grep \"\/$PROJECT\/\" | grep -v libraries`"; \
    $GIT fetch; \
    $GIT checkout $TAG; \
    $GIT status; \
done

永遠不要跟一個純傻逼爭論

永遠不要跟一個純傻逼爭論,因為他會把你的智商拉到跟他一個水平,然後用他多年當傻逼的豐富經驗打敗你。

誰能明白我

作曲:林子祥 作詞:鄭國江 編曲:祖兒

昂然踏著前路去 追趕理想旅途上
前行步步懷自信 風吹雨打不退讓
無論我去到那方 心裡夢想不變樣
是新生 是醒覺 夢想永遠在世上
前路那怕遠只要自強 我繼續獨自尋路向
常為以往夢想發狂 耐心摸索路途上
懷自信我永不怕夜航 到困倦我自彈自唱
掌聲我向夢想裡尋 儘管一切是狂想
途人路上回望我 只因我的怪模樣
途人誰能明白我 今天眼睛多雪亮
人是各有各理想 奔向目標不退讓
用歌聲 用歡笑 來博知音的讚賞
懷自信我永不怕夜航 到困倦我自彈自唱
掌聲我向夢想裡尋 儘管一切是狂想
昂然踏著前路去 追趕理想旅途上
前行步步懷自信 依照心中那正確方向
懷著愛與恕的心 充滿夢想的笑匠
用歌聲用歡笑 來博知音的讚賞
用歌聲用歡笑 來博知音的讚賞

跳蚤理論

有人曾經做過這樣一個實驗:他往一個玻璃杯裏放進一隻跳蚤,發現跳蚤立即輕易地跳了出來。

再重複幾遍,結果還是一樣。根據測試,
跳蚤跳的高度一般可達它身體的400倍左右,所以說跳蚤可以稱得上是動物界的跳高冠軍。 

你這又良善又忠心的僕人


「天國又好比一個人要往外國去、就叫了僕人來、把他的家業交給他們.按著各人的才幹、給他們銀子.一個給了五千、一個給了二千、一個給了一千.就往外國去了。那領五千的、隨即拿去做買賣、另外賺了五千。那領二千的、也照樣另賺了二千。但那領一千的、去掘開地、把主人的銀子埋藏了。過了許久、那些僕人的主人來了、和他們算帳。那領五千銀子的、又帶著那另外的五千來、說、主阿、你交給我五千銀子、請看、我又賺了五千。主人說、好、你這又良善又忠心的僕人.你在不多的事上有忠心、我要把許多事派你管理.可以進來享受你主人的快樂。那領二千的也來說、主阿、你交給我二千銀子、請看、我又賺了二千。主人說、好、你這又良善又忠心的僕人.你在不多的事上有忠心、我要把許多事派你管理.可以進來享受你主人的快樂。那領一千的、也來說、主阿、我知道你是忍心的人、沒有種的地方要收割、沒有散的地方要聚斂.我就害怕、去把你的一千銀子埋藏在地裏.請看、你的原銀子在這裏。主人回答說、你這又惡又懶的僕人、你既知道我沒有種的地方要收割、沒有散的地方要聚斂.就當把我的銀子放給兌換銀錢的人、到我來的時候、可以連本帶利收回。奪過他這一千來、給那有一萬的。因為凡有的、還要加給他、叫他有餘.沒有的、連他所有的、也要奪過來。把這無用的僕人、丟在外面黑暗裏.在那裏必要哀哭切齒了。」(太25:14-28)

Pages

Subscribe to Edison Wong RSS