Is there a way to set a manifest.yml property for a specific space, e.g. if I want to have 5 instances of my service when deploying to the production space but having only 1 for all other spaces?
相关问题
- Failed to load UI5 component with properties .. Fi
- Error 500: Closure.rehydrate at deploying grails a
- Access PCF DEV from external machine on same netwo
- How To Deploy A Modular (Multi-app) System To Clou
- I am having trouble starting my node app in Bluemi
相关文章
- Are mongodb backups made automatically?
- How to install CloudFoundry on local server
- How to download the app with the CLI from the Swis
- Accessing the java executable from a cloudfoundry
- cloudfoundry: use an older buildpack version
- GYP ERR! build error. stack Error: 'make'
- Cloud Foundry / Bluemix load balancing
- how to download pip dependencies locally? [duplica
Depending on the deployment tool, you can parameterise the instances. For ex: in IBM Urban Code Deploy (UCD), you can declare number of instances as a component environment property and you can given different values for each space. DEV, QA can have 1 and PROD can have 5.
There are multiple ways to use this property.
Value of instance_count parameter can be configured per Space in Urban Code Deploy. I'm sure you can do this with Concourse or other deployment tools also.
Urban Code Deploy and other tools run the cf push command to push the application. In the push command, you can give -i parameter and use the instance_count variable which will substitute the value depending on the space to which you are pushing.
You can use the first method to parameterise several fields such as memory, log level etc which can have different values for different spaces.
A few options come to mind:
You can override
manifest.yml
settings withcf
cli arguments. Thus you could put an instance count of one into yourmanifest.yml
file (actually, you don't need to do this because one is the default value but you can put any value in the file) and when youcf push
that overrides the value frommanifest.yml
with the value you set as the cli argument. Ex:cf push -i <override>
.There's no conditional logic available in an app's manifest.yml, but there's nothing stopping you from using a template language with your manifest. You could, for example, run a templated
manifest.yml
through Ruby'serb
(or any other template engine) to make some dynamic adjustments and then use the output to deploy your app.Don't use
manifest.yml
at all. Instead just use a shell script and a composition ofcf
cli commands and arguments. It's a little more work to get going, but you get all the dynamic behavior of a shell script. Actually, it doesn't have to be a shell script. You could use Python or Ruby or insert your favorite scripting language here.Probably not exactly the answer you were hoping for here, but hope that it helps.