Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tail cf logs during staging when using blue/green deployment #28

Closed
JohannesRudolph opened this issue Mar 27, 2017 · 7 comments · Fixed by #40
Closed

Tail cf logs during staging when using blue/green deployment #28

JohannesRudolph opened this issue Mar 27, 2017 · 7 comments · Fixed by #40

Comments

@JohannesRudolph
Copy link
Contributor

I was just bitten by not having cf logs available when using cf-resource together with blue/green deployments (specifying params.current_app_name). Because cf-resource deletes the staging app when staging fails, there's no way to recover these logs either.

Proposed solution: cf-resource should connect to cf logs current_app_name and pipe the output to stdout until the app was successfully started.

@concourse-bot
Copy link
Collaborator

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:

  • #142499211 Tail cf logs during staging when using blue/green deployment

This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

@aeijdenberg
Copy link
Contributor

Is this bug being actively worked on? We might have interest in contributing if it's not already underway.

@JohannesRudolph
Copy link
Contributor Author

AFAIK not, so I would hugely appreciate it. I'd be happy to assist as well if there's something I can help with (e.g. review, comment or giving you a free Cloud Foundry account to test it at meshcloud.io)

@aeijdenberg
Copy link
Contributor

@JohannesRudolph - if you want to try out the PR above:

# Add to your list of resource types
resource_types:
- name: cf-resource-with-tail
  type: docker-image
  source:
    repository: govau/cf-resource
    tag: tail

# Change instances of cf-resource to cf-resource-with-tail, e.g.
resources:
- name: my-app
  type: cf-resource-with-tail
  source:
    api: https://api.system.example.com
    username: user
    password: ((password))
    organization: org
    space: space

# Add show_app_log: true
jobs:
- name: job
  plan:
  - put: my-app
    params:
      manifest: manifest.yml
      current_app_name: my-app
      show_app_log: true

@JohannesRudolph
Copy link
Contributor Author

Awesome, will give it a spin!

@drnic
Copy link
Contributor

drnic commented Jan 30, 2018

@aeijdenberg worked a treat for me; just what I needed. Thanks!

@aeijdenberg
Copy link
Contributor

@drnic - if you liked that one, you might also want to look at contraband/autopilot#44 - we found it makes the deployment more robust (there were some corner cases in the old code). I'll ping the maintainers again about taking it upstream... seems to be pretty abandoned, which is a shame, as we've moved most of our delivery team to use it (well, our fork of it) for deployments for some time now.

@vito vito closed this as completed in #40 Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants