Upgrading

To upgrade from one Fiona 8 version to a newer one, here are the version-specific guides. Website visitors won’t be affected by an upgrade. It’s zero downtime.

Upgrading Fiona 8

from 20210204 to 20220318

1. Notify your editors

Let your editors know that an upgrade is going to be made and that no content must be changed during this process.

2. Back up content

Back up your Fiona 8 MariaDB and Minio content as described in Operation & Maintenance.

3. Install new version

Install the new Fiona 8 version as a fresh installation on a new host as described in the Installation Guide with the following exceptions:

  • In step #3 of the installation guide (“Set up two HTTPS terminators”), create a new set of HTTPS URLs, e.g. https://your-fiona8-backend-2.com/ and https://your-cdn-2.com/, respectively. The URLs https://your-fiona8-backend.com/ and https://your-cdn.com/ still point to your old installation.
  • In step #5 of the installation guide (“Configure Docker”), update docker-compose.yml to use https://your-cdn-2.com/ for CDN_URL.
  • In step #8 of the installation guide (“Setup database and search engine”), instead of bin/rake db:setup, run bin/rake db:create
  • Skip step #9 of the installation guide (“Create your CMS tenant”).
  • In step #10 of the installation guide (“Configure your project app for connecting to Fiona 8”), temporarily use the new URL https://your-fiona8-backend-2.com for testing the new installation.

4. Stop processes

Stop the Fiona 8 workers of the new installation:

$ sudo docker-compose stop backend background_scheduler background_worker

5. Restore content

Restore the backups of the MariaDB database and Minio into the new installation as described in Operation & Maintenance.

6. Migrate data

Migrate the data of the new installation:

$ sudo docker-compose run --rm backend bin/rake db:migrate $ sudo docker-compose start background_scheduler background_worker $ sudo docker-compose run --rm backend bin/rails runner 'ESU.repair!'

Start a Rails console:

$ sudo docker-compose run --rm backend bin/rails c

Now perform the following migrations. Be aware that they will take a long time, depending on the amount of images in your content.

Migration::S3::CreatePrecomputedTransformations.migrate_unattended(ids: Tenant.all_ids) Migration::S3::CreateWebPForCustomTransformations.migrate_unattended(ids: Tenant.all_ids) Migration::S3::ExtractMetadata.migrate_unattended(ids: Tenant.all_ids, only_images: true, update_if_version_older_than: "2021-10-08")

Note that in rare cases, a migration command may fail due to corrupt binary data. Please contact our support team if this happens.

7. Start processes

Start the Fiona 8 workers of the new installation:

$ sudo docker-compose up -d

8. Perform tests

Test the new installation.

9. Switch to production

If everything works fine, switch over to the new installation:

Do this by moving the DNS records of https://your-fiona8-backend.com/ and https://your-cdn.com/ to the new installation.

Update docker-compose.yml to use https://your-cdn.com/ for CDN_URL.

$ sudo docker-compose up -d

Undo the temporary change of your project app.

10. Shut down old system

Shut down the old installation.

Upgrading Fiona 8 

from 20200227 to 20210204

1. Notify your editors

Let your editors know that an upgrade is going to be made and that no content must be changed during this process.

2. Back up your content

Back up your Fiona 8 MariaDB and Minio content as described in Operation & Maintenance.

3. Install the new version

Install the new Fiona 8 version as a fresh installation on a new host as described in the Installation Guide with the following exceptions:

  • In step #3 of the installation guide (“Set up two HTTPS terminators”), create a new set of HTTPS URLs, e.g. https://your-fiona8-backend-2.com/ and https://your-cdn-2.com/, respectively. The URLs https://your-fiona8-backend.com/ and https://your-cdn.com/ still point to your old installation.
  • In step #5 of the installation guide (“Configure Docker”), update docker-compose.yml to use https://your-cdn-2.com/ for CDN_URL.
  • In step #8 of the installation guide (“Set up database and search engine”), skip $ bin/rake db:schema:load. Use a different environment variable name (without DELTA): bin/rails runner 'ESU.init(url: ENV.fetch("ELASTICSEARCH_ENDPOINTS_0"))'.
  • Skip step #9 of the installation guide (“Create your CMS tenant”).
  • In step #10 of the installation guide (“Configure your project app for connecting to Fiona 8”), temporarily use the new URL https://your-fiona8-backend-2.com for testing the new installation.

4. Stop all processes

Stop the Fiona 8 workers of the new installation:

$ sudo docker-compose stop backend background_scheduler background_worker

5. Restore the content

Restore the backups of the MariaDB database and Minio into the new installation as described in Operation & Maintenance.

6. Migrate the data

Migrate the data of the new installation:

$ sudo docker-compose run --rm backend bin/rake db:migrate $ sudo docker-compose run --rm backend bin/rails runner ' Tenant.all.each {|t| ExecutionContext.setup Tenant.use(t) IndexHousekeeper.new.perform_all_slow_transfers ExecutionContext.teardown }' $ sudo docker-compose up -d $ sudo docker-compose run --rm backend bin/rails runner 'ESU.legacy_repair!'

7. Start the processes

Start the Fiona 8 workers of the new installation:

$ sudo docker-compose up -d

8. Perform tests

Test the new installation.

9. Switch to production

If everything works fine, switch over to the new installation.

Do this by moving the DNS records of https://your-fiona8-backend.com/ and https://your-cdn.com/ to the new installation.

Update docker-compose.yml to use https://your-cdn.com/ for CDN_URL.

Apply the changes to the services:

$ sudo docker-compose up -d

Undo the temporary change of your project app.

10. Shut down the old system

Shut down the old installation.

Content migration

We have prepared a couple of migration scripts you can use to migrate the content of your Fiona 6 or 7 installation to Fiona 8. Please feel free to change the migration scripts according to your needs. The repository with the migration scripts is hosted at GitHub.

Need help? Don’t hesitate to contact our support team: support@scrivito.com