Create Delete a server - coopdevs/handbook GitHub Wiki
Aquest handbook està descontinuat. La nova adreça és: https://handbook.coopdevs.org/ca/home |
These are the MUST BE DONE steps to create/delete a server.
- Talk with the commission coordinator to update the contract if exists.
- Create a bucket for the backups in B2.
- Create the bucket in B2
- Save the credentials in BW with the following template name:
backblaze - <domain>
- Create the server in Hetzner.
- Use the domain as server name
- Add the SSH keys of SysAdmins (your key if you can run the sys_admin role) to give root access.
- Add a DNS record pointing to the server IP.
- Configure the provisioning project:
- Configure SysAdmin users.
- Configure app variables.
- Configure backups.
- Configure certbot (Let's Encrypt certificates).
- Configure monitoring NodeExporter and Postgres Exporter (in case of use PostgreSQL as DB):
- Create the BasicAuth credentials
- Save it in BW with the template name:
<exporter> - <domain>
Ex:NodeExporter - odoo.coopdevs.org
- Configure Prometheus to scrape this new server and add the target to Blackbox job.
- Create a Grafana dashboard with alerts.
- Talk with the commission coordinator to update the contract if exists.
- Remove the alerts and dashboards.
- Remove the Prometheus job configuration related with this server.
- Archive the repository in Gitlab or publish an MR deleting the host configuration in the provisioning repository.
- Revoke the certificates:
$ sudo certbot certificates # To check the certificates
...
$ sudo certbot revoke --cert-path /etc/letsencrypt/live/<domain-name>/cert.pem --key-path /etc/letsencrypt/live/<domain-name>/privkey.pem --reason cessationOfOperation # Revocation reasons: https://en.wikipedia.org/wiki/Certificate_revocation_list#Reasons_for_revocation
- Delete the server and the volumes attached to it in Hetzner.
- Remove the DNS record pointing to the server IP.
- Create activity to remove the backups.