Closed jmcarp closed 8 years ago
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
@xoebus Does this look reasonable?
Alternatively it could rename every app in the manifest I suppose?
Looks good. Doing zero downtime deployments of all of the applications would be nice to have but that's a large change that no one is asking for yet and is do-able with multiple runs with this pull request.
Cool. I'll go ahead and merge then. Thanks @jmcarp!
@xoebus Is it still the case that if there are multiple applications defined in the same manifest file, Autopilot will NOT perform zero-downtime autodeployment for all of them?
The way I am planning on using your plugin with Travis CI, we'll have a prod-manifest.yml
and a dev-manifest.yml
, each one with at least 2 app definitions, and it sure would be convenient if my script could invoke cf zero-downtime-push
and simply pass it the appropriate manifest file to have all apps therein deployed with zero downtime.
Should I open an issue for that, if that feature is missing?
It won't do all of them but you could iterate through every application in the manifest and use autopilot
to deploy each of them.
@xoebus Yes, but unless I'm missing something, it would require a priori knowledge of all the names of the apps in the manifest, which is not ideal.
For instance, say my dev-manifest.yml
contains descriptors for three CF apps: app1
, app2
and app3
, either my .travis.yml
or my deploy script would need to "know" the names of all those apps so it can execute the zero-downtime push command for each one. If tomorrow I added app4
to dev-manifest.yml
, I would have to once again modify either my .travis.yml
or my deploy script to let it know it should also deploy app4
.
An ideal scenario is where the manifest file is truly the "source of truth": I should be able to just do a zero-downtime push of dev-manifest.yml
and it should deploy whatever apps are there with zero-downtime.
Right, you could parse the manifest in the deploy script to get the list of applications.
@xoebus Right. Just to be clear, because I'm relatively new to CloudFoundry: when you say "parse," are there existing CF tools that easily parse manifest.yml
files, making this a relatively trivial thing, or do you mean literally parsing the manifest file with awk
and grep
? :-)
Yeah, some YAML parsing fun. I don't think there is an existing tool for that.
YAML.load_file(manifest_path).each { |app| puts app.fetch("name") }
@vito and/or @xoebus: would you mind cutting a new release with this?
@cmc333333 Looks like it got included in 0.0.3 a while ago: https://github.com/contraband/autopilot/commit/2ee2da2e36671ce3522079d998393a2ac717dd80
@afeld, yep @xoebus just published that over the weekend. Thanks again!
Avoid downtime on multi-application manifests. See #23 for details.
[Resolves #23]