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

Updates to support other cluster/group name formats #1544

Merged
merged 15 commits into from
Mar 28, 2024

Conversation

rfleur01
Copy link
Contributor

@rfleur01 rfleur01 commented Mar 26, 2024

Background:

For legacy groups that are converted to clusters, the cluster name needs to match the ASG and the group in Teletraan. This can cause the UI to return an error because the format of the ASG is not "{env_name}-{stage_name}". It could be "{env_name} {stage_name}"

Tests:

Test all the changes made to ensure the new format is supported and there is no regression for the existing format.
New Format Cluster: helloworlddummyservice-server-rfleur
Old Format Cluster: rfleur-dev1

Show Replacement Activities

image image

Auto Scaling Settings/Auto Scaling Configuration

image image

Update Capacity

image image image image

Click to see AMI(s) used by Hosts

image image

Host Terminate

image image

Cluster Config GET

image image

Cluster Config POST

image image

Cluster Config History

image image

Clone Cluster

image image image image

Enable Cluster Replacement

image image

Auto Cluster Refresh View

image image

Cluster Replacement Details

image image

Base Image History

image image

Cluster Refresh Status

image image

@github-actions github-actions bot added the deploy-board Includes changes to deploy-board label Mar 26, 2024
@rfleur01 rfleur01 changed the title Rfleurinord/clustername format Updates to support other cluster/group name formats Mar 26, 2024
@rfleur01 rfleur01 marked this pull request as ready for review March 27, 2024 20:47
@rfleur01 rfleur01 requested a review from a team as a code owner March 27, 2024 20:47
@liyaqin1
Copy link
Contributor

@rfleur01 Could you clarify the purpose of the cluster name? We already have the ASG name in rodimus, as well as the environment name and stage name in deploy. What specific role does the cluster name play? Thank you.

@rfleur01
Copy link
Contributor Author

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

@liyaqin1
Copy link
Contributor

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

@rfleur01
Copy link
Contributor Author

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

This does change how cluster names are generated. New clusters will still be generated in the {env name}-{stage name} format. It only adds support to get and update clusters that do not have the {env name}-{stage name}.

@liyaqin1
Copy link
Contributor

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

This does change how cluster names are generated. New clusters will still be generated in the {env name}-{stage name} format. It only adds support to get and update clusters that do not have the {env name}-{stage name}.

If the env/stage is lacking a cluster name generated as {env name}-{stage name}, what alternative method should be used for generating it?

@rfleur01
Copy link
Contributor Author

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

This does change how cluster names are generated. New clusters will still be generated in the {env name}-{stage name} format. It only adds support to get and update clusters that do not have the {env name}-{stage name}.

If the env/stage is lacking a cluster name generated as {env name}-{stage name}, what alternative method should be used for generating it?

This is related to the work I am doing to convert legacy groups to clusters. Many of these groups have ASGs that are not in the {env name}-{stage name} format, which prevents the UI from rendering their cluster configurations and other UI components. In short, they just wouldn't be generated via the UI. They could be generated via API OR in this case via DB insertion (via script), which is the main reason for this PR.

@liyaqin1
Copy link
Contributor

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

This does change how cluster names are generated. New clusters will still be generated in the {env name}-{stage name} format. It only adds support to get and update clusters that do not have the {env name}-{stage name}.

If the env/stage is lacking a cluster name generated as {env name}-{stage name}, what alternative method should be used for generating it?

This is related to the work I am doing to convert legacy groups to clusters. Many of these groups have ASGs that are not in the {env name}-{stage name} format, which prevents the UI from rendering their cluster configurations and other UI components. In short, they just wouldn't be generated via the UI. They could be generated via API OR in this case via DB insertion (via script), which is the main reason for this PR.

My question is, how can you determine the actual ASG name if it is not generated through Teletraan and thus does not follow the {env name}-{stage name} convention?

@rfleur01
Copy link
Contributor Author

@liyaqin1 using the format {env name}-{stage name} causes clusters that do not follow that format to not be accessible via the UI. This update leans on the cluster_name to account for names that might not be in the {env name}-{stage name}.

How do we generate the cluster name?

This does change how cluster names are generated. New clusters will still be generated in the {env name}-{stage name} format. It only adds support to get and update clusters that do not have the {env name}-{stage name}.

If the env/stage is lacking a cluster name generated as {env name}-{stage name}, what alternative method should be used for generating it?

This is related to the work I am doing to convert legacy groups to clusters. Many of these groups have ASGs that are not in the {env name}-{stage name} format, which prevents the UI from rendering their cluster configurations and other UI components. In short, they just wouldn't be generated via the UI. They could be generated via API OR in this case via DB insertion (via script), which is the main reason for this PR.

My question is, how can you determine the actual ASG name if it is not generated through Teletraan and thus does not follow the {env name}-{stage name} convention?

It's determined via group_name in the groups table. The script uses that value as the cluster name when creating the cluster record. The script also populates the cluster_name value at the env level so this PR leverages that value.

Copy link
Contributor

@rwxzhu rwxzhu left a comment

Choose a reason for hiding this comment

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

lgtm

@rfleur01 rfleur01 merged commit 204b72f into master Mar 28, 2024
5 checks passed
@rfleur01 rfleur01 deleted the rfleurinord/clustername-format branch March 28, 2024 21:36
rfleur01 pushed a commit that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-board Includes changes to deploy-board
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants