Deploying to multiple Cloud Foundry APIs in parallel using CLI

468 views
Skip to first unread message

Chris Sterling

unread,
Jan 15, 2015, 7:13:05 PM1/15/15
to vcap...@cloudfoundry.org
We have a situation where we are deploying an app to two different Cloud Foundry API endpoints using TravisCI in a continuous delivery approach to production. It is working well if we push the updated app using a serial approach, to one API endpoint and then the other after it succeeds. But when we try to push to both in parallel with fancy login/logout using Cloud Foundry CLI it fails around 1/2 of the time. This seems to be due to the shared state between shell processes being run by the same user. Is anyone else push an app to multiple Cloud Foundry API endpoints in parallel and have an approach that works more effectively. We'd like to reduce the deployment timespan if we can. Thanks.

- Chris

David Lee

unread,
Jan 15, 2015, 7:57:52 PM1/15/15
to vcap...@cloudfoundry.org
Hi Chris,

Are you pushing in parallel from the same machine and the same (machine) user account?

If this is the case, you can set the environment variable CF_HOME with a different directory for each parallel instances. Then each cf will have its own copy of the settings.

(The CF CLI maintains state across commands; this information is stored in ~/.cf by default. If you change the login/target info from one run of the cf command, it will change the state inside ~/.cf. This affects all subsequent commands on that machine and user.)

-Dave



On Thu, Jan 15, 2015 at 4:13 PM, Chris Sterling <chris.s...@gmail.com> wrote:
We have a situation where we are deploying an app to two different Cloud Foundry API endpoints using TravisCI in a continuous delivery approach to production. It is working well if we push the updated app using a serial approach, to one API endpoint and then the other after it succeeds. But when we try to push to both in parallel with fancy login/logout using Cloud Foundry CLI it fails around 1/2 of the time. This seems to be due to the shared state between shell processes being run by the same user. Is anyone else push an app to multiple Cloud Foundry API endpoints in parallel and have an approach that works more effectively. We'd like to reduce the deployment timespan if we can. Thanks.

- Chris

--
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/f5e5dbac-07f2-4764-aa0b-aa7d3ed912e4%40cloudfoundry.org.

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

Chris Sterling

unread,
Jan 15, 2015, 8:01:00 PM1/15/15
to vcap...@cloudfoundry.org, dc...@pivotal.io
Thanks, David!
Reply all
Reply to author
Forward
0 new messages