自從去年接觸Cloud與SaaS以來,就一直想自己搞個(gè)什么東西。但之前的開發(fā)是基于AWS,沒有美刀,就想在免費(fèi)的Paas上牛刀小試了。
開始是GAE,可惜Google和ZF不對(duì)付,開始還能用用,后來干脆咯屁,所以不了了之。
后來又有了VMWare Cloud Foundry與DotCloud,感覺各有千秋。VMWare的 Micro Cloud Foundry 很是吸引我,但是Cloud Foundry的申請(qǐng)比較麻煩些,好不容易找了個(gè)時(shí)間把玩把玩,等不了VMWare的爺們了。說干就干,就拿DotCloud開刀。
對(duì)了,它的空間大小限制:
For the Free plan, database services default to 10 MB of disk, and 10 MB of RAM.
With the Pro plan, database services have 10 GB of disk, and 300 MB of RAM
>> 安裝Command Line Interface
跟Amazon EC2一樣,DotCloud也提供了一個(gè)CLI,用于平時(shí)的管理(呵呵,其實(shí)DotCloud本身就跑在了Amazon EC2上)。
不過DotCloud CLI是基于Linux的,在Windows上沒有官方支持,汗!!幸好有好事者kalman Speier搞出一個(gè)Work Around,竟被DotCloud的同志們引用,更貼心的是,Kalman君還做一個(gè)安裝包,不需配置過程,安裝即可。感謝kalman Speier,否則我到此就要打道回府了。
https://github.com/speier/DotCloudWin
https://github.com/speier/DotCloudWin/downloads
>> 常用的DotCloud命令
--------------------------------------------------------------
positional arguments:
? {info,status,stats,run,logs,versions,url,setup,list,rollback,alias,ssh,push,de
stroy,create,restart,history}
??? setup?????????????? setup your api key
??? history???????????? display the last commands you ran
???
create
????????????? create an application
???
push
??????????????? push your application
??? list??????????????? list your applications
??? versions??????????? list the versions of your application
??? run???????????????? run a remote command
??? logs??????????????? read logs
??? alias?????????????? bind a custom domain name to a service
??? destroy???????????? destroy your application
??? url???????????????? display URL(s) of your application
??? info??????????????? get information about your application or service
??? status????????????? check the status
??? stats?????????????? display the HTTP stats of your service
??? rollback??????????? rollback your service to the previous pushed version
??? ssh???????????????? open an SSH session
??? restart???????????? restart your service
optional arguments:
? -h, --help??????????? show this help message and exit
-------------------------------------------------------------
最關(guān)鍵的就是create/push。前者用來創(chuàng)建一個(gè)新的應(yīng)用,而后者就是用來更新的。
>> 創(chuàng)建一個(gè)新的應(yīng)用
物理結(jié)構(gòu):
值得注意的是,需要在根目錄添加一個(gè)配置文件dotcloud.yml.因?yàn)檫@個(gè)東西只是一個(gè)簡單的static HTML應(yīng)用,很容易:
dotcloud.yml:
--------------------------------------------
www:
? type: static
--------------------------------------------
命令行與閹割后的結(jié)果:
D:\Piaoger\dotcloud>dotcloud create todolist
Created application "todolist"
D:\Piaoger\dotcloud>dotcloud push? todolist
Deployment finished. Your application is available at the following URLs
www: http://todolist-piaoger.dotcloud.com/
>> 檢查成果
點(diǎn)開 http://todolist-piaoger.dotcloud.com/
呵呵,此路已通,終于可以開始我的JavaScript/HTML3/CSS3了。
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
