cloudfoundry-attic / vcap-yeti

Cloud Foundry - the open platform as a service project
Apache License 2.0
15 stars 31 forks source link

Support for specifying env in assets.yml #10

Closed youngm closed 11 years ago

youngm commented 11 years ago

Similar to my buildpack PR: https://github.com/cloudfoundry/vcap-yeti/pull/9

Our cf installation doesn't have access to the internet. So in order to install all of the ruby apps that test the non ruby aspects of CF I need to be able to specify a proxy for bundle install when running tests.

Here is an example usage. This asset config allows me to deploy ruby apps without the default ruby build pack installed and without direct internet access from my DEAs:

simple_app:
  memory: 512
  command: "bundle exec ruby foo.rb -p $VCAP_APP_PORT"
  path: "assets/sinatra/hello_vcap"
  buildpack: https://github.com/cloudfoundry/heroku-buildpack-ruby.git
  env:
    http_proxy: http://someproxy:80
    https_proxy: http://someproxy:80
matthewmcnew commented 11 years ago

Hi @youngm,

Another way that you can set ENV variables for an application is by changing the command line in the configuration. An example is below:

simple_app:
  memory: 512
  command: "http_proxy='http://someproxy:80' bundle exec ruby foo.rb -p $VCAP_APP_PORT"
  path: "assets/sinatra/hello_vcap"
  buildpack: https://github.com/cloudfoundry/heroku-buildpack-ruby.git

Please reopen if this doesn't work for you.

@matthewmcnew / @mmb

youngm commented 11 years ago

Didn't think of that. I'll give it a try. Thanks.

Mike