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

Add tag:environment to AMI filter criteria #295

Merged

Conversation

brunoasr
Copy link
Contributor

@brunoasr brunoasr commented Oct 2, 2024

Summary:

AMI tag 'environment' allow values prod and test. When replacing nodes in Kafka clusters it's important to be able to select AMIs based on their tag 'environment', along with other criteria.

Test Plan:

  • Node successfully replaced in dev Orion, using environment=test.

Cluster configuration:

  - clusterId: upgradekafka01
    type: kafka
    configuration:
      image:
        application: kafka
        release: bionic
        architecture: x86_64
        environment: test
        application_environment: dev

Target AMI correctly tagged:
image

Node replacement successful with correct AMI:
image

  • Node successfully replaced in dev Orion, using environment=prod.

Cluster configuration (no environment, defaults to prod):

  - clusterId: upgradekafka01
    type: kafka
    configuration:
      image:
        application: kafka
        release: bionic
        architecture: x86_64
        application_environment: dev

Target AMI correctly tagged:
image

Node replacement successful:
image

brunorodrigues@lancerkafka-canary-0a033c99:~$ tail -f /var/log/orion/orion.log | grep CMDBFallbackReplaceBroker
INFO  [2024-10-02 19:53:49,029] com.pinterest.orion.internal.core.actions.kafka.CMDBFallbackReplaceBrokerAction: Spiffe id exists. Skip userdata update. Existing userdata: #cloud-config
INFO  [2024-10-02 19:53:49,263] com.pinterest.orion.internal.core.actions.kafka.CMDBFallbackReplaceBrokerAction: Current AMI is ami-072a9b7aea157c353
INFO  [2024-10-02 19:53:49,263] com.pinterest.orion.internal.core.actions.kafka.CMDBFallbackReplaceBrokerAction: Image selection config: {application=kafka, release=bionic, architecture=x86_64, application_environment=dev}
INFO  [2024-10-02 19:53:55,845] com.pinterest.orion.internal.core.actions.kafka.CMDBFallbackReplaceBrokerAction: Selected AMI ami-00d45b753bc938156
INFO  [2024-10-02 19:53:55,895] com.pinterest.orion.internal.core.actions.kafka.CMDBFallbackReplaceBrokerAction: EBS volume size override of 25GB requested for:kafka-upgrade01-dev-001

@brunoasr brunoasr requested a review from a team as a code owner October 2, 2024 20:14
@vahidhashemian vahidhashemian merged commit 4f11d45 into pinterest:master Oct 2, 2024
1 check passed
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 this pull request may close these issues.

2 participants