Upgrading archipelago

41 views
Skip to first unread message

Christian Wittern

unread,
Dec 13, 2020, 6:30:36 PM12/13/20
to archipelago commons
Hi,
Just joint this group because I want to try out archipelago. I followed the instructions on github and installed everything successfully on my Ubuntu 18.04 box. Then I realized that for some reasons the installations I looked at asked me to check out beta 2, although beta 3 is available.  So now my question is:
What is the procedure for upgrading from beta 2 to beta 3?
All the best,
Chris

dp...@metro.org

unread,
Dec 14, 2020, 10:39:24 PM12/14/20
to archipelago commons
Hi Chris,

Sorry for the delay on replying. Happy you are testing Archipelago out.
You have a few options. If you have nothing really valuable yet inside the system and are just testing, the easiest way around is to start over since beta2 is a little bit older. But going a full upgrade path is a good exercise to understand the logic behind module dependencies, configs, etc. Normally people will actually keep adding settings and updates will be mostly just code. 

Before you do anything. Do a backup.

docker-compose down
// backup
cd .. (you should be one folder down in relation to archipelago-deployment)
sudo cp -Rpv  archipelago-deployment  archipelago-deployment-backup-somedate // this way you can always go back if you missed a step!
cd archipelago-deployment

Ok. Now. If you copy the commands from here changes are 100% that the double quotes will be wrong. Make sure they are actually unix double quotes and not "fancy" ones 


1.- From 0 (no backup, so we aware this is really deleting everything)
docker-compose down
cd ..
sudo rm -rf archipelago-deployment
and start over from Step 1 but now using the right branch

2.- Just code. No configs (you can always configure your site manually and add new Display modes). All your data stays. NORMAL procedure on production

Since you will go "wild" I would recommend creating a new branch. That way old beta2, configs, etc stay "safe". Still you can do a backup (see option 3)

git checkout -b chris-8.x 

First:
Update to a modern Drupal (8.9.11?)

Remove (old, not maintained not needed)

docker exec -ti esmero-php bash -c "drush -y pmu rdf_builder"
docker exec -ti esmero-php bash -c "drush -y pmu rdfui"

docker exec -ti esmero-php bash -c "php -d memory_limit=-1 /usr/bin/composer update drupal/core:8.9.11 --with-dependencies" // If you get errors/missing dependencies you can install them also in the same command to make sure they are solved.

Now archipelago modules

NOTE: There is this script that will update you inside a same branch (same release, not what you want, but open it and look at it)
docker exec -ti esmero-php bash -c "./scripts/archipelago/update.sh" // if you run this it will keep you in beta2, maybe just fetch a newer commit, but still on beta2

But what is important there is a single line you want to run:

docker exec -ti esmero-php bash -c "php -d memory_limit=-1 /usr/bin/composer update strawberryfield/strawberryfield:dev-8.x-1.0-beta3 strawberryfield/format_strawberryfield:dev-8.x-1.0-beta3 strawberryfield/webform_strawberryfield:dev-8.x-1.0-beta3 archipelago/archipelago_subtheme:dev-8.x-1.0-beta3 --with-all-dependencies "

That will bring archipelago modules to beta3

Or you if you can't wait, you can try to go to 1.0.0-RC1 (working on it and changing probably this while week,, has been a longer than expected process (rewarding) since we have so many new features and bug fixes)

docker exec -ti esmero-php bash -c "php -d memory_limit=-1 /usr/bin/composer update strawberryfield/strawberryfield:dev-1.0.0-RC1 strawberryfield/format_strawberryfield:dev-1.0.0-RC1 strawberryfield/webform_strawberryfield:dev-1.0.0-RC1 --with-all-dependencies "

Now log in and start setting things up and testing.


3.- Reusing some of what you already have but not your data/nodes/images

docker-compose down
git status (to see what has changed?)
git stash (in case you have modified any of the files that are being tracked by Git)
git checkout 8.x-1.0-beta3
and follow the instructions again, installing, etc

4.- Reusing most of the things, keeping your ADOs, data and nodes and files, but you get new default configs
docker-compose down
// backup
cd .. (you should be one folder down in relation to archipelago-deployment)
sudo cp -Rpv  archipelago-deployment  archipelago-deployment-backup-somedate // this way you can always go back if you missed a step!
cd archipelago-deployment
git status (to see what has changed?)
git stash (in case you have modified any of the files that are being tracked by Git)
git checkout 8.x-1.0-beta3 // This will also bring a set of new settings to be seen in the config/sync folder
// Now copy the right docker-compose.yml file you want to use, or keep the existing one if you prefer old packages. but I would recommend going for the newer.
cp docker-compose-ngnix.yml docker-compose.yml
docker-compose up -d
(make sure all containers are running by doing a docker ps ... failure point could be min.io since there has been recent changes to configs.)
docker exec -ti esmero-php bash -c "composer install"  // this will now deploy newer versions of every package. And you may have some conflicts mostly because some Drupal Core packages changed.
docker exec -ti esmero-php bash -c "drush updatedb" // to run any updates on database that new modules could bring

Most important thing here is that there is a file named core.extension.yml (search on that list on the link shared) that lists all the modules that are enabled by default on beta3 and not on beta2. 
Before syncing anything you need to enable those since configurations are very dependent on modules and that is a failure point.
so basically remove the ones that won't be longer active after a config sync (in that comparison marked in red)
e.g 
docker exec -ti esmero-php bash -c "drush -y pmu rdfui"
And then enable the new ones just downloaded via composer (in that comparison marked in green)
e.g 
docker exec -ti esmero-php bash -c "drush -y en jsonapi_earlyrendering_workaround"
With that in place now you can do a:

docker exec -ti esmero-php bash -c "drush cim -y" // to sync your new configs on file to the db (live). This will override most of your settings but that is Ok, since a lot has changed. This is were you may need some Tunning. Since

If you forgot some modules, all good, config import will complain and will fail. And you fix that.
After that you can do on last 

docker exec -ti esmero-php bash -c "drush updatedb"

And try to log in. Hopefully you should only see a few warnings about off-sync configs. If anything fails you have the backup!


Sorry for the long post.
Hope this helps and please let us know how it went. As said, I'm in the midds of setting/commiting code/docker containers, etc for 1.0.0-RC1 and public testing this week so can't sadly test the steps I shared right now, but can Wednesday and give you another ways/simpler ways or even some automated script if you get lost.

Best!

Diego Pino

Christian Wittern

unread,
Dec 15, 2020, 2:23:53 AM12/15/20
to archipelago commons
Ah, thank you.  I decided to take the route of least resistance, that is deleting and start all over.  And if 1.0-RC is around the corner, I might as well wait for a few days. 
All the best,
Christian
Reply all
Reply to author
Forward
0 new messages