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

Replace Docker's gcplogs driver with the GCP COS logging agent #977

Merged
merged 3 commits into from Nov 15, 2022

Conversation

kunzese
Copy link
Collaborator

@kunzese kunzese commented Nov 15, 2022

This PR removes Docker's gcplogs driver from all modules and blueprints and replaces it with the logging agent included with the COS image.

@kunzese kunzese force-pushed the kunzese/remove-gcplogs-driver branch from 2d22629 to de229d9 Compare November 15, 2022 09:49
Copy link
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very nice. I just would not want to start having specialized stuff int he compute VM module, can you please revert those changes and implement the metadata injection at the COS module level?

@kunzese
Copy link
Collaborator Author

kunzese commented Nov 15, 2022

Very very nice. I just would not want to start having specialized stuff int he compute VM module, can you please revert those changes and implement the metadata injection at the COS module level?

Sure, but as far is i see it i can not put in the cos-generic-metadata module, because this only assembles a cloud config which is later injected into the google_compute_instance.metadata.user-data and the google-logging-enabled = true property must be set on VM instance level (or project level). But we could remove the new variable and let the users add the metadata property themselves, like:

From:

module "vm-squid" {
  source                = "./fabric/modules/compute-vm"
  enable_google_logging = true
  metadata = {
    user-data = module.cos-squid.cloud_config
  }
}

To:

module "vm-squid" {
  source = "./fabric/modules/compute-vm"
  metadata = {
    user-data              = module.cos-squid.cloud_config
    google-logging-enabled = true
  }
}

If you think of anything else, just let me know.

@ludoo
Copy link
Collaborator

ludoo commented Nov 15, 2022

If you think of anything else, just let me know.

Heh, I should learn to connect my brain before replying. :) Yes, the cos modules only manage user-data value. I would do what you suggest, adding one additional metadata to the examples, and the blueprints who use the COS modules. Thanks for your patience. :)

@kunzese kunzese force-pushed the kunzese/remove-gcplogs-driver branch from 973adbd to 23c5757 Compare November 15, 2022 10:34
@kunzese kunzese marked this pull request as ready for review November 15, 2022 11:54
@kunzese kunzese merged commit 5125a5a into master Nov 15, 2022
@kunzese kunzese deleted the kunzese/remove-gcplogs-driver branch November 15, 2022 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants