Perl5 の PSGI アプリケーションが死ぬほど簡単につかえる dotcloud の beta 版がリリースされ、一部の Perl monger に invitation がばらまかれているとともに、id:miyagawa さんがdotcloud に join したというニュースもあり、ゴールデンウィークまっただなかの日本の Perl Mongers のあいだでは空前のコンフィブームとなっています。
というわけで、DotCloud で hello world をやる方法。
sudo easy_install dotcloud
dotcloud create tokuhirom
dotcloud deploy --type perl tokuhirom.hello
mkdir hello
cd hello
echo "sub {[ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello, dotcloud!' ] ]}" > app.psgi
git init
git add .
git ci -a -m 'import'
dotcloud push tokuhirom.hello .
で、http://hello.tokuhirom.dotcloud.com/ をみればもうつかえてる。すごい。
というわけでつづいては Amon2 を投入してみる。Amon2 の 2.32 で dotcloud 向けに微調整したので、2.32 をいれてください。
dotcloud deploy -t perl tokuhirom.amon2
cpanm Amon2
amon2-setup.pl DemoApp
cd DemoApp
perl Makefile.PL
ln -s htdocs/static static
git init
git add .
git add -f 'inc/'
git commit -a -m 'initilal import'
dotcloud push tokuhirom.amon2 .
http://amon2.tokuhirom.dotcloud.com/ こういうかんじになります! 簡単すぎる……。