DWHは、ガネーシャの夢をみるのか

引用
P249
....
期待して何がいけないのだろう。未来は今よりよくなるかもしれない。そういうささやかな「希望」があるから僕たちは毎日を生きていけるんじゃないだろうか。期待は希望なんじゃないか。
「せやから迷ってんねん」
ガネーシャは言った。
「自分の言うとおりや。そうやって人は生きていくねん。未来に期待して生きていくねん。期待がなくなったら、絶望してしまうからなぁ」
そう言ったあとガネーシャは、ゆっくりと口を動かした。重い言葉だった。








「けどなぁ......期待しているかぎり、現実を変える力は持てへんのやで」

.......

Data Ware House のようなものから、はやりの、Big Dataまで。
それを、用意すれば、何かが解決するという、期待をもっているだけで、人は生きていけるけれども...


現実を変えるのは、変わった事実の積み重ねでしかないのは、なんでも、同じだからなぁ。。


目に映るもの、全てが、視えルワケではない。。。

オプション機能 (属性:エンジニア , 属性:マネージャ)

全知全能でない限り、ひとには、かならず、弱点があり*1
補う事で、なんとか、生きていられる。


最近じゃ、正義のヒーロも、基本の能力を上げる特訓パターンをすてて
なにやら色んなオプションを身につけて、悪の組織と闘ってるらしい。


しかし、オプションをガンガン身に付けていくとなると、課金がたまらない。。
しかし、オプションをガンガン身に付けていくのであれば、従来の弱点克服とかわらんのではないかと?


そんなあなたに、仲間と一緒に冒険へ
近頃の正義のヒーロも、そこんところの限界にぶちあたり、そう!!
パーティーを組む方法で、困難を乗り越えているではないか?!

そして、この場合、もちろん、各々の抜けた所がはっきりしている方が
面白い 組み易いし、力も、発揮し易い。


エンジニア。
マネージャ。
セールス。


そういうものも、そんな、「オプション機能」の話と考えれば、
お互いの自尊心が傷つかなくてよいのではないだろうか?
いや、空気読まないおまえが言うなってのは、このさい、おいておこう。


まぁ、そりゃ、空も飛べる(004)加速装置つき(009)が、いいんじゃないと
子供の頃、思ったときもあるけれども、それじゃ、課金出来ない
お腹が減りすぎる。。


どっちかちいうと、木・火・土・金・水 の五行みたいなイメージかなぁ。


必要なオプションがついているかいないかは、見つけ易いんじゃないのだろうか。

お互いにね。

*1:ギリシャ神話だと、神にも、弱点があるくらいだ

Riak Serious Talk 感想

id:tagomoris さん主催の Riak Serious Talk へ、いってきました。


参加者は招待制、遅刻したら入れない、Tweet禁止、他言無用というしばりの中
沢山の出席者があつまり、とても面白かったです。


id:tagomoris id:repeatedly の二人に、自分がLTやると書かれたので、
一応、ごにょごにょと、発表もしてきました。
まぁ、非公開なのでいいかなと、たいした話ではありませんでしたが、とても緊張しました。 (´・ω・`)


一番、よかったのは、中の人とポジショントークなしで、色々、ディスカッションできた事ですね。
こういうのは、大きなベンダーの集まりだと、なかなか、できません。
いや、そもそも、まぁ、開発者同士が、フラットに話す事が難しいですけど。。


試みとしては、良い感じだったと思います。


色々、感謝します。。

俺は伊達や酔狂で内製やってるんだ!-- 続

若干、1名、つづきを求めていたので、ちょっと、また、書く。
今日のテーマは、簡単な事。

ユーザの自己評価は、おりこうさん、か、おばかさん、どっち?

春一番が、掃除したての.... *1

通常、SIさんに任せているときは、当然、沢山の協力会社さんがいらっしゃります。
一括で、まるっと、お願いするパターンもあれば、行程毎にお願いする事もあるわけで。


そんなこんなで、おのずと、それぞれの単価や、能力もみえてくるってもんです。


ああ、内製なんかに、ヨロヨロとよろめくと、お別れのシーズンがくるのですよねぇ。。


下手すると、その辺の社員よりも、ながーーーく、業務を支えている協力会社さんも
いたりするわけで、それはそれは、大変です。。。


内製といっても、いくつかのパターンがあると思っています。*2

  1. プロマネの役割をユーザが行う
  2. 設計者、ユーザが行う
  3. 実装者もユーザがおこなう


いきなり、全てを自分の力だけでやる訳にはいかないので、
今まで、やってもらっていた「なにか」はユーザがやる。
となれば、当然、なにをやる=誰を切るになりまする。

風が、カムイの影をきーる *3

さて、何を切る?


色々な考えもあると思いますが、ここでは、単純化しましょう。*4
コストで、ハイ&ロウ!!!


月単価の高い方から切るか?安い方から切るか?
どっち?どっち?どっち?


自分の値段を決めるのに、等しい事だと、この時に気が付く人は多い。。。
痛々しいです。。。

わたし馬鹿よねぇ、おばかさんよねぇ...*5

普通、高い方から、切るんですよねぇ。。
そりゃ、そうだわ、だって、必要なのは誰にでも出来るくらいの金額の
人足なんですから!!
いままで、やってなかっただけで、やればできるんだからね!!

...........


...........



ない、ないわ、それ。。。


低い方から切ります。
そして、高い人に、育てる事も仕事としてお願いします。
数は、いりません。そのかわり、必死で、その人の程度を見極める修行をします。
そこは、誰も教えてくれません。
それが、身につけられなかったら、内製なんてできません。。


そのことが、自分たちは、無能であると、宣言するのと一緒だとしても
現実を受け止めることも出来ないのなら、何かを作ろうなんて資格はないっすよねぇ。。

まだまだあるけど

ちょっと、かわった感じの話を書いてみたので、この辺でおしまい。
また、読みたい人がいたら、考えます。

この話は、結構、考えるネタにはなるとおもうんよ。
でも、まぁ、実行するには、黒魔術がいるけどなぁ。。。

*1:春一番 (キャンディーズの曲) - Wikipedia

*2:必ずしも、これに賛同しているわけではないですの。でも、パターンとしては受け入れないと仕方ない

*3:カムイ外伝 - Wikipedia

*4:金と実力は違うときもあんだろう、とかは、十分承知。

*5:心のこり - Wikipedia

Python Fabric で、自動応答 -- pexpect

結局、Expectになった。

どうやら、Fabricは、プロンプトに対しての自動応答の提供は、やらない方針みたいだ。
まぁ、それが大変だから、こういう仕掛けを作っていると言えば、それもそうだ。


昔は、出来なかったが、今は、ptyへの入力ができるので、expectを使えば
自動応答は、可能だし。


ということで、やってみる。

def python_shell():

    run("python")

こういう、関数を作って、リモートホストに実行する。

MBA:fabric guutara$ fab python_shell
[] Executing task 'python_shell'
[] run: python
[] out: Python 2.7.3 (default, May 16 2012, 14:24:13) 
[] out: [GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
[] out: Type "help", "copyright", "credits" or "license" for more information.
[] out: >>> 

ここで、入力待ちになって止まるので、以下を入力すると、実行が終了する。

[] out: >>> exit()
[] out: 


Done.
Disconnecting from xxxxxxxx@xxxxxxxx.sakura.ne.jp... done.

さて、これを自動応答させてみる。
思いっきりベタですが。。

import pexpect

env.use_ssh_config = True
env.hosts = ['xxxxxxxx']

env.shell = "/usr/local/bin/bash -l -c "

def expect():

    cmd= "fab python_shell"

    child = pexpect.spawn(cmd)
    child.logfile = sys.stdout

    child.expect('>>>*')
    child.sendline('exit()')

  
def python_shell():

    run("python")

で、実行してみる。

MBA:fabric guutara$ fab expect
[] Executing task 'expect'
[] Executing task 'python_shell'
[] run: python
[] out: Python 2.7.3 (default, May 16 2012, 14:24:13) 
[] out: [GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
[] out: Type "help", "copyright", "credits" or "license" for more information.
[] out: >>> exit()

Done.
MBA:fabric guutara$

ということで、出来ました。


これが出来ると、ほぼ、やりたい事はできるな。

Python Fabrik で、試す

もう少し、弄ってみたので、亡備録。

まず、リモートで動かすのは、runとかでやる。

env.use_ssh_config = True
env.hosts = ['xxxxxxxx']


env.shell = "/usr/local/bin/bash -l -c "

def hello():

    run("echo `hostname`")

ssh/config を使う様にしたので、そいつを有効にした。

次に、ローカルで、あれこれやってみる。
丁度、init.elを、gitに上げているので、それを、自動化してみた。

def git_log():
    with lcd("~/git/initel.git"): 
        local("git log")


def git_commit():

    local("cp ~/.emacs.d/init.el ~/git/initel.git/")
    with lcd("~/git/initel.git"):
    # Err があっても、Abortしないようにする
        with settings(warn_only=True):
            result = local("git add . && git commit -m 'commi'") 
            if result.failed and not console.confirm("Tests failed. Continue anyway?"):
                abort("Aborting at user request.")

    git_push()


def git_push():
 
    with lcd("~/git/initel.git"):
        local("git push")
        

commitは、何も、commitするものがないと、エラーになるので
settings(warn_only=True): で、エラーでアボートしないようにして
人が、Y/nを入力する様にしてみた。

最後に、howmの中をを、rsyncしてみた。

def rsync_howm():
    
   project.rsync_project('~/.howm', '~/.howm')

舐めてんのか、くらい、簡単な例ですみません。。

全文を、のっけときます。

# -*- coding: utf-8 -*-

from fabric.api import env,run,local,lcd,settings,abort
from fabric.contrib import console,project

env.use_ssh_config = True
env.hosts = ['xxxxxxxx']


env.shell = "/usr/local/bin/bash -l -c "

def hello():

    run("echo `hostname`")

def local_date():
    local("date")

def git_log():
    with lcd("~/git/initel.git"): 
        local("git log")


def git_commit():

    local("cp ~/.emacs.d/init.el ~/git/initel.git/")
    with lcd("~/git/initel.git"):
    # Err があっても、Abortしないようにする
        with settings(warn_only=True):
            result = local("git add . && git commit -m 'commi'") 
            if result.failed and not console.confirm("Tests failed. Continue anyway?"):
                abort("Aborting at user request.")

    git_push()


def git_push():
 
    with lcd("~/git/initel.git"):
        local("git push")
        

def rsync_howm():
    
   project.rsync_project('~/.howm', '~/.howm')

ちなみに、鍵認証のパスワード無しで、sshは、つないでます。

あと、Pythonは、書いた事無いです。。 (´・ω・`)

Python Fabric を入れてみる。

ちょっと、自動化の下調べに、Fabric を、Mac OSX 10.7.5 にいれてみる。

いまは、homebrew で、構築してあるので、pipで、入れる。

MBA:~ guutara$ pip install Fabric
Downloading/unpacking Fabric
  Downloading Fabric-1.6.0.tar.gz (215kB): 215kB downloaded
  Running setup.py egg_info for package Fabric
    
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
Downloading/unpacking paramiko>=1.10.0 (from Fabric)
  Downloading paramiko-1.10.0.tar.gz (822kB): 822kB downloaded
  Running setup.py egg_info for package paramiko
    
Downloading/unpacking pycrypto>=2.1,!=2.4 (from paramiko>=1.10.0->Fabric)
  Downloading pycrypto-2.6.tar.gz (443kB): 443kB downloaded
  Running setup.py egg_info for package pycrypto
    
Installing collected packages: Fabric, paramiko, pycrypto
  Running setup.py install for Fabric
    
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    Installing fab script to /usr/local/share/python
  Running setup.py install for paramiko
    
  Running setup.py install for pycrypto
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for __gmpz_init in -lgmp... no
    checking for __gmpz_init in -lmpir... no
    checking whether mpz_powm is declared... no
    checking whether mpz_powm_sec is declared... no
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for inttypes.h... (cached) yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking stddef.h usability... yes
    checking stddef.h presence... yes
    checking for stddef.h... yes
    checking for stdint.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking wchar.h usability... yes
    checking wchar.h presence... yes
    checking for wchar.h... yes
    checking for inline... inline
    checking for int16_t... yes
    checking for int32_t... yes
    checking for int64_t... yes
    checking for int8_t... yes
    checking for size_t... yes
    checking for uint16_t... yes
    checking for uint32_t... yes
    checking for uint64_t... yes
    checking for uint8_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for memmove... yes
    checking for memset... yes
    configure: creating ./config.status
    config.status: creating src/config.h
    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
    building 'Crypto.Hash._MD2' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.7-x86_64-2.7/src/MD2.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/MD2.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_MD2.so
    building 'Crypto.Hash._MD4' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD4.c -o build/temp.macosx-10.7-x86_64-2.7/src/MD4.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/MD4.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_MD4.so
    building 'Crypto.Hash._SHA256' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SHA256.c -o build/temp.macosx-10.7-x86_64-2.7/src/SHA256.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/SHA256.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_SHA256.so
    building 'Crypto.Hash._SHA224' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SHA224.c -o build/temp.macosx-10.7-x86_64-2.7/src/SHA224.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/SHA224.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_SHA224.so
    building 'Crypto.Hash._SHA384' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SHA384.c -o build/temp.macosx-10.7-x86_64-2.7/src/SHA384.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/SHA384.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_SHA384.so
    building 'Crypto.Hash._SHA512' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SHA512.c -o build/temp.macosx-10.7-x86_64-2.7/src/SHA512.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/SHA512.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_SHA512.so
    building 'Crypto.Hash._RIPEMD160' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -DPCT_LITTLE_ENDIAN=1 -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/RIPEMD160.c -o build/temp.macosx-10.7-x86_64-2.7/src/RIPEMD160.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/RIPEMD160.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Hash/_RIPEMD160.so
    building 'Crypto.Cipher._AES' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/AES.c -o build/temp.macosx-10.7-x86_64-2.7/src/AES.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/AES.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_AES.so
    building 'Crypto.Cipher._ARC2' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ARC2.c -o build/temp.macosx-10.7-x86_64-2.7/src/ARC2.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/ARC2.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_ARC2.so
    building 'Crypto.Cipher._Blowfish' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/Blowfish.c -o build/temp.macosx-10.7-x86_64-2.7/src/Blowfish.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/Blowfish.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_Blowfish.so
    building 'Crypto.Cipher._CAST' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/CAST.c -o build/temp.macosx-10.7-x86_64-2.7/src/CAST.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/CAST.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_CAST.so
    building 'Crypto.Cipher._DES' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -Isrc/libtom/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/DES.c -o build/temp.macosx-10.7-x86_64-2.7/src/DES.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/DES.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_DES.so
    building 'Crypto.Cipher._DES3' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -Isrc/libtom/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/DES3.c -o build/temp.macosx-10.7-x86_64-2.7/src/DES3.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/DES3.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_DES3.so
    building 'Crypto.Cipher._ARC4' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ARC4.c -o build/temp.macosx-10.7-x86_64-2.7/src/ARC4.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/ARC4.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_ARC4.so
    building 'Crypto.Cipher._XOR' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/XOR.c -o build/temp.macosx-10.7-x86_64-2.7/src/XOR.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/XOR.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Cipher/_XOR.so
    building 'Crypto.Util.strxor' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/strxor.c -o build/temp.macosx-10.7-x86_64-2.7/src/strxor.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/strxor.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Util/strxor.so
    building 'Crypto.Util._counter' extension
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -fwrapv -Wall -Wstrict-prototypes -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_counter.c -o build/temp.macosx-10.7-x86_64-2.7/src/_counter.o
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.7-x86_64-2.7/src/_counter.o -o build/lib.macosx-10.7-x86_64-2.7/Crypto/Util/_counter.so
    
Successfully installed Fabric paramiko pycrypto
Cleaning up...

MBA:~ guutara$ fab

Fatal error: Couldn't find any fabfiles!

Remember that -f can be used to specify fabfile path, and use -h for help.

Aborting.

MBA:~ guutara$ which fab
/usr/local/share/python/fab
MBA-20120331:~ guutara$ ls /usr/local/share/
aclocal	doc	gnupg	locale	man	python
MBA-20120331:~ guutara$ ls /usr/local/share/python/
Extras/                rst2latex.py           rst2pseudoxml.py       rstpep2html.py         sphinx-quickstart
fab                    rst2man.py             rst2s5.py              sphinx-apidoc          
pygmentize             rst2odt.py             rst2xetex.py           sphinx-autogen         
rst2html.py            rst2odt_prepstyles.py  rst2xml.py             sphinx-build           
MBA:~ guutara$ ls -al /usr/local/share/python/fab 
-rwxr-xr-x  1 guutara  admin  389  3 13 15:01 /usr/local/share/python/fab
MBA:~ guutara$ 

/usr/local/share/python/ 配下に、インストールされてる。
そういえば、sphinx も、そうだったっけ。

fabric.py を、とりあえず、書いて実行してみた。
bsd系につないだので、env.shell を書き直した。。

from fabric.api import env,run

env.hosts = ['xxxxxx.sakura.ne.jp']
env.user = "xxxxxx"
env.password = "yyyyyyyy"
env.shell = "/usr/local/bin/bash -l -c "

def hello():
    run("echo `hostname`")

実行結果

MBA-20120331:fabric guutara$ fab hello
[xxxxxx.sakura.ne.jp] Executing task 'hello'
[xxxxxx.sakura.ne.jp] run: echo `hostname`
[xxxxxx.sakura.ne.jp] out: zzzz.sakura.ne.jp
[xxxxxx.sakura.ne.jp] out: 


Done.
Disconnecting from xxxxxx.sakura.ne.jp... done.

簡単だ。。
昔のオートパイロットみたいだなぁ。。