Run the Communishift Clean Up Script

Resources

Add project name to variables

Members of sysadmin-openshift can run this playbook at [1]. It contains the list of communishift projects. When on boarding, add the new name of the project to the communishift_projects dictionary in inventory/group_vars/all. If needed, resource quotas can be overriden from defaults in the same dictionary. The do_not_delete: true variable attached to a project will prevent the project from recieving notifications and being cleaned up by cleanup scripts.

Run the playbook to send notifications

Run the playbook[1] on the batcave in order to send notifications to project administrators that their project will be deleted as we begin a fresh release cycle.

To run the playbook in a dry-run mode do the following:

sudo rbac-playbook manual/communishift_send_email_notifications.yml --tags communishift_send_notifications -e communishift_email_notifications_dry_run=true

Otherwise run like so

sudo rbac-playbook manual/communishift_send_email_notifications.yml

Cleaning up projects

Once the project administrators have been notified of the fact that their projects will be deleted, give them some time to contact the fedora infra administrators to mark their project do not delete.

Perhaps 1 week is enough?

Once a suitable time has elapsed we can begin to disable all projects. Defaults to dry run and just prints output.

sudo rbac-playbook manual/communishift_disable_project.yml --tags communishift_disable_project

To actually disable the projects and actually scale down, add the extra var:

sudo rbac-playbook manual/communishift_disable_project.yml --tags communishift_disable_project -e communishift_disable_shutdown=true

Once these projects have been deleted we can give the project administrators time to get in contact with fedora infra administrators to ask why their project has been disabled, and to re-enable it, and mark it do not delete.

Perhaps 1 week is enough?

To run the playbook with dryrun mode do:

sudo rbac-playbook manual/communishift_delete_projects.yml --tags communishift_delete_projects -e communishift_delete_projects_dry_run=true

To run the full task do the following.

sudo rbac-playbook manual/communishift_delete_projects.yml --tags communishift_delete_projects -e communishift_delete_projects_dry_run=true

Tenants are responsible for managing there own data. No backups for communishift projects are made. This playbook will also clean up the EFS storage in AWS.

Finally update the all groups var with the remaining list of projects

Update the communishift_projects dictionary in inventory/group_vars/all to include only the remaining projects which were not removed as part of this process eg:

communishift_projects:
  communishift-fedora-review-service:
    name: communishift-fedora-review-service
    do_not_delete: true                           # Marked do not delete 2024-10-21
  communishift-log-detective:
    name: communishift-log-detective
    do_not_delete: true                           # Marked do not delete 2024-10-21
    memory_requests: 4Gi
    memory_limits: 6Gi
    storage_requests: 10Gi

A script has been added to make this task less difficult. You can run it like so:

./ansible/scripts/communishift_prune_projects --write

Commit and push the changes to the ansible repo.

Finally please also disable each FAS group which corresponded with the pruned project. It should match the name of the project listed in the inventory/group_vars/all communishift_projects dictionary.