Different manifest file options for different spaces.

655 views
Skip to first unread message

spe...@rappora.com

unread,
Nov 1, 2014, 11:56:54 AM11/1/14
to vcap...@cloudfoundry.org
I have a number of cf apps that I regularly push between a test and production space. In the test space I need the apps to all target a single mongo store and each have only 128MB of memory and in production they all target their own dedicated mongo stores and have 256MB memory. Is there anyway to configure this with a manifest file so that the proper service bindings occur when I push to my test space or production? Or is there a way to have two separate manifest files, one for test and one for production?

Example:

(test) 
---
applications:
- name: account-service
  memory: 128MB
  command: node account-service.js
  no-route: true
  services:
  - test-store

(production) 
---
applications:
- name: account-service
  memory: 256MB
  command: node account-service.js
  no-route: true
  services:
  - account-store

Koper, Dies

unread,
Nov 1, 2014, 7:40:00 PM11/1/14
to vcap...@cloudfoundry.org

cf push -f test.yml and cf push -f prod.yml?

 

Regards,

Dies Koper

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/04af66ca-92da-4def-ab9e-f5c3d49b83c9%40cloudfoundry.org.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.



 

Ken Krueger

unread,
Nov 2, 2014, 6:26:22 PM11/2/14
to vcap...@cloudfoundry.org
Separate manifest files, one for each space.  Unfortunately, this requires that you specify the manifest every time you push using the CLI.  Consider making the 'dev' space manifest the one named manifest.yml to save the most typing.

Also, bear in mind that one manifest file can inherit from another, so you can put most common settings in the 'parent' file.

k


To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.



--
Ken Krueger  
Manager, Global Education Delivery
407 256 9737 Mobile
kenkrueger65 Skype

Education questions?  educ...@pivotal.io

mzot...@gmail.com

unread,
Apr 20, 2015, 11:48:16 AM4/20/15
to vcap...@cloudfoundry.org
Hi All!

I have an issue, which I guess is similar to the above one. Basically I want to be able to change the host to have different routes (and some other things, e. g. memory) according to the space in target. I have tried to solve it with separate manifest files using inheritance.

manifest-base.yml:
---
timeout: 180
applications:
- name: myTestApp
  memory: 768M
  services:
  - aservice

manifest-child.yml:
---
inherit: manifest-base.yml
applications:
- name: myTestApp
  memory: 512M
  host: test-app
  services:
  - aservice

However, when I try to push my app with the following command:
cf push -f manifest-child.yml myTestApp
it'll be generated with a route starting with "myTestApp", instead of "test-app" (and also with 768M memory).

I've read the docs several times but it's still not clear whether I can override selected attributes of an app with the same name in the child manifest, or is it only possible to define it with a different name...

I would appreciate if someone could point me in the right direction regarding this!

Cheers!
Zoltán
Message has been deleted

Magyar Zoltán

unread,
Apr 21, 2015, 6:20:28 AM4/21/15
to Greg Oehmen, vcap...@cloudfoundry.org
Hi Greg,

Thanks for the answer!

What I see is that it's only installing the app once. Only with the attributes defined in the parent manifest.
Meanwhile I found that the cli always hangs after printing out "App started" followed by an "OK" or somewhere after that:

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

I'm using cli version 6.10 (6.11 has that log error). Should it create the application first according to the parent manifest, then "overwrite" it using the child one and maybe it's not working for me because of this hang? (Sorry for not realizing it earlier).

Cheers!

2015-04-21 2:56 GMT+02:00 Greg Oehmen <goe...@pivotal.io>:
Zoltan:

You should be seeing two apps pushed, no?  If the app name is the same in child and parent, CLI pushes app twice, create routes with the settings from both child and parent, and bind all routes to the app.  

So your parent/child manifests will end up with 1 app 'myTestApp', with 2 hosts 'myTestApp' and 'test-app' and 512M.  Right?

Greg


Reply all
Reply to author
Forward
0 new messages