Important Notice: this service will be discontinued by the end of 2024 because for multiple years now, Plume is no longer under active/continuous development. Sadly each time there was hope, active development came to a stop again. Please consider using our Writefreely instance instead.

Mise à jour et migration de Plume

La bonne surprise

Ça faisait un bout de temps que je n'avais pas utilisé ni mis à jour Plume et mon infrastructure avait bien évolué depuis que je l'avais installé, du coup, plutôt que de tenter une mise à "sur place" j'ai préféré migrer sur un serveur tout neuf. Ma version précédente était une version 0.2.0 installée dans un container Docker dont les volumes étaient sur un disque virtuel dédié. Le nouveau serveur est situé dans le même centre Gandi que l'ancien, j'ai donc simplement fait un "snapshot" du disque, créé un nouveau disque à partir de ce snapshot et attaché ce disque au nouveau serveur. J'ai mis à jour mes fichiers de configuration Docker ainsi que mon DNS pour que l'adresse plume.dyomedea.com pointe sur le nouveau serveur et ai créé les nouveaux containers Docker en croisant les doigts (oui, chez moi "dc" est un alias pour "docker-compose") :

vdv@nuc:~/projects/tea/dyomedea/docker-plume$ dc up -d --build --force-recreate; dc logs -f
Pulling db-plume (postgres:10.5)...
10.5: Pulling from library/postgres
f17d81b4b692: Pull complete
c1f213be5edb: Pull complete
9c79723dc510: Pull complete
603a66804109: Pull complete
b4f1b901e523: Pull complete
99d9650419de: Pull complete
02d87bb25bad: Pull complete
333a24caa91e: Pull complete
9cab7935ece2: Pull complete
5977bf28967d: Pull complete
74ddd26cf783: Pull complete
07b76fcb42dd: Pull complete
7da7962ee038: Pull complete
0ddc5f8e0873: Pull complete
Digest: sha256:e19acdab213d6318565a6da5fb824ca5161e99fe63dbc37036557aacb35fae51
Status: Downloaded newer image for postgres:10.5
Building plume
Step 1/4 : FROM plumeorg/plume
latest: Pulling from plumeorg/plume
5e35bd43cf78: Pull complete
7289c313e8cc: Pull complete
596d4313fd92: Pull complete
6e451fdfb073: Pull complete
c49b287f214a: Pull complete
e3454bd6d98b: Pull complete
Digest: sha256:129872192b66511da819df4ce4f66b0e4c15f550f3970b335035d2b4186ced5c
Status: Downloaded newer image for plumeorg/plume:latest
 ---> e38d8abd410c
Step 2/4 : MAINTAINER Eric van der Vlist <vdv@dyomedea.com>
 ---> Running in aae6d854bcc4
Removing intermediate container aae6d854bcc4
 ---> 0df61084829b
Step 3/4 : COPY env /app/.env
 ---> 96c70ee792a2
Step 4/4 : EXPOSE 7878
 ---> Running in 29f71ffca698
Removing intermediate container 29f71ffca698
 ---> dfb967f112ce
Successfully built dfb967f112ce
Successfully tagged docker-plume_plume:latest
Connected (version 2.0, client OpenSSH_7.6p1)
Authentication (publickey) successful!
Creating docker-plume_db-plume_1 ... done
Creating docker-plume_plume_1    ... done
/tmp/_MEIRKTEbD/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
Connected (version 2.0, client OpenSSH_7.6p1)
/tmp/_MEIRKTEbD/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
/tmp/_MEIRKTEbD/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
/tmp/_MEIRKTEbD/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
Authentication (publickey) successful!
Attaching to docker-plume_plume_1, docker-plume_db-plume_1
plume_1     | Configuration read from /app/.env
plume_1     | thread 'main' panicked at '
plume_1     | It appear your database migration does not run the migration required
plume_1     | by this version of Plume. To fix this, you can run migrations via
plume_1     | this command:
plume_1     | 
plume_1     |     plm migration run
plume_1     | 
plume_1     | Then try to restart Plume.
plume_1     | ', src/main.rs:85:9
plume_1     | stack backtrace:
plume_1     |    0: backtrace::backtrace::libunwind::trace
plume_1     |              at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
plume_1     |    1: backtrace::backtrace::trace_unsynchronized
plume_1     |              at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
plume_1     |    2: std::sys_common::backtrace::_print_fmt
plume_1     |              at src/libstd/sys_common/backtrace.rs:77
plume_1     |    3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
plume_1     |              at src/libstd/sys_common/backtrace.rs:59

On ne pouvait tout de même pas s'attendre à ce que ça fonctionne du premier coup ;) mais le message d'erreur est très explicite :

plume_1     | It appear your database migration does not run the migration required
plume_1     | by this version of Plume. To fix this, you can run migrations via
plume_1     | this command:
plume_1     | 
plume_1     |     plm migration run

Suivons donc les indications :

vdv@nuc:~/projects/tea/dyomedea/docker-plume$ dc stop plume
Stopping docker-plume_plume_1 ... done
vdv@nuc:~/projects/tea/dyomedea/docker-plume$ dc run plume plm migration run
Starting docker-plume_db-plume_1 ... done
Configuration read from /app/.env
Running migration 20190530173029
Running migration 20190618152700
Running migration 20190619141114
Running migration 20190620145757
Running migration 20190624101212
Running migration 20191210104935
Running migration 20200105232816
vdv@nuc:~/projects/tea/dyomedea/docker-plume$ dc up -d plume; dc logs -f --tail 20
docker-plume_db-plume_1 is up-to-date
Starting docker-plume_plume_1 ... done
Attaching to docker-plume_plume_1, docker-plume_db-plume_1
plume_1     | Configuration read from /app/.env
plume_1     | Configured for production.
plume_1     |     => address: 0.0.0.0
plume_1     |     => port: 7878
plume_1     |     => log: critical
plume_1     |     => workers: 2
plume_1     |     => secret key: provided
plume_1     |     => limits: forms = 128KiB, json* = 1MiB
plume_1     |     => keep-alive: 5s
plume_1     |     => tls: disabled
plume_1     | Rocket has launched from http://0.0.0.0:7878
db-plume_1  | 2020-04-20 13:20:56.037 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db-plume_1  | 2020-04-20 13:20:56.037 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db-plume_1  | 2020-04-20 13:20:56.045 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db-plume_1  | 2020-04-20 13:20:56.155 UTC [21] LOG:  database system was interrupted; last known up at 2020-04-20 12:21:15 UTC

Puis nginx-proxy/nginx-proxy et nginx-proxy/docker-letsencrypt-nginx-proxy-companion se sont chargés de la suite et ont automatiquement configuré le proxy et créé les certificats TLS. Si toutes mises à jour pouvaient être aussi faciles ;) ...