Problem/Motivation

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://debian.aegirproject.org unstable InRelease: The following signatures were invalid: EXPKEYSIG 5ADF93A03376CCF9 Aegir Debian archive autosigning
W: Failed to fetch https://debian.aegirproject.org/dists/unstable/InRelease The following signatures were invalid: EXPKEYSIG 5ADF93A03376CCF9 Aegir Debian archive autosigning

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#21 3317637-21.patch1.29 KBfenstrat
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru created an issue. See original summary.

g33kg1rl’s picture

Priority: Normal » Critical

I am unable to upgrade Aegir because of the key not being updated. Please update or renew the key so Debian users can upgrade to the latest version of Aegir.

bgm’s picture

Hi, the Debian packages are not maintained anymore. There is ongoing discussion between Aegir maintainers on what are the next steps to recommend, but so far, most active maintainers have either moved to a Git-based installation or BOA (omega8).

In short, to convert a Debian-based install to a git-based or manual install, you need to:

  • Install the Aegir codebase in a separate directory than your current prod one (ex: /var/aegir/hostmaster and not /var/aegir/hostmaster-7.x-3.192)
  • Run hostmaster-migrate to migrate the Aegir database

We are working on publishing better documentation to help people with upgrading.

fenstrat’s picture

@bgm thanks for that, nice to know there is a plan to help on the migration to another workflow.

SocialNicheGuru’s picture

@pgm has the overall setup changed as provision used to be part of ubuntu under /usr/share/drush.
Will that no longer be needed either

bgm’s picture

Here is how I migrate my servers from the Debian package to a git-based installation. Feedback welcome!

Some assumptions/requirements:

  • Aegir was installed using the Debian packages
  • The installation is not using anything particularly fancy/non-standard
  • The current hostmaster is not in /var/aegir/hostmaster, but rather something like /var/aegir/hostmaster-7.x-3.192/ (rename the new git path below to something else, if it's the case)
  • Commands below can be run as a regular user, unless sudo is mentioned ("do this as root"), and "sudo -i -u aegir" means "open a shell as the 'aegir' user first)

These instructions are based on the Ansible roles by Concensus Entreprises: https://gitlab.com/consensus.enterprises/ansible-roles/ansible-role-aegir/

0) Remove Debian packages

sudo dpkg --remove aegir3-provision aegir3-hostmaster aegir3

Purging would delete the "aegir" user and one other configuration (the apache/nginx conf symlink), which is not dramatic in itself (they can be re-created). Out of lazyness, I usually edit/remove the files "/var/lib/dpkg/info/aegir3-provision.postrm" and "/var/lib/dpkg/info/aegir3-hostmaster.postrm" and then purge the packages.

1) Install composer, which will be used for installing Drupal

cd /tmp/
curl -sS https://getcomposer.org/installer | php
sudo mv /tmp/composer.phar /usr/local/bin/composer
sudo chmod 0755 /usr/local/bin/composer

2) Install Drush with git and composer

git clone --depth=1 --branch 8.4.11 https://github.com/drush-ops/drush.git /tmp/drush
cd /tmp/drush
composer install --prefer-dist --no-interaction
sudo mv /tmp/drush /usr/local/share/drush
sudo chown root.root -R /usr/local/share/drush
sudo rm /usr/local/bin/drush* # because the old deb packages created backups of old binaries
sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush

3) Install provision from git

sudo -i -u aegir
git clone https://git.drupalcode.org/project/provision.git /var/aegir/.drush/provision
cd /var/aegir/.drush/provision
git checkout 7.x-3.x

4) Build the hostmaster platform

sudo -i -u aegir
# 'drush cc drush' tends to fail
rm -fr /var/aegir/.drush/cache/
drush make /var/aegir/.drush/provision/aegir.make /var/aegir/hostmaster

5) Setup the fix-ownership/permissions scripts. Optional, since removing the Debian packages does not delete this, I think?

sudo bash /var/aegir/hostmaster/profiles/hostmaster/modules/aegir/hosting_tasks_extra/fix_permissions/scripts/install.sh
sudo bash /var/aegir/hostmaster/profiles/hostmaster/modules/aegir/hosting_tasks_extra/fix_ownership/scripts/install.sh

6) No need to run 'drush hostmaster-install', but if this were a new install, it would be done here (and requires lots of arguments)

7) Migrate hostmaster to the new platform

sudo -i -u aegir
drush @hostmaster sqlq "truncate hosting_task_log" # optional
drush @hostmaster updb -y  # optional, make sure there are no pending upgrades
drush @hostmaster hostmaster-migrate https://aegir.example.org /var/aegir/hostmaster --working-copy

(I'm not sure why 'working-copy' is used here)

8) Verify that the migration worked, it should display /var/aegir/hostmaster

drush @hostmaster status | grep root

8) Hosting-queued (optional)

sudo wget https://raw.githubusercontent.com/coopsymbiotic/coopsymbiotic-ansible/master/roles/aegir/templates/etc/systemd/system/hosting-queued.service -O /etc/systemd/system/hosting-queued.service
sudo systemctl daemon-reload
sudo systemctl enable hosting-queued
sudo systemctl restart hosting-queued
bgm’s picture

Title: Debian PGP key has expired (again) » Debian PGP key has expired - Debian packages are no longer supported
SocialNicheGuru’s picture

does this work with nginx servers too or just apache2?

bgm’s picture

It should work for both. I only tested nginx.

SocialNicheGuru’s picture

Wow! That works like a charm.

Thank you.

SocialNicheGuru’s picture

Status: Active » Needs work

Is there an updated provision module?

I cannot create a Drupal 9 platform. I get the following:

Unable to include file packages9inc or packagesinc from !path.	
-
error
Unable to include the drupal engine packages from /var/aegir/.drush/provision/platform/drupal.	
-
error
Drush command terminated abnormally due to an unrecoverable error. Error: U... (Expand)	
-
error
The external command could not be executed due to an application error.

In /var/aegir/.drush/provision/platform/drupal, there is no provision9.inc file

clear_6.inc
clear_7.inc
clear_8.inc
cron_key_7.inc
cron_key_8.inc
cron_key.inc
deploy_7.inc
deploy_8.inc
deploy.inc
import_6.inc
import_7.inc
import_8.inc
install_6.inc
install_7.inc
install_8.inc
install.inc
packages_6.inc
packages_7.inc
packages_8.inc
README.md
verify.inc
SocialNicheGuru’s picture

Ahhh, It worked when I changed the directory for provision which includes the needed files

git clone https://git.drupalcode.org/project/provision.git

SocialNicheGuru’s picture

Not sure what the next step is for this?
Should it be a help page on Drupal.org and/or on aegir project website?

bgm’s picture

Thanks for testing! I updated the instructions to use the correct provision git repo, and also fixed the "git clone" for drush itself, so that it only checks out the specific branch (makes no difference functionally, but it takes 33 MB disk space instead of 200 MB).

Next step would be to document in the Aegir docs here: https://docs.aegirproject.org/install/upgrade/

For me there are still a few unknowns on future maintenance. For manual (or git-based) installs, the docs are not very detailed.

I guess drush/provision are simple because they are git repos, but the hostmaster platform is a bit more of a pain to manage because it's built with "drush make"? People would have to "drush make" a new platform, and then run hostmaster-migrate, or maybe do a yolo upgrade of the platform itself (I usually test upgrades elsewhere, commit the platform to a mono git repo, then just "git pull" everywhere).

SocialNicheGuru’s picture

I am using Mariadb and it fails with unknown variable set-gtid-purged=OFF, which is not available above Mariadb 5.5.

Could not write database backup file mysqldump (command: mysqldump [error]
--defaults-file=/dev/fd/3 --set-gtid-purged=OFF --single-transaction --quick --no-autocommit
dbase
) (error: mysqldump: unknown variable
'set-gtid-purged=OFF'
)
Could not generate database backup from mysqldump. (error: mysqldump: [error]
unknown variable 'set-gtid-purged=OFF'
)

SocialNicheGuru’s picture

Is there a packages10inc file that would allow us to install Drupal 10 sites?

bgm’s picture

@SocialNicheGuru: I think those last two comments/issues are not directly linked to the issue here (git install/upgrade), but issues with provision. For what it's worth, I'm on MariaDB 10.5 and did not notice any issues. I haven't used D10 yet.

SocialNicheGuru’s picture

@bgm. I think you might be correct.

It was just during a migration.

One went without an issue.

The other had those two come up.

I am just noting them and will move to other issues.

SocialNicheGuru’s picture

How do I do hostmater install

At Step 6. I did drush hostmaster-install which seemed to work.
But it did not use the copy of hostmaster from step 4.
Instead it created it's own hostmaster-7.x-3.x directory.

SocialNicheGuru’s picture

Title: Debian PGP key has expired - Debian packages are no longer supported » Instructions to install Aegir from git since Debian PGP key has expired - Debian packages are no longer supported

Installing from git repository is the recommended way moving forward.

fenstrat’s picture

FileSize
1.29 KB

@bgm thanks very much for the details in #6. Using that I've successfully migrated from /var/aegir/hostmaster-7.x-3.192 to /var/aegir/hostmaster

Attached is the patch I used for hostmaster that bumps the contrib modules up to their latest stable versions. Note that building hostmaster with drush make already bumps core to the latest stable (7.98).

To apply the patch, before running drush make edit /var/aegir/.drush/provision/aegir.make to get it to apply the patch:

diff --git a/aegir.make b/aegir.make
index d1357cc8..75d2c18f 100644
--- a/aegir.make
+++ b/aegir.make
@@ -7,4 +7,5 @@ projects[hostmaster][type] = "profile"
 projects[hostmaster][download][type] = "git"
 projects[hostmaster][download][url] = "http://git.drupal.org/project/hostmaster.git"
 projects[hostmaster][download][branch] = "7.x-3.x"
+projects[hostmaster][patch][3317637] = "https://www.drupal.org/files/issues/2023-08-11/3317637-21.patch"

Running drush make /var/aegir/.drush/provision/aegir.make /var/aegir/hostmaster will then use the latest contrib modules.

Next step for me is to bump from PHP 7.4 to PHP 8.2. I'll report back if there's any issues.

Francewhoa’s picture

Steven Jones’s picture

@fenstrat did you make it to PHP 8.2?

fenstrat’s picture

@Steven Jones yes I did, everything mostly worked from memory. Needed a couple additional patches, some of which you've committed, thanks!

More to the point though Aegir 3 seems pretty much at a dead end, as you well know. Especially when I was looking at this ~ 6 months ago. As we needed Drupal 10 support we've had to migrate off Aegir. Thankfully replacing its platform migration (the essential bit of Aegir for us) with custom code that did what we needed was relatively straight forward.

bgm’s picture

I kind of have D10 and PHP 8.2 working on Aegir, if anyone's interested. I'm not sure if it will be useful to many people though. I basically started from the omega8 provision fork, but then removed a lot of things I didn't use and were causing issues, and replaced drush PHP calls by shell calls (which is what I do for WordPress support, and what I think provision4 did). That way multiple drush versions can co-exist on the system. It breaks a lot of Aegir things though. Install and backup works, limited testing for clone/migrate, and I still have an annoying issue with 'verify' wiping out some settings. I hope to fix the verify bug and post a blog post in 2-3 weeks.