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

Automated scheduling of creation of shared ROSA cluster and another end of business reaper #352

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

kami619
Copy link
Contributor

@kami619 kami619 commented May 31, 2023

Adding two new workflow files:

  • rosa-cluster-auto-provision-on-schedule
  • rosa-cluster-auto-delete-on-schedule

Setting static values for cluster creation, as below:

  • CLUSTER_NAME: shared-crossdc
  • COMPUTE_MACHINE_TYPE: m5.xlarge
  • MULTI_AZ: false
  • REPLICAS: 2

and a Rosa cluster reaper scripts, which takes input of a list of "ready" state clusters

  • rosa_cluster_reaper.sh

My first attempt at GH workflow's so if something's amiss, please correct it :)

Open question, there could be cluster's which could be in other states other than ready, do we want any alert on it ? Another question is, do we want any email notification after the job is complete, alternative would be to personally tune the GH Workflow notifications to report on this workflow, reducing the email clutter.

@kami619 kami619 requested review from stianst and mhajas May 31, 2023 00:44
@kami619 kami619 changed the title Fixes #351 Automated scheduling of creation of shared ROSA cluster and a pairing end of business reaper May 31, 2023
@kami619 kami619 changed the title Automated scheduling of creation of shared ROSA cluster and a pairing end of business reaper Automated scheduling of creation of shared ROSA cluster and another end of business reaper May 31, 2023
@stianst
Copy link
Contributor

stianst commented Jun 1, 2023

@kami619 running out a bit of time before leaving for PTO, and not sure I explained correctly what I proposed, so will try to explain here:

  • rosa-cluster-create.yml when executed by default should create the default shared cluster we want
  • rosa-cluster-delete.yml should have an option to delete all clusters directly

Now to schedule the above you can either do:

  1. Add schedule directly to those workflows
  2. Add schedule in separate workflows

Personally I like separating the schedule from the workflow, so leaning towards 2. As you can see in https://github.com/keycloak/keycloak-quickstarts/blob/latest/.github/workflows/schedule.yml it's fairly simple to create a schedule workflow that is only used to execute another workflow. gh workflow run also allows passing inputs to the workflow it's running, so if we don't want to make delete all clusters the default in rosa-cluster-delete.yml it can enable this option when running that workflow.

@kami619 kami619 force-pushed the is-351-automated-scheduling-rosa branch from d51ea2e to d7cdd7b Compare June 1, 2023 15:11
@kami619
Copy link
Contributor Author

kami619 commented Jun 1, 2023

@stianst and @mhajas I think I have addressed all the review comments. Please review it one more time. Let me know if something is still missing. I will try to run this out of my fork, to share an actual outcome.

Copy link
Contributor

@mhajas mhajas left a comment

Choose a reason for hiding this comment

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

Thanks @kami619 for the changes. I added two more comments.

.github/workflows/README.md Outdated Show resolved Hide resolved
provision/aws/rosa_cluster_reaper.sh Outdated Show resolved Hide resolved
@kami619 kami619 force-pushed the is-351-automated-scheduling-rosa branch from d7cdd7b to f952f02 Compare June 2, 2023 15:14
@kami619
Copy link
Contributor Author

kami619 commented Jun 2, 2023

@mhajas last round 🥊 :) review 🤞🏼

Copy link
Contributor

@mhajas mhajas left a comment

Choose a reason for hiding this comment

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

Thank you for the changes @kami619, LGTM!

I updated the README.md file a little bit because the items were wrongly numbered.

@mhajas mhajas merged commit 4574173 into keycloak:main Jun 5, 2023
1 check passed
@kami619 kami619 deleted the is-351-automated-scheduling-rosa branch June 5, 2023 16:55
mhajas pushed a commit to kami619/keycloak-benchmark that referenced this pull request Jun 7, 2023
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.

None yet

3 participants