π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[infra] Minor updates for Ubuntu 26
Manav Rathic11ef453ac10
diff --git a/infra/services/prometheus/README.md b/infra/services/prometheus/README.mdindex 91677cb9cf..372f74be7d 100644--- a/infra/services/prometheus/README.md+++ b/infra/services/prometheus/README.md@@ -2,7 +2,7 @@Install `prometheus.service` on an instance if it is running something that exports custom Prometheus metrics. In particular, museum does.-If it is an instance whose metrics (CPU, disk, RAM etc) we want to monitor, also install `node-exporter.service` after installing [node-exporter](https://prometheus.io/docs/guides/node-exporter/) itself (Note that our prepare-instance script already installs node-exporter) .+If it is an instance whose metrics (CPU, disk, RAM etc) we want to monitor, also install [node-exporter](https://prometheus.io/docs/guides/node-exporter/) itself (Note that our prepare-instance script already installs node-exporter).## Installing@@ -10,18 +10,15 @@ Prometheus doesn't currently support environment variables in config file, so re```shscp services/prometheus/prometheus.* <instance>:-scp services/prometheus/node-exporter.service <instance>:nano prometheus.ymlsudo mv prometheus.yml /root/prometheus.ymlsudo mv prometheus.service /etc/systemd/system/prometheus.service-sudo mv node-exporter.service /etc/systemd/system/node-exporter.service```Tell systemd to pick up new service definitions, enable the units (so that they automatically start on boot going forward), and start them.```shsudo systemctl daemon-reload-sudo systemctl enable --now node-exportersudo systemctl enable --now prometheus-```+```\ No newline at end of filediff --git a/infra/services/prometheus/node-exporter.service b/infra/services/prometheus/node-exporter.servicedeleted file mode 100644index b28e348aee..0000000000--- a/infra/services/prometheus/node-exporter.service+++ /dev/null@@ -1,12 +0,0 @@-[Unit]-Documentation=https://prometheus.io/docs/guides/node-exporter/-Wants=network-online.target-After=network-online.target--[Install]-WantedBy=multi-user.target--[Service]-User=node_exporter-Group=node_exporter-ExecStart=/usr/local/bin/node_exporterdiff --git a/infra/services/sentry/README.md b/infra/services/sentry/README.mdindex 230868a8d5..112f33ea9a 100644--- a/infra/services/sentry/README.md+++ b/infra/services/sentry/README.md@@ -51,8 +51,8 @@ To update Sentry just fetch the latest upstream and re-run `./install.sh`.> The following assumes that you have already provisioned new instances using our standard process.-- `cd /home/ente && git clone https://github.com/getsentry/self-hosted sentry`-- Checkout the latest tag, e.g. `git checkout 24.2.0` (Sentry uses CalVer, so this'll be the latest `year.month.0`)+- `cd /home/ente && git clone https://github.com/getsentry/self-hosted.git`+- Checkout the latest tag, e.g. `git checkout 26.5.0` (Sentry uses CalVer, so this'll be the latest `year.month.0`)- Run `sudo ./install.sh`The rest of this section describes the remaining three steps:@@ -69,7 +69,6 @@ Next, modify `.env`, setting```dotenvSENTRY_EVENT_RETENTION_DAYS=30-SENTRY_MAIL_HOST=ente.io```### Configure external nginx@@ -89,7 +88,7 @@ sudo tee /root/nginx/key.pemSentry should automatically start when the instance boots. If needed (and for the first time), it can be started manually by```sh-cd /home/ente/sentry+cd /home/ente/self-hostedsudo docker compose up -d```@@ -102,14 +101,14 @@ sudo systemctl start nginxIn their docs Sentry sometimes refers to commands like `sentry createuser`. To run them, prefix the command with `docker compose exec web`. e.g.```sh-cd /home/ente/sentry+cd /home/ente/self-hostedsudo docker compose exec web sentry createuser```If needed, Sentry can be stopped by using```sh-cd /home/ente/sentry+cd /home/ente/self-hostedsudo docker compose stop```diff --git a/server/scripts/deploy/README.md b/server/scripts/deploy/README.mdindex 9433872934..0d4cc8397b 100644--- a/server/scripts/deploy/README.md+++ b/server/scripts/deploy/README.md@@ -26,59 +26,59 @@ We use museum's Dockerfile to build images which we then run on vanilla Ubuntu sTo bring up an additional museum node:-- Prepare the instance to run our services+Prepare the instance to run our services.-- Setup [promtail](../../../infra/services/promtail/README.md), [prometheus and node-exporter](../../../infra/services/prometheus/README.md) services+Setup [promtail](../../../infra/services/promtail/README.md), [prometheus and node-exporter](../../../infra/services/prometheus/README.md) services.-- If running behind Nginx, install the [nginx](../../../infra/services/nginx/README.md) service.+If running behind Nginx, install the [nginx](../../../infra/services/nginx/README.md) service.-- Add credentials+Add credentials- ```sh- sudo mkdir -p /root/museum/credentials- sudo tee /root/museum/credentials/pst-service-account.json- sudo tee /root/museum/credentials/fcm-service-account.json- sudo tee /root/museum/credentials.yaml- ```+```sh+sudo mkdir -p /root/museum/credentials+sudo tee /root/museum/credentials/pst-service-account.json+sudo tee /root/museum/credentials/fcm-service-account.json+sudo tee /root/museum/credentials.yaml+```-- Add billing data+Add billing data from the pricing-data repo- ```sh- scp /path/to/billing/*.json <instance>:+```sh+scp /path/to/pricing-data/{us,in,black-friday}.json <instance>:- sudo mkdir -p /root/museum/data/billing- sudo mv *.json /root/museum/data/billing/- ```+sudo mkdir -p /root/museum/data/billing+sudo mv *.json /root/museum/data/billing/+```-- If not running behind Nginx, add the TLS credentials (otherwise add them to Nginx)+Add the TLS credentials (optional if running behind Nginx)- ```sh- sudo tee /root/museum/credentials/tls.cert- sudo tee /root/museum/credentials/tls.key- ```+```sh+sudo tee /root/museum/credentials/tls.cert+sudo tee /root/museum/credentials/tls.key+```-- Copy the service definition and restart script to the new instance. The restart script can remain in the ente user's home directory. Move the service definition to its proper place.+Copy the service definition and restart script to the new instance. The restart script can remain in the ente user's home directory. Move the service definition to its proper place.- ```sh- # If using nginx- scp scripts/deploy/museum.nginx.service <instance>:museum.service- # otherwise- scp scripts/deploy/museum.service <instance>:+```sh+# If using nginx+scp scripts/deploy/museum.nginx.service <instance>:museum.service+# otherwise+scp scripts/deploy/museum.service <instance>:- scp scripts/deploy/update-and-restart-museum.sh <instance>:+scp scripts/deploy/update-and-restart-museum.sh <instance>:- sudo mv museum.service /etc/systemd/system- sudo systemctl daemon-reload- ```+sudo mv museum.service /etc/systemd/system+sudo systemctl daemon-reload+```-- If running behind Nginx, tell it about museum+If running behind Nginx, tell it about museum config (modified with suitable rate limits)- ```sh- scp scripts/deploy/museum.nginx.conf <instance>:+```sh+scp scripts/deploy/museum.nginx.conf <instance>:- sudo mv museum.nginx.conf /root/nginx/conf.d- sudo systemctl reload nginx- ```+sudo mv museum.nginx.conf /root/nginx/conf.d+sudo systemctl reload nginx+```## Startingdiff --git a/server/scripts/deploy/museum.nginx.service b/server/scripts/deploy/museum.nginx.serviceindex 56888f9422..48d6e30057 100644--- a/server/scripts/deploy/museum.nginx.service+++ b/server/scripts/deploy/museum.nginx.service@@ -7,7 +7,7 @@ After=nginx.service[Service]Restart=on-failure-ExecStartPre=docker pull rg.fr-par.scw.cloud/ente/museum-prod+# ExecStartPre=docker pull rg.fr-par.scw.cloud/ente/museum-prodExecStartPre=-docker stop museumExecStartPre=-docker rm museumExecStart=docker run --name museum \diff --git a/server/scripts/deploy/update-and-restart-museum.sh b/server/scripts/deploy/update-and-restart-museum.shindex 85f93ae05d..f8155c35cd 100755--- a/server/scripts/deploy/update-and-restart-museum.sh+++ b/server/scripts/deploy/update-and-restart-museum.sh@@ -12,4 +12,4 @@ sudo docker pull rg.fr-par.scw.cloud/ente/museum-prodsudo systemctl restart museumsudo systemctl status museum | more-sudo tail -f /root/var/logs/museum.log+sudo tail -F /root/var/logs/museum.log