Skip to content

Commit

Permalink
chore: release 0.34.0 (#378)
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>

---------

Signed-off-by: Olivier Léobal <[email protected]>
Co-authored-by: Olivier Léobal <[email protected]>
  • Loading branch information
ThibaultFy and oleobal authored Oct 20, 2023
1 parent d42a0c4 commit 3d0e184
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.34.0]

### Added

- Support on Python 3.11 ([#367](https://github.com/Substra/substra-documentation/pull/367))
- Add doc about task output permissions ([#369](https://github.com/Substra/substra-documentation/pull/369))
- Examples now install torch on CPU only if launched on docker or remote mode ([#375](https://github.com/Substra/substra-documentation/pull/375))

## [0.33.1]

Expand All @@ -27,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add files to run documentation examples in nightly CI ([#357](https://github.com/Substra/substra-documentation/pull/357))
- Update example to be runnable in remote mode ([#357](https://github.com/Substra/substra-documentation/pull/357))
- Fix [JSON releases](https://docs.substra.org/releases.json) ([#356](https://github.com/Substra/substra-documentation/pull/356))
- Convert examples to notebook ([#368](https://github.com/Substra/substra-documentation/pull/368))

### Added

Expand Down
15 changes: 15 additions & 0 deletions docs/source/additional/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ This is an overview of the main changes, please have a look at the changelog of
- `backend changelog <https://github.com/Substra/substra-backend/blob/main/CHANGELOG.md>`__
- `orchestrator changelog <https://github.com/Substra/orchestrator/blob/main/CHANGELOG.md>`__

Substra 0.34.0 --- 2023-10-18
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**All:**

- Add Python 3.11 support.

**Documentation:**

- Example install torch on CPU only by default when using the docker or remote mode.

**Operations**:

- **BREAKING CHANGE**: A database upgrade **must be performed manually**. See :ref:`upgrade notes <ops upgrade notes 0.34>`.

Substra 0.33.1 --- 2023-10-09
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
38 changes: 38 additions & 0 deletions docs/source/additional/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ components: # for table headers
- substra-tests

releases:
- version: 0.34.0
components:
substrafl:
version: 0.42.0
link: https://github.com/Substra/substrafl/releases/tag/0.42.0
substra:
version: 0.49.0
link: https://github.com/Substra/substra/releases/tag/0.49.0
substra-tools:
version: 0.21.0
link: https://github.com/Substra/substra-tools/releases/tag/0.21.0
substra-backend:
version: 0.42.2
link: https://github.com/Substra/substra-backend/releases/tag/0.42.2
helm:
version: 23.0.2
link: https://artifacthub.io/packages/helm/substra/substra-backend/23.0.2
orchestrator:
version: 0.37.0
link: https://github.com/Substra/orchestrator/releases/tag/0.37.0
helm:
version: 8.0.1
link: https://artifacthub.io/packages/helm/substra/orchestrator/8.0.1
substra-frontend:
version: 0.46.0
link: https://github.com/Substra/substra-frontend/releases/tag/0.46.0
helm:
version: 1.0.25
link: https://artifacthub.io/packages/helm/substra/substra-frontend/1.0.25
hlf-k8s:
version: 0.2.4
link: https://github.com/Substra/hlf-k8s/releases/tag/0.2.4
helm:
version: 10.2.4
link: https://artifacthub.io/packages/helm/substra/hlf-k8s/10.2.4
substra-tests:
version: 0.47.0
link: https://github.com/Substra/substra-tests/releases/tag/0.47.0
- version: 0.33.1
components:
substrafl:
Expand Down
100 changes: 99 additions & 1 deletion docs/source/how-to/deploying-substra/upgrade-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,104 @@
Upgrade notes
*************

.. _ops upgrade notes 0.34:

Substra 0.34.0
--------------

This version upgrades the integrated PostgreSQL databases from versions 14 to 16. This upgrade must be performed manually.

If you :ref:`do not use the integrated databases <ops howto external database>`, then you have nothing to do.

Otherwise, you must update the data format. There are many ways to do this; here we give you a simple way which is acceptable if:

* Have small amounts of data
* Have access to the clusters
* Downtime is acceptable

.. warning::

Before going further, make sure no operations are in progress and cordon the node.

#. Gather required info:

* database credentials (here ``$PG_USER`` and an associated password)
* Kubernetes namespace (here ``$NAMESPACE``)
* Helm release (hereafter ``$RELEASE_NAME``, can be obtained from ``helm get release -A``)
* hostname of the Postgres service (hereafter ``$HOST``, can be obtained from ``kubectl get svc -n $NAMESPACE``)
* name of the database in Postgres: by default ``orchestrator`` for the orchestrator, and ``substra`` for the backend (hereafter ``$DB``)

#. Deploy a psql client (we will call it ``postgres-backup``) in the namespace

.. code-block:: bash
kubectl apply -f -n $NAMESPACE - << 'EOF'
apiVersion: v1
kind: Pod
metadata:
name: postgres-backup
spec:
containers:
- name: postgres
image: postgres
command: ["sleep", "infinity"]
EOF
#. Launch a shell from **within the postgres-backup pod** and dump the DB:
.. code-block:: bash
pg_dump $DB --host=$HOST -U $PG_USER -f /dump.sql --clean --create
#. (OPTIONAL) Retrieve the dump:
.. code-block:: bash
kubectl --retries 10 cp $NAMESPACE/postgres-backup:/dump.sql dump.sql
sha1sum dump.sql # check it matches with the source (use `shasum` on Mac OS)
#. Delete the Postgres StatefulSet and PVC
This depends on your particular set-up but it should look like this:
.. code-block:: bash
kubectl delete -n substra statefulset $RELEASE_NAME-postgresql
kubectl delete -n substra pvc data-$RELEASE_NAME-postgresql-0
#. Perform the database upgrade
Note versions ``8.0.0`` and ``23.0.0`` are used: they contain the database upgrade. The apps upgrade are done in ``8.0.1`` and ``23.0.2``.
You can get values with ``helm get values``
Orchestrator:
.. code-block:: bash
helm upgrade -n $NAMESPACE $RELEASE_NAME https://github.com/Substra/charts/raw/main/orchestrator-8.0.0.tgz --values orc-values.yaml
Backend:
.. code-block:: bash
helm upgrade -n $NAMESPACE $RELEASE_NAME https://github.com/Substra/charts/raw/main/substra-backend-23.0.0.tgz --values backend-values.yaml
#. Delete the applicative ``deployments`` and ``statefulset`` to avoid them polluting the database (``orchestrator-server``, ``backend-server``, ``backend-worker``, ...)
#. Launch a shell from **within the postgres-backup pod** and load the dump:
.. code-block:: bash
psql --host=$HOST -U $DB_USER < /dump.sql
#. Perform final upgrade as normal
.. warning::
It must be repeated on each Substra Backend and on the Orchestrator (if standalone).
.. _ops upgrade notes 0.28:
Substra 0.28.0
Expand All @@ -30,7 +128,7 @@ Then you'll need to copy them over to a new ``database`` key:
username: my-username
password: my-password
database: my-substra-db
database:
auth:
username: my-username
Expand Down

0 comments on commit 3d0e184

Please sign in to comment.