How to automate the creation of a vCAP user-defined variable in a Bluemix deployment?

432 views Asked by At

I am trying to create an application in DevOps Services using Alchemy API services. Every time I try to build and deploy the application I need to set the Alchemy_Key in Bluemix Environment Variable. Is their any option to automate the creation of User-Defined Variable?

2

There are 2 answers

2
Sandhya Kapoor On BEST ANSWER

You can automate the creation of a user defined environment variable by adding the following to the manifest.yml file :

env:
    ALCHEMY_KEY: ${value}

Please look at the following link for additional attributes to be used in manifest.yml for deploying applications : http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html

Thanks.

0
mmallett On

You can also use the cf CLI command: cf set-env

cf help set-env NAME: set-env - Set an env variable for an app

ALIAS: se

USAGE: cf set-env APP_NAME ENV_VAR_NAME ENV_VAR_VALUE