SUSE-Enceladus / suse-rancher-setup

Simple, usable web application for deploying complex applications to the cloud; wrapping cloud native SDK/CLIs
GNU General Public License v3.0
9 stars 1 forks source link

Cleanup - add to RancherOnAks, refactor for RancherOnEks #200

Closed bear454 closed 1 year ago

bear454 commented 1 year ago

Cleanup now occurs in it's own controller (reducing a bunch of conditional logic). Recording is stored in the database as a set of env vars & a set of commands; these can be rendered out via an ERB template.

bear454 commented 1 year ago

Holding until smaller PRs are merged in.

bear454 commented 1 year ago

image

bear454 commented 1 year ago

Example download: suse-rancher-setup-cleanup-2023-02-14T19 39 53-08 00.txt

export AWS_REGION='us-west-2'
export AWS_DEFAULT_REGION='us-west-2'
export AWS_DEFAULT_OUTPUT='json'
export KUBECONFIG='/tmp/kubeconfig'
aws eks update-kubeconfig --name suse-rancher-setup-XXXX-cluster --kubeconfig /tmp/kubeconfig
aws route53 change-resource-record-sets --hosted-zone-id /hostedzone/XXXXXXXXXXXXXXXXXXXXXX --change-batch {"Comment":"Delete suse-rancher-setup record set","Changes":[{"Action":"DELETE","ResourceRecordSet":{"Name":"XXXXXXXXXXXX.aws.XXXXXXX.com","Type":"CNAME","TTL":900,"ResourceRecords":[{"Value":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.us-west-2.elb.amazonaws.com"}]}}]}
helm uninstall ingress-nginx --namespace ingress-nginx
aws eks delete-nodegroup --nodegroup-name suse-rancher-setup-XXXX-cluster-nodegroup --cluster-name suse-rancher-setup-XXXX-cluster
aws iam detach-role-policy --role-name suse-rancher-setup-XXXX-nodegroup-role --policy-arn arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
...
bear454 commented 1 year ago

Screenshot 2023-02-14 at 19-45-11 SUSE Rancher Setup