在这一轮中,我主要考察两个方面:部署和环境变量的配置。我还把一些有关起步,仪表板的截图和对其它的杂项操作的观察囊括了进来。在以后的文章中,我们将会运行一些基础的性能测试,然后来看看架构伸缩难易程度。 |
|
Provider | Deployment method | Environment variables | Performance |
---|---|---|---|
Nodejitsu | CLI | CLI or web interface | coming soon |
Heroku | git | CLI | |
Modulus | CLI or web upload | CLI or web interface | |
App Fog | CLI | CLI or web interface | |
Azure | CLI or git | CLI or web interface | |
dotCloud | CLI | CLI or .yml file | |
Engine Yard | git | ey_config npm module | |
OpenShift | git | SSH and create file | |
CloudFoundry | coming soon | coming soon |
设置
我开始于一个非常简单的 Express app,使用 nconf可以提供多种不同的方式,让我们可以给app指定端口,监听我们的应用程序(必要时)以及一个dummy变量,我称之为SECRET。它会先寻找节点命令传递的参数,环境变量,然后从根目录的上一级到我们制定的默认位置,尝试加载的config.json文件。当加载app时,我们能知道变量从外部源加载是否正确。如果错误,加载app时将回滚到默认的SECRET。如果我可以访问app的启动日志,也就可以看到app监听在NODE_ENV上的哪个端口。
最后,我设置”engines”: { “node”: “v0.10.x” …到 package.json文件中,就可以看到每个提供者如何响应。
现在没有特定的顺序..
|
|
|
|
|
|
|
|
|
CloudFoundry
At first look, CloudFoundry has a clear and friendly process for
getting started. However, a few screens into the process I was presented
with this message:
We are in a time of transition:
You are reading V2 documentation… Cloudfoundry.com will be upgraded to V2 in June 2013.
So I’ll circle back to them in the next installment of this series.
Until Next Time
Needless to say things are changing quickly in this space. Don’t put
too much weight on any specific detail here without first checking for
updates. For example, in the couple of days that it took me to type this
up, Modulus sent out an email about upgrading their version of Node.js.
In future posts I’ll be walking through how we can monitor and test
the performance of these platforms, and then take a shot at scaling
them. In the meantime, let me know if I’ve missed your favorite Node.js
PaaS.