From 3ed6dd6fbb0a9cf9dfac379dc2020b84e69cb2fa Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 21 Aug 2024 16:56:24 +0100 Subject: [PATCH 01/14] feat: new ocp27 server --- pillar/registry.sls | 14 +++++++------- pillar/registry_maintenance.sls | 5 ++--- salt-config/roster | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pillar/registry.sls b/pillar/registry.sls index 6303ed442..29e477540 100644 --- a/pillar/registry.sls +++ b/pillar/registry.sls @@ -1,7 +1,7 @@ network: - host_id: ocp13 - ipv4: 65.21.93.181 - ipv6: 2a01:4f9:3b:45ca::2 + host_id: ocp27 + ipv4: 37.27.62.45 + ipv6: 2a01:4f9:3081:3001::/64 netplan: template: custom configuration: | @@ -9,14 +9,14 @@ network: version: 2 renderer: networkd ethernets: - enp9s0: + enp5s0: addresses: - - 65.21.93.181/32 - - 2a01:4f9:3b:45ca::2/64 + - 37.27.62.45/32 + - 2a01:4f9:3081:3001::2/64 routes: - on-link: true to: 0.0.0.0/0 - via: 65.21.93.129 + via: 37.27.62.1 - to: default via: fe80::1 nameservers: diff --git a/pillar/registry_maintenance.sls b/pillar/registry_maintenance.sls index 4617b64a0..7d71d514c 100644 --- a/pillar/registry_maintenance.sls +++ b/pillar/registry_maintenance.sls @@ -2,9 +2,8 @@ maintenance: enabled: True patching: manual rkhunter_customisation: | - SCRIPTWHITELIST=/usr/bin/egrep - SCRIPTWHITELIST=/usr/bin/fgrep - SCRIPTWHITELIST=/usr/bin/which + ALLOWHIDDENFILE=/etc/.resolv.conf.systemd-resolved.bak + ALLOWHIDDENFILE=/etc/.updated ALLOWDEVFILE=/dev/shm/PostgreSQL.* PORT_WHITELIST=TCP:60922 DISABLE_TESTS=running_procs diff --git a/salt-config/roster b/salt-config/roster index 1452e85cc..d22077cfa 100644 --- a/salt-config/roster +++ b/salt-config/roster @@ -19,8 +19,7 @@ prometheus: redmine: host: ocp16.open-contracting.org registry: - host: ocp13.open-contracting.org - port: 2223 + host: ocp27.open-contracting.org portland-dev: host: ocp26.open-contracting.org user: ocpadmin @@ -43,4 +42,5 @@ portland-dev: # ocp10 was kingfisher-archive (archive.kingfisher.open-contracting.org) # ocp11 was covid19 (www.open-contracting.health) # ocp12 was spoonbill-dev +# ocp13 was registry on Ubuntu 20 # ocp14 was redash (redash.open-contracting.org) From 9ad82a6dc80b2d0c98ea77b269ccabf2ac647865 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 21 Aug 2024 16:57:28 +0100 Subject: [PATCH 02/14] feat: Upgrade Postgres to version 16 --- pillar/registry.sls | 5 +++-- salt/postgres/init.sls | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pillar/registry.sls b/pillar/registry.sls index 29e477540..f9816af38 100644 --- a/pillar/registry.sls +++ b/pillar/registry.sls @@ -84,9 +84,10 @@ apache: servername: rabbitmq.data.open-contracting.org postgres: - version: 12 + version: 16 # Public access allows Docker connections. Hetzner's firewall prevents non-local connections. public_access: True + data_directory: '/data/storage/postgresql/16/main' configuration: name: registry source: shared @@ -96,7 +97,7 @@ postgres: storage: hdd type: oltp content: | - data_directory = '/data/storage/postgresql/12/main' + data_directory = '/data/storage/postgresql/16/main' # Avoid "checkpoints are occurring too frequently" due to intense writes (default 1GB). max_wal_size = 10GB diff --git a/salt/postgres/init.sls b/salt/postgres/init.sls index 569bb13e3..d43b71011 100644 --- a/salt/postgres/init.sls +++ b/salt/postgres/init.sls @@ -164,6 +164,21 @@ postgresql-reload: {{ apache('postgres', {'configuration': 'default', 'servername': pillar.postgres.ssl.servername}) }} {% endif %} +{% if salt['pillar.get']('postgres:data_directory') %} +{{ pillar.postgres.data_directory }}: + file.directory: + - name: {{ pillar.postgres.data_directory }} + - user: postgres + - group: postgres + - makedirs: True + cmd.run: + - name: /usr/lib/postgresql/{{ pillar.postgres.version }}/bin/initdb -D {{ pillar.postgres.data_directory }} + - runas: postgres + - creates: {{ pillar.postgres.data_directory }}/PG_VERSION + - watch_in: + - service: postgresql +{% endif %} + {% if pillar.postgres.configuration %} /etc/postgresql/{{ pillar.postgres.version }}/main/conf.d/030_{{ pillar.postgres.configuration.name }}.conf: file.managed: From b3733e59ca7b3e32657416c50159b5e5c90c5c5d Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 21 Aug 2024 16:58:08 +0100 Subject: [PATCH 03/14] fix: change rsyslog socket path --- salt/core/rsyslog/files/docker.conf | 2 +- salt/docker/files/daemon-logging.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/core/rsyslog/files/docker.conf b/salt/core/rsyslog/files/docker.conf index 5c0daa230..0cab0b109 100644 --- a/salt/core/rsyslog/files/docker.conf +++ b/salt/core/rsyslog/files/docker.conf @@ -1,5 +1,5 @@ # Define the socket input -input(type="imuxsock" Socket="/var/spool/docker-custom.sock") +input(type="imuxsock" Socket="/var/spool/rsyslog/docker-custom.sock") # Define a template for dynamic file names based on the Docker image name # https://www.rsyslog.com/doc/configuration/templates.html#string diff --git a/salt/docker/files/daemon-logging.json b/salt/docker/files/daemon-logging.json index 7e39ba65f..e39af5cda 100644 --- a/salt/docker/files/daemon-logging.json +++ b/salt/docker/files/daemon-logging.json @@ -1,7 +1,7 @@ { "log-driver": "syslog", "log-opts": { - "syslog-address": "unixgram:///var/spool/docker-custom.sock", + "syslog-address": "unixgram:///var/spool/rsyslog/docker-custom.sock", "tag": "docker-custom-{{.Name}}" } } From cea43954d3bf088189cfc78c70109bb254387dd4 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 21 Aug 2024 17:03:04 +0100 Subject: [PATCH 04/14] feat: use Python version 3.12 --- pillar/registry.sls | 3 --- 1 file changed, 3 deletions(-) diff --git a/pillar/registry.sls b/pillar/registry.sls index f9816af38..bede9e5f9 100644 --- a/pillar/registry.sls +++ b/pillar/registry.sls @@ -113,9 +113,6 @@ docker: uid: 1002 syslog_logging: True -python: - version: '3.10' - kingfisher_collect: user: collect group: deployer From 61c2d4a726d1a02b72b1902825343f382b102a93 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 21 Aug 2024 17:08:31 +0100 Subject: [PATCH 05/14] feat: add new sensors --- pillar/registry_maintenance.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pillar/registry_maintenance.sls b/pillar/registry_maintenance.sls index 7d71d514c..193ba1909 100644 --- a/pillar/registry_maintenance.sls +++ b/pillar/registry_maintenance.sls @@ -9,5 +9,5 @@ maintenance: DISABLE_TESTS=running_procs hardware_sensors: True custom_sensors: - - nct6775 - - k10temp + - coretemp + - nct6775 From fea7647fafba6943101b0a0c245924ac4759c0ad Mon Sep 17 00:00:00 2001 From: RobHooper Date: Thu, 22 Aug 2024 09:50:50 +0100 Subject: [PATCH 06/14] feat: add ocp27 to Prometheus --- salt/prometheus/files/conf-prometheus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/prometheus/files/conf-prometheus.yml b/salt/prometheus/files/conf-prometheus.yml index 8fc0d3761..feae5007b 100644 --- a/salt/prometheus/files/conf-prometheus.yml +++ b/salt/prometheus/files/conf-prometheus.yml @@ -20,7 +20,7 @@ scrape_configs: 'kingfisher-main': 'ocp23.open-contracting.org', 'ocds-live.docs': 'ocp19.open-contracting.org', 'prometheus-server-node': 'ocp20.open-contracting.org', - 'data-registry': 'ocp13.open-contracting.org', + 'data-registry': 'ocp27.open-contracting.org', 'redmine': 'ocp16.open-contracting.org', }|items %} - job_name: '{{ job_name }}' From a110e82239febea896056f79b34f217af5ee3cc5 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Fri, 30 Aug 2024 12:14:28 +0100 Subject: [PATCH 07/14] feat: allow aws install globally --- salt/aws/init.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/aws/init.sls b/salt/aws/init.sls index d726b2241..caa21867b 100644 --- a/salt/aws/init.sls +++ b/salt/aws/init.sls @@ -5,6 +5,8 @@ awscli: - name: python3-pip pip.installed: - name: awscli + - extra_args: + - --break-system-packages - require: - pkg: awscli From e1f077bf3bf47c7b3c41913a0de3de2d94135a26 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 4 Sep 2024 13:35:21 +0100 Subject: [PATCH 08/14] feat: update 001_base.sql hash --- salt/pelican/backend/init.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/pelican/backend/init.sls b/salt/pelican/backend/init.sls index 508a33cd2..a88811251 100644 --- a/salt/pelican/backend/init.sls +++ b/salt/pelican/backend/init.sls @@ -43,7 +43,7 @@ btree_gin: # curl -sSf https://raw.githubusercontent.com/open-contracting/pelican-backend/main/pelican/migrations/002_constraints.sql | shasum -a 256 {% for basename, source_hash in [ - ('001_base', 'c4b65862980146d0ba88e437b1dd129c5c641597656dcca6b89cfe4ecb7979df'), + ('001_base', 'b6f2c25da154e1b4b8b55e1231039c84b4c0c3edab5d1c4c9e7dbd402b25ca36'), ('002_constraints', 'f298f0b8cb20d47f390b480d44d12c097e83b177dde56234dcbebc6ad3dcf229'), ] %} From fd8f78ab2b789812fd2aeec5958ee4893030965f Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 4 Sep 2024 13:41:36 +0100 Subject: [PATCH 09/14] feat: add required python libraries --- salt/python/extensions.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/python/extensions.sls b/salt/python/extensions.sls index 39025df9b..0df9c7ede 100644 --- a/salt/python/extensions.sls +++ b/salt/python/extensions.sls @@ -7,3 +7,5 @@ python c extensions: - python{{ salt['pillar.get']('python:version', 3) }}-dev - build-essential - libffi-dev + - libxml2-dev + - libxslt1-dev From 786762cb4cdd5265df64fa97468c0a24a966d612 Mon Sep 17 00:00:00 2001 From: RobHooper Date: Mon, 9 Sep 2024 14:33:10 +0100 Subject: [PATCH 10/14] feat: rename exporter storage --- pillar/registry.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/registry.sls b/pillar/registry.sls index 0a38e6b34..487c67a58 100644 --- a/pillar/registry.sls +++ b/pillar/registry.sls @@ -130,7 +130,7 @@ kingfisher_collect: docker_apps: registry: target: data-registry - exporter_host_dir: /data/storage/exporter_dumps + exporter_host_dir: /data/storage/exporter env: DJANGO_PROXY: True ALLOWED_HOSTS: data.open-contracting.org From ea1a16c0ca0a8645324da4bfea2de5dd3c6b5aa9 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:08:34 -0400 Subject: [PATCH 11/14] chore: Require pkg: postgres if using postgres user. Normalize indentation. --- pillar/registry_maintenance.sls | 4 ++-- salt/postgres/init.sls | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pillar/registry_maintenance.sls b/pillar/registry_maintenance.sls index 193ba1909..4f95db988 100644 --- a/pillar/registry_maintenance.sls +++ b/pillar/registry_maintenance.sls @@ -9,5 +9,5 @@ maintenance: DISABLE_TESTS=running_procs hardware_sensors: True custom_sensors: - - coretemp - - nct6775 + - coretemp + - nct6775 diff --git a/salt/postgres/init.sls b/salt/postgres/init.sls index 66a804b12..cf903811b 100644 --- a/salt/postgres/init.sls +++ b/salt/postgres/init.sls @@ -177,10 +177,14 @@ postgresql-reload: - user: postgres - group: postgres - makedirs: True + - require: + - pkg: postgresql cmd.run: - name: /usr/lib/postgresql/{{ pillar.postgres.version }}/bin/initdb -D {{ pillar.postgres.data_directory }} - runas: postgres - creates: {{ pillar.postgres.data_directory }}/PG_VERSION + - require: + - pkg: postgresql - watch_in: - service: postgresql {% endif %} From 78d39fa07f98a8f6e1d4893cd836362763927198 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:35:08 -0400 Subject: [PATCH 12/14] docs: Add data registry page. Copy-edit data support page. --- docs/deploy/create_server.rst | 2 + docs/deploy/servers/data-registry.rst | 98 +++++++++++++++++++++++ docs/deploy/servers/data-support.rst | 108 +++++++++++++++----------- docs/deploy/servers/index.rst | 1 + 4 files changed, 164 insertions(+), 45 deletions(-) create mode 100644 docs/deploy/servers/data-registry.rst diff --git a/docs/deploy/create_server.rst b/docs/deploy/create_server.rst index 5bc42c35d..5410e3875 100644 --- a/docs/deploy/create_server.rst +++ b/docs/deploy/create_server.rst @@ -542,12 +542,14 @@ Some IDs might fail (`#156 ` of the root user and, if applicable, each app user +#. If the server uses :ref:`SSL certificates`, copy the ``/etc/apache2/md`` directory #. If the server runs any Django applications (like :doc:`servers/cove`), copy the ``media`` directory and the ``db.sqlite3`` file from the app's directory #. If the server runs a database like PostgreSQL (``pg_dump``), MySQL (``mysqldump``) or Elasticsearch, copy the database #. If the server runs a web server like Apache or application server like uWSGI, optionally copy the log files .. seealso:: + - :ref:`Data registry` - :doc:`servers/data-support` - :ref:`OCDS documentation` - :ref:`Prometheus` diff --git a/docs/deploy/servers/data-registry.rst b/docs/deploy/servers/data-registry.rst new file mode 100644 index 000000000..40bc4c9c6 --- /dev/null +++ b/docs/deploy/servers/data-registry.rst @@ -0,0 +1,98 @@ +Data registry +============= + +.. _data-registry-migrate: + +Migrate from an old server +-------------------------- + +Update Salt +~~~~~~~~~~~ + +.. seealso:: + + :doc:`../create_server` + +#. Check that ``docker.uid`` in the ``pillar/kingfisher_main.sls`` file matches the entry in the ``/etc/passwd`` file for the ``docker.user`` (``deployer``). +#. Change ``cron.present`` to ``cron.absent`` in the ``salt/pelican/backend/init.sls`` file. +#. Change ``cron.present`` to ``cron.absent`` in the ``salt/registry/init.sls`` file. +#. Comment out the ``postgres.backup`` section of the Pillar file. +#. :doc:`Deploy the old server and the new server<../deploy>`. +#. Delete the ``/etc/cron.d/postgres_backups`` file on the old server. + +Check that no crawls are running at https://collect.data.open-contracting.org, and no messages are enqueued at https://rabbitmq.data.open-contracting.org. + +Filesystem +~~~~~~~~~~ + +Copy these directories from the old server to the new server: + +- ``/data/storage/exporter`` +- ``/data/storage/spoonbill`` +- ``/home/collect/scrapyd/logs`` + +Databases +~~~~~~~~~ + +Docker apps +~~~~~~~~~~~ + +#. Run migrations for :doc:`Docker apps<../docker>` as the ``deployer`` user: + + .. code-block:: bash + + su - deployer + + cd /data/deploy/kingfisher-process/ + docker compose run --rm --name kingfisher-process-migrate cron python manage.py migrate + + cd /data/deploy/pelican-frontend/ + docker compose run --rm --name pelican-frontend-migrate cron python manage.py migrate + +#. :doc:`Pull new images and start new containers for each Docker app<../docker>`. + +Kingfisher Collect +~~~~~~~~~~~~~~~~~~ + +Once DNS has propagated, :ref:`update-spiders`, but with: + +.. code-block:: + + scrapyd-deploy registry + +Pelican backend +~~~~~~~~~~~~~~~ + +The initial migrations for Pelican backend are run by Salt. + +#. Connect to the old server, and dump the ``exchange_rates`` table: + + .. code-block:: bash + + sudo -i -u postgres psql -c '\copy exchange_rates (valid_on, rates, created, modified) to stdout' pelican_backend > exchange_rates.csv + +#. Copy the database dump to your local machine. For example: + + .. code-block:: bash + + rsync -avz root@ocp13.open-contracting.org:~/exchange_rates.csv . + +#. Copy the database dump to the new server. For example: + + .. code-block:: bash + + rsync -avz exchange_rates.sql root@ocp23.open-contracting.org:~/ + +#. Populate the ``exchange_rates`` table: + + .. code-block:: bash + + psql -U pelican_backend -h localhost -c "\copy exchange_rates (valid_on, rates, created, modified) from 'exchange_rates.csv';" pelican_backend + +Restore Salt +~~~~~~~~~~~~ + +#. Change ``cron.absent`` to ``cron.present`` in the ``salt/pelican/backend/init.sls`` file. +#. Change ``cron.absent`` to ``cron.present`` in the ``salt/registry/init.sls`` file. +#. Uncomment the ``postgres.backup`` section of the Pillar file. +#. :doc:`Deploy the new server<../deploy>`. diff --git a/docs/deploy/servers/data-support.rst b/docs/deploy/servers/data-support.rst index bb117e234..877a5c158 100644 --- a/docs/deploy/servers/data-support.rst +++ b/docs/deploy/servers/data-support.rst @@ -4,15 +4,8 @@ Data support Create a data support main server --------------------------------- -#. Notify RBC Group of the new domain name for the new PostgreSQL server -#. Adjust reserved disk space to 1% for large disks: - - .. code-block:: bash - - tune2fs -m 1 /dev/md2 - -Dependent services -~~~~~~~~~~~~~~~~~~ +Dependencies +~~~~~~~~~~~~ Tinyproxy #. Update the allowed IP addresses in the ``pillar/tinyproxy.sls`` file @@ -21,64 +14,55 @@ Replica, if applicable #. Update the allowed IP addresses and hostname in the ``pillar/kingfisher_replica.sls`` file #. Deploy the ``kingfisher-replica`` service, when ready -Docker -~~~~~~ +Dependents +~~~~~~~~~~ -#. Check that ``docker.uid`` in the ``pillar/kingfisher_main.sls`` file matches the entry in the ``/etc/passwd`` file. +#. Notify RBC Group of the new domain name for the new PostgreSQL server -Docker apps +Update Salt ~~~~~~~~~~~ -#. Run migrations for :doc:`Docker apps<../docker>` as the ``deployer`` user: - - .. code-block:: bash - - su - deployer - - cd /data/deploy/kingfisher-process/ - docker compose run --rm --name kingfisher-process-migrate cron python manage.py migrate - - cd /data/deploy/pelican-frontend/ - docker compose run --rm --name pelican-frontend-migrate cron python manage.py migrate - -#. :doc:`Pull new images and start new containers for each Docker app<../docker>`. - -Pelican backend -~~~~~~~~~~~~~~~ +.. seealso:: -.. attention:: + :doc:`../create_server` - A cron job updates the ``exchange_rates`` table every 12 hours. Complete this step before the next run. +#. Check that ``docker.uid`` in the ``pillar/kingfisher_main.sls`` file matches the entry in the ``/etc/passwd`` file for the ``docker.user`` (``deployer``). +#. Comment out the state that creates the ``PELICAN_BACKEND_UPDATE_EXCHANGE_RATES`` cron job -The initial migrations for Pelican backend are run by Salt. +Operating system +~~~~~~~~~~~~~~~~ -#. Connect to the old server, and dump the ``exchange_rates`` table: +#. Adjust reserved disk space to 1% for large disks: .. code-block:: bash - sudo -i -u postgres psql -c '\copy exchange_rates (valid_on, rates, created, modified) to stdout' pelican_backend > exchange_rates.csv - -#. Copy the database dump to your local machine. For example: - - .. code-block:: bash + tune2fs -m 1 /dev/md2 - rsync -avz root@ocp13.open-contracting.org:~/exchange_rates.csv . +Docker apps +~~~~~~~~~~~ -#. Copy the database dump to the new server. For example: +#. Run migrations for :doc:`Docker apps<../docker>` as the ``deployer`` user: .. code-block:: bash - rsync -avz exchange_rates.sql root@ocp23.open-contracting.org:~/ + su - deployer -#. Populate the ``exchange_rates`` table: + cd /data/deploy/kingfisher-process/ + docker compose run --rm --name kingfisher-process-migrate cron python manage.py migrate - .. code-block:: bash + cd /data/deploy/pelican-frontend/ + docker compose run --rm --name pelican-frontend-migrate cron python manage.py migrate - psql -U pelican_backend -h localhost -c "\copy exchange_rates (valid_on, rates, created, modified) from 'exchange_rates.csv';" pelican_backend +#. :doc:`Pull new images and start new containers for each Docker app<../docker>`. Kingfisher Collect ~~~~~~~~~~~~~~~~~~ +Once DNS has propagated, :ref:`update-spiders`. + +Copy incremental data +^^^^^^^^^^^^^^^^^^^^^ + #. :doc:`SSH<../../use/ssh>` into the new server as the ``incremental`` user: #. Generate an SSH key pair: @@ -141,7 +125,41 @@ Kingfisher Collect #. Remove the public SSH key from the ``ssh.incremental`` list in the ``pillar/kingfisher_main.sls`` file. #. Change ``cron.absent`` to ``cron.present`` in the ``salt/kingfisher/collect/incremental.sls`` file. #. :doc:`Deploy the new server<../deploy>`. -#. :ref:`update-spiders`. + +Pelican backend +~~~~~~~~~~~~~~~ + +The initial migrations for Pelican backend are run by Salt. + +#. Connect to the old server, and dump the ``exchange_rates`` table: + + .. code-block:: bash + + sudo -i -u postgres psql -c '\copy exchange_rates (valid_on, rates, created, modified) to stdout' pelican_backend > exchange_rates.csv + +#. Copy the database dump to your local machine. For example: + + .. code-block:: bash + + rsync -avz root@ocp13.open-contracting.org:~/exchange_rates.csv . + +#. Copy the database dump to the new server. For example: + + .. code-block:: bash + + rsync -avz exchange_rates.sql root@ocp23.open-contracting.org:~/ + +#. Populate the ``exchange_rates`` table: + + .. code-block:: bash + + psql -U pelican_backend -h localhost -c "\copy exchange_rates (valid_on, rates, created, modified) from 'exchange_rates.csv';" pelican_backend + +Restore Salt +~~~~~~~~~~~~ + +#. Uncomment the state that creates the ``PELICAN_BACKEND_UPDATE_EXCHANGE_RATES`` cron job +#. :doc:`Deploy the new server<../deploy>` Create a data support replica server ------------------------------------ diff --git a/docs/deploy/servers/index.rst b/docs/deploy/servers/index.rst index 6fcec7cf0..2bebf560a 100644 --- a/docs/deploy/servers/index.rst +++ b/docs/deploy/servers/index.rst @@ -8,3 +8,4 @@ Server-specific tasks data-support.rst docs.rst prometheus.rst + data-registry.rst From 452ba1226d18421d4766ef48cb232674eaaa7dbe Mon Sep 17 00:00:00 2001 From: RobHooper Date: Wed, 16 Oct 2024 16:34:00 +0100 Subject: [PATCH 13/14] fix: set system flag on 24.04 and newer --- salt/aws/init.sls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/aws/init.sls b/salt/aws/init.sls index caa21867b..fdbcfbfec 100644 --- a/salt/aws/init.sls +++ b/salt/aws/init.sls @@ -5,8 +5,11 @@ awscli: - name: python3-pip pip.installed: - name: awscli + {% if grains.osmajorrelease | int >= 24 %} + # Allow "awscli" to be installed at a system level, this flag is required since Python 3.11 (PEP 668). - extra_args: - --break-system-packages + {% endif %} - require: - pkg: awscli From a8c4fcae00b35efbcf740395e7063ad6edc0dc80 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:26:16 -0400 Subject: [PATCH 14/14] docs: Use link as explanation --- salt/aws/init.sls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/aws/init.sls b/salt/aws/init.sls index fdbcfbfec..98e3c8865 100644 --- a/salt/aws/init.sls +++ b/salt/aws/init.sls @@ -5,11 +5,11 @@ awscli: - name: python3-pip pip.installed: - name: awscli - {% if grains.osmajorrelease | int >= 24 %} - # Allow "awscli" to be installed at a system level, this flag is required since Python 3.11 (PEP 668). +{% if grains.osmajorrelease | int >= 24 %} + # https://peps.python.org/pep-0668/ - extra_args: - --break-system-packages - {% endif %} +{% endif %} - require: - pkg: awscli