【发布时间】:2015-08-10 15:15:17
【问题描述】:
cloudfounry manifest.yml 是一种非常强大的方式来表达应用程序的部署模型。如果服务也可以按照 manifest.yml 中指定的方式创建,那就太好了。
请考虑以下 manifest.yml
---
applications:
- name: MQL.sample.node.backend
disk: 1024M
command: node app.js
path: mqlight_sample_backend_node
memory: 256M
instances: 2
no-route: true
services:
- MQLight-sampleservice
- name: MQL.sample.node.frontend
disk: 1024M
command: node app.js
path: mqlight_sample_frontend_node
memory: 512M
host: mqlightsample-node-${random-word}
services:
- MQLight-sampleservice
此文件描述了 2 个应用程序的 3 个实例,均绑定到 MQLight-sampleservice 但此服务必须在之前存在。
我可以使用 cloudfoudry 命令行工具轻松创建此服务
cf create-service MQLight-sampleservice MQLight
但我想将所有内容都放在一个文件中,这可能吗?
【问题讨论】:
标签: node.js cloud cloud-foundry ibm-cloud paas