generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 11
feat: introduce ocp tshirts and cluster destroy automation #1193
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9d6ba64
fix: make it so ansible only reinstalls modules if it detects an outd…
ludwig-mueller 0612bd1
chore(deps): update instance to v2.8.3
ludwig-mueller 39f2ae3
feat: prototype ocp tshirts
ludwig-mueller b904179
chore(docs): improve variable descriptions
ludwig-mueller b5bf9a4
refactor: move locals to new file
ludwig-mueller 2959f46
feat: update tshirt sizes based on Michael's recommendations
ludwig-mueller 088036e
Merge branch 'main' into ocp-tshirts
ludwig-mueller 79efa10
Merge branch 'main' into ansible-collection
ludwig-mueller 910bd9b
chore: change order of the tiles, put standard last
ludwig-mueller 72fba4e
Merge branch 'main' into ocp-tshirts
ludwig-mueller 8f9c646
Merge branch 'ansible-collection' into ocp-tshirts
ludwig-mueller 2491ba5
feat: destroy automation with variable trigger
ludwig-mueller 089b73e
fix: remove notes, add quotes to cpu count
ludwig-mueller d911c0b
Merge branch 'main' into ocp-tshirts
ludwig-mueller 85c0f75
fix: add count to cluster deployment playbooks so they're destroyed w…
ludwig-mueller cf26509
fix: switch to only full cpu cores until we figure out why fractional…
ludwig-mueller ace2601
Merge branch 'main' into ocp-tshirts
ludwig-mueller 5a48fd5
docs: toc version and lastupdated
ludwig-mueller 50d4b21
chore: add validation for processors to only support full numbers
ludwig-mueller cbde6a1
Merge branch 'main' into ocp-tshirts
ludwig-mueller f5ffedb
chore: improve tshirt displayname
ludwig-mueller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ansible/templates-ansible/deploy-openshift-cluster/playbook-destroy-ocp-cluster.yml.tftpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| --- | ||
| - name: Destroy the OpenShift Cluster | ||
| hosts: all | ||
|
|
||
| vars: | ||
| cluster_dir: "${CLUSTER_DIR}" | ||
| cluster_name: $"{CLUSTER_NAME}" | ||
| openshift_install_bootstrap_timeout: "${OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT}" | ||
| openshift_install_machine_wait_timeout: "${OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT}" | ||
| openshift_install_cluster_timeout: "${OPENSHIFT_INSTALL_CLUSTER_TIMEOUT}" | ||
| openshift_install_destroy_timeout: "${OPENSHIFT_INSTALL_DESTROY_TIMEOUT}" | ||
|
|
||
| tasks: | ||
| - name: Destroy the Cluster resources | ||
| block: | ||
| - name: Run openshift-install destroy cluster | ||
| ansible.builtin.shell: | | ||
| openshift-install destroy cluster --dir={{ cluster_dir }} --log-level=debug | ||
| environment: | ||
| OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT: "{{ openshift_install_bootstrap_timeout }}" | ||
| OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT: "{{ openshift_install_machine_wait_timeout }}" | ||
| OPENSHIFT_INSTALL_CLUSTER_TIMEOUT: "{{ openshift_install_cluster_timeout }}" | ||
| OPENSHIFT_INSTALL_DESTROY_TIMEOUT: "{{ openshift_install_destroy_timeout }}" | ||
| ignore_errors: false | ||
| retries: 3 | ||
| delay: 30 | ||
|
|
||
| - name: Delete the Service IDs | ||
| ansible.builtin.shell: | | ||
| ccoctl ibmcloud delete-service-id --credentials-requests-dir {{ cluster_dir }}/credreqs --name {{ cluster_name }} | ||
| environment: | ||
| IBMCLOUD_API_KEY: "{{ lookup('env', 'IBMCLOUD_API_KEY') }}" | ||
| OPENSHIFT_INSTALL_BOOTSTRAP_TIMEOUT: "{{ openshift_install_bootstrap_timeout }}" | ||
| OPENSHIFT_INSTALL_MACHINE_WAIT_TIMEOUT: "{{ openshift_install_machine_wait_timeout }}" | ||
| OPENSHIFT_INSTALL_CLUSTER_TIMEOUT: "{{ openshift_install_cluster_timeout }}" | ||
| OPENSHIFT_INSTALL_DESTROY_TIMEOUT: "{{ openshift_install_destroy_timeout }}" | ||
| ignore_errors: false |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.