dotcloud ( PaaS ) 試用

16 views
Skip to first unread message

Pofeng Lee ( 李柏鋒 )

unread,
May 7, 2011, 2:57:21 PM5/7/11
to cloudtw
要先申請 beta account ( http://www.dotcloud.com/ )

ref: http://docs.dotcloud.com/tutorials/firststeps/
ref: http://gugod.org/2011/05/-dotcloud.html

安裝 python-setuptools ( for easy_install )

pofeng@ubuntu:~$sudo easy_install dotcloud

pofeng@ubuntu:~$ dotcloud create pofeng
Warning: /home/pofeng/.dotcloud/dotcloud.conf does not exist.
Enter your api key (You can find it at
http://www.dotcloud.com/account/settings): ( ..... 在這裡輸入 API key
...... )
Created "pofeng"

pofeng@ubuntu:~$ dotcloud deploy -t php pofeng.www
Created "pofeng.www".

pofeng@ubuntu:~$ dotcloud info pofeng.www
cluster: wolverine
config: {}
created_at: 1304792214.3267519
name: pofeng.www
namespace: pofeng
state: booting
type: php

( VM 還沒啟動, 先來寫程式 )

pofeng@ubuntu:~$ mkdir myapp
pofeng@ubuntu:~$ cd myapp
pofeng@ubuntu:~/myapp$ vim index.php

pofeng@ubuntu:~/myapp$ dotcloud push pofeng.www .
( push 本地目錄 "." )
error: The service is still booting. It will be ready in a few minutes.
( 但是 VM 還是沒有啟動, 再等一下 )


pofeng@ubuntu:~/myapp$ dotcloud info pofeng.www
cluster: wolverine
config:
path: /
static: static
created_at: 1304792214.3267519
name: pofeng.www
namespace: pofeng
ports:
- name: ssh
url: ssh://dotc...@www.pofeng.dotcloud.com:4260
- name: http
url: http://www.pofeng.dotcloud.com/
state: running
type: php

pofeng@ubuntu:~/myapp$ dotcloud push pofeng.www .
# upload . ssh://dotc...@uploader.dotcloud.com:1060/pofeng.www
# rsync
Warning: Permanently added
'[uploader.dotcloud.com]:1060,[174.129.15.77]:1060' (RSA) to the list
of known hosts.
building file list ... done
./
index.php

sent 145 bytes received 34 bytes 5.19 bytes/sec
total size is 52 speedup is 0.29
Scheduling build
Fetching logs...
ssh: connect to host www.pofeng.dotcloud.com port 4260: Connection timed out
Abort.

pofeng@ubuntu:~/myapp$ lynx http://www.pofeng.dotcloud.com
( 來連線看看 ok 了沒)


( SSH 連進去看看 )

dotcloud@pofeng-www:~$ uptime
18:50:07 up 14 days, 17:46, 1 user, load average: 7.13, 7.25, 7.48

--
Pofeng "informer" Lee, 李柏鋒, pofeng at gmail dot com

Reply all
Reply to author
Forward
0 new messages