Archiving
Once a service has been deprecated and a grace period has elapsed to ensure there are no residual impacts, it is essential to archive all of its assets in an orderly manner. Archiving ensures that, although the service is no longer operational, its knowledge and data are preserved and can be consulted in the future if necessary.
What should be archived?
- Source Code: The code repository is the most important asset.
- Documentation: All technical and user documentation.
- Infrastructure as Code (IaC): Terraform scripts or other IaC tools.
- Data: Databases and other data stores.
- CI/CD Pipelines: Build and deployment pipeline configuration.
Archiving Process
1. Source Code (GitLab)
- Mark as Read-Only: In GitLab, protect the main branch (
mainormaster) so that no one can push new changes. - Archive the Repository: Use the "Archive project" function in GitLab settings. This removes the project from the list of active projects and marks it as archived, but preserves all of its content (code, issues, merge requests).
- Update the README: Add a prominent notice in the repository's
README.mdfile indicating that the project is archived, the archiving date, and a link to the new solution or relevant documentation.
2. Documentation (Confluence / ANDES Portal)
- Mark as Obsolete: Add a banner or notice at the beginning of each documentation page indicating that the information corresponds to an obsolete service and may not be accurate.
- Move to an Archiving Space: Move the pages to a specific section or space for archived documentation. This removes them from main search results but keeps them accessible.
3. Infrastructure
- Deprovision Resources: Run Terraform scripts (
terraform destroy) or use the GCP console to remove all infrastructure resources associated with the service (virtual machines, databases, load balancers, etc.). This is crucial to avoid unnecessary costs. - Archive IaC Scripts: The Terraform code will remain in the previously archived GitLab repository.
4. Data
- Final Backup: Perform a final backup of the databases and store it in a low-cost cold storage location, such as Google Cloud Storage (Archive).
- Retention Policy: Ensure the backup complies with the organization's data retention policies.
- Data Deletion: Once the backup has been performed and verified, delete the databases and persistent disks.
5. CI/CD Pipelines
- Disable Pipelines: Disable scheduled pipelines and triggers in GitLab CI/CD to avoid unnecessary executions.
- The configuration (
.gitlab-ci.yml) will be preserved as part of the archived repository.