a cloudfounry manifest.yml is a quite powerful way to express the deployment model of an application. That would be really great is if services could also be created as specified in the manifest.yml.
Please consider the following 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
This file describes 3 instances of 2 application, all bound to MQLight-sampleservice but this service has to exist before.
I can easily create this service using the cloudfoudry command line tool
cf create-service MQLight-sampleservice MQLight
But I'd like to have everything in one file, is this possible?
It is currently not possible with the current cloud foundry cli v6. There is a work item open for this feature: https://www.pivotaltracker.com/n/projects/892938/stories/65262468
Meanwhile, I recommend creating a script:
createServiceAndPush.sh
cf cs mysql 100 mymysqldb
cf push