feat: pds updates with telemetry and branding changes
This commit is contained in:
1 parent
82251b973f
commit
396ff6b8b8
9 files changed
+320
-4
No files matched your search
+67
-1
@@ -7,7 +7,7 @@
|
||||
vars:
|
||||
pds_data_dir: /pds
|
||||
pds_image_tag: "0.4"
|
||||
pds_blob_upload_limit: 104857600
|
||||
pds_blob_upload_limit: 314572800
|
||||
pds_rate_limits_enabled: true
|
||||
pds_invite_required: true
|
||||
pds_backup_period: 24h
|
||||
@@ -16,6 +16,7 @@
|
||||
pds_backup_s3_endpoint: https://s3.bhs.io.cloud.ovh.net
|
||||
pds_backup_s3_access_key: "{{ pds_blobstore_s3_access_key }}"
|
||||
pds_backup_s3_secret_key: "{{ pds_blobstore_s3_secret_key }}"
|
||||
pds_grafana_image_tag: "13.1.1"
|
||||
|
||||
tasks:
|
||||
- name: Run PDS installer (first time only)
|
||||
@@ -135,6 +136,71 @@
|
||||
changed_when: false
|
||||
failed_when: pds_backup_exit_code.stdout != "0"
|
||||
|
||||
# ── Monitoring stack (telemetry) ──────────────────────────────
|
||||
# Deploys Prometheus + Grafana + node_exporter when pds_telemetry_enabled is true.
|
||||
# All services bind to 127.0.0.1 — access via SSH tunnel:
|
||||
# ssh -L 3001:localhost:3001 sysadmin@<server>
|
||||
# Then open http://localhost:3001 (admin/admin, change on first login)
|
||||
|
||||
- name: Create monitoring directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ pds_data_dir }}/monitoring"
|
||||
- "{{ pds_data_dir }}/monitoring/grafana/provisioning/datasources"
|
||||
- "{{ pds_data_dir }}/monitoring/grafana/provisioning/dashboards"
|
||||
- "{{ pds_data_dir }}/monitoring/dashboards"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
|
||||
- name: Deploy monitoring compose
|
||||
template:
|
||||
src: templates/monitoring-compose.yaml.j2
|
||||
dest: "{{ pds_data_dir }}/monitoring/compose.yaml"
|
||||
mode: "0644"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
notify: restart monitoring
|
||||
|
||||
- name: Deploy Prometheus config
|
||||
template:
|
||||
src: templates/prometheus.yml.j2
|
||||
dest: "{{ pds_data_dir }}/monitoring/prometheus.yml"
|
||||
mode: "0644"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
notify: restart monitoring
|
||||
|
||||
- name: Deploy Grafana datasource provisioning
|
||||
template:
|
||||
src: templates/grafana-datasources.yml.j2
|
||||
dest: "{{ pds_data_dir }}/monitoring/grafana/provisioning/datasources/prometheus.yml"
|
||||
mode: "0644"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
notify: restart monitoring
|
||||
|
||||
- name: Deploy Grafana dashboard provisioning
|
||||
template:
|
||||
src: templates/grafana-dashboards.yml.j2
|
||||
dest: "{{ pds_data_dir }}/monitoring/grafana/provisioning/dashboards/pds.yml"
|
||||
mode: "0644"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
notify: restart monitoring
|
||||
|
||||
- name: Download PDS Overview dashboard
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/bluesky-social/pds/main/monitoring/dashboards/pds-overview.json
|
||||
dest: "{{ pds_data_dir }}/monitoring/dashboards/pds-overview.json"
|
||||
mode: "0644"
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
notify: restart monitoring
|
||||
|
||||
- name: Start monitoring stack
|
||||
shell: cd {{ pds_data_dir }}/monitoring && docker compose up -d
|
||||
when: pds_telemetry_enabled is defined and pds_telemetry_enabled | bool
|
||||
|
||||
handlers:
|
||||
- name: apply changes
|
||||
shell: cd {{ pds_data_dir }} && docker compose up -d && docker restart caddy
|
||||
|
||||
- name: restart monitoring
|
||||
shell: cd {{ pds_data_dir }}/monitoring && docker compose up -d --force-recreate
|
||||
Reference in new issue
Block a user