Perforce 買下 Puppet

Hacker News 首頁上看到的消息,Puppet 宣佈被 Perforce 買下,只是標題有點怪:「An Open Letter from the CEO of Puppet: Puppet and Perforce (puppet.com)」,原文連結在「An Open Letter from the CEO of Puppet: Puppet + Perforce」。

另外一邊 Perforce 的新聞稿標題比較正常,就是講 Perforce 買下 Puppet:「Perforce to Acquire DevOps Pioneer Puppet」。

在討論裡面也有人提到用「Open Letter」當公告很奇怪:

Not sure why this announcement was called an Open Letter?

Anyway,整體對 Puppet 算是好事... 吧?然後也有人提到這類工具看起來都是被併購:

話說現在用 Ansible 比較多,不過還是可以感覺到他的侷限性 (順便丟出來問看看好了),像是新機器上要裝 Let's Encrypt 的憑證,會遇到這樣的步驟:

  • 先設定 nginx/.well-known/ 指到對的路徑下。
  • 要 nginx reload。
  • dehydrated 或是 certbot 之類的軟體申請 test.example.com 的憑證。
  • test.example.com 的設定放到 /etc/nginx/sites-available/,然後加上 symbolic link 到 /etc/nginx/sites-enabled/ 裡。
  • 再 nginx reload 一次。

問題就在 nginx reload 要兩次這件事情,在 Ansible 裡面好像不太好做?看看有沒有什麼想法可以提供... (TwitterFacebook 或是 Plurk 上留言都可以)

AWS OpsWorks 支援 Puppet Enterprise

算是等很久的功能了... AWS 支援的是商業版本的 Puppet Enterprise,掛在 OpsWorks 產品下:「New – AWS OpsWorks for Puppet Enterprise」。

Master server 目前只支援 c4.large、c4.xlarge、c4.2xlarge 三種 instance (如上圖所顯示的),然後這一波支援的 region 只有 us-east-1、us-west-2 以及 eu-west-1,還沒看到亞洲的 region XD

At launch AWS OpsWorks for Puppet Enterprise is available in US East (N. Virginia) Region, US West (Oregon) Region, and EU (Ireland) Region.

計價方式是按照 node 來算,前面的 112,500 node hours 是 $0.017/hour,如果以一個月三十天來算,一個 node 的成本是 $12.24,不算便宜... 不過目前感覺在 AWS 上應該要吃 Packer 來玩,而不是 Puppet... 反正是多給使用者一個選擇就是了,總是有些情境下選擇這個服務是對的方向 (像是考量人的前提...)。

在 Ubuntu 14.04 上執行支援 ALPN 的 nginx

在「Migrate to Ubuntu 16.04」這邊看到換 16.04 的理由:

支援 http2 是升級到 Ubuntu 16.04 很大的動機。原因是前一版 14.04 裡 openssl 太舊,不支援 ALPN 協定,Chrome 瀏覽器又放棄了 NPN 的舊協定,詳細。你要嘛自己編譯 nginx ,要嘛就是升級到 16.04 才能解決。選哪個方法就看各公司的政策,升了 OS 問題就直接解決了。

不過 Ondřej Surý 包了一個有新版 openssl 的套件出來,所以在 12.04 或是 14.04 都可以使用 ALPN 版本的 nginx:「PPA for NGINX with HTTP/2 on Ubuntu 12.04 LTS and higher」。

目前 16.04 上的 Puppet 爛了不少東西,還是得靠 14.04 吃飯... orz

SaltStack 與 Ansible 的比較

也忘記在哪邊看到的,反正是留在 browser 上的連結。

puppet 跳槽,因為 SaltStack (Salt) 與 Ansible 都是使用 Python 而被選擇,然後完整比較後記錄下來:「Moving away from Puppet: SaltStack or Ansible?」。

先說結論,最後看起來是選擇了 Salt:

At this point both Salt and Ansible are viable and excellent options for replacing Puppet. As you may have guessed by now, I’m more in favor of Salt.

作者花了相當多的時間比較得到結論,包括從 puppet porting 一個完整的部份 (不是全部,不過還是為數可觀的部份),以及 porting 中間發現問題後開 ticket 詢問。除了技術面上的評估外,還包括了 community 的態度... (其實是狂婊 Ansible... XDDD)

Puppet 新給的入門文件

Puppet 寫了一份新的入門文件:「Check Out Our New Beginner's Guide to Writing Modules」,實際的文件在「Beginner's Guide to Modules」這裡。

文件不是給完全新碰 Puppet 的人讀的,你還是必須先知道基本的結構,這部份可以看「Learning Puppet」這份,尤其是名詞定義的部份。

看過一次後覺得是從不同面向解釋 Puppet,跟原來的那份文件互補。最近剛好會用到...

在 Ubuntu 12.04 LTS 上跑 Docker...

dockerdotCloud 發展出來的 LinuX Container 管理程式。

由於建議在 Linux Kernel 3.8 以上的版本跑,所以在 Ubuntu 12.04 LTS 上會需要 backport kernel,參考「ubuntu 12.04 kernel upgrade to 3.10」這篇的方法就可以了。

sudo apt-get install linux-image-generic-lts-raring
sudo apt-get install linux-headers-generic-lts-raring

裝完重開機後應該就可以看到新版 kernel:

$ uname -a
Linux GSLIN-DESKTOP 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 18:32:41 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

接下來依照「使用 Docker/LXC 迅速启动一个桌面系统」這篇的方法,透過 ppa 安裝 docker。

sudo add-apt-repository ppa:dotcloud/lxc-docker
sudo apt-get update
sudo apt-get install software-properties-common lxc-docker

然後用標準的 ubuntu 系統,第一次跑需要抓檔案,但第二次跑就快很多了:

sudo docker run -i -t ubuntu /bin/bash

每次都是乾淨的環境,我第一次進去的時候 touch 一個檔案,第二次進去後就沒了:

gslin@GSLIN-DESKTOP [~] [04:52/W3] sudo docker run -i -t ubuntu /bin/bash
WARNING: Docker detected local DNS server on resolv.conf. Using default external servers: [8.8.8.8 8.8.4.4]
root@679a4301aecc:/# ls -al /tmp
total 8
drwxrwxrwt  2 root root 4096 Apr 11 21:11 .
drwxr-xr-x 24 root root 4096 Sep 22 20:52 ..
root@679a4301aecc:/# touch /tmp/foo.txt
root@679a4301aecc:/# ls -al /tmp
total 8
drwxrwxrwt  2 root root 4096 Sep 22 20:52 .
drwxr-xr-x 25 root root 4096 Sep 22 20:52 ..
-rw-r--r--  1 root root    0 Sep 22 20:52 foo.txt
root@679a4301aecc:/# exit
gslin@GSLIN-DESKTOP [~] [04:52/W3] sudo docker run -i -t ubuntu /bin/bash
WARNING: Docker detected local DNS server on resolv.conf. Using default external servers: [8.8.8.8 8.8.4.4]
root@7ced1a7c82bb:/# ls -al /tmp
total 8
drwxrwxrwt  2 root root 4096 Apr 11 21:11 .
drwxr-xr-x 24 root root 4096 Sep 22 20:52 ..
root@7ced1a7c82bb:/# exit

另外可以參考「Docker: Git for deployment」這篇。

看起來是拿來測試的好工具... 準備拿來測 Puppet