When trying to reinstall CiviCRM on my local fundraising-dev stack via setup.sh this week I've run into a few issues preventing the setup from completing.
I'm using the following checkouts:
fundraising-dev - https://gerrit.wikimedia.org/r/c/releng/dev-images/+/664919
dev-images: https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/dev/+/673094 (images pulled from dockerhub for all except civiproxy)
As of writing this post, I've managed to fix 2/3 issues encountered and skip the third as described below but the long-term fixes will probably require other work to automate IF these issues are experienced by others when attempting to reinstall. I've combined the steps in short term fixes for issues one & two to avoid folks have to reattempt the install more than once.
Issues
- Setup exits prematurely due to sendmail missing (fixed below)
- Setup exits prematurely asking me "Who I am?" (fixed below)
- Setup exits prematurely failing to install dmaster civicrm instance due to missing dependencies. (skipped below)
Fixes
Short-term fixes:
- docker-compose exec -u root civicrm bash and run
- apt update && apt install sendmail (fixes issue one)
- addgroup --gid=1000 docker and useradd --home-dir /docker --create-home --uid 1000 --gid 1000 docker look in .env for your specific uid/gid (fixes issue two)
- run sudo rm -r src/civi-sites/ from fundraising-dev project root. This is needed because setup.sh can't reinstall over the existing files due to perms issues from to the failed earlier attempt.
- skip the 'dmaster' install by commenting out lines 542-543 of setup.sh (skips issues three)
- rerun setup.sh and make sure to not remove existing containers
Long-term fixes:
- Add sendmail to the civicrm image dockerfile
- Create a real local user for associated uid that docker exec uses to issue commands to the containers during build steps. We could add this during setup.sh and add a separate utility script for one-off uses in the event of containers being destroyed.
- Figure out why the extract_url behaviour relating to the dmaster install is missing dependencies
Notes:
- the dmaster setup isn't a requirement to work on the email preferences tasks so I've skipped that for now due to spending enough time on the other stuff but I am conscious @Eileenmcnaughton needs that so we do need to fix it!
- I'm not sure what email drupal is trying to send during the install triggering the sendmail failure
- The drupal install is taking way longer than usual. Normally the bottleneck for our install is when we enable the modules specifically wmf_civicrm which usually takes around 4 minutes to complete which is now taking ~7 minutes to complete. However now just installing drupal seems to be taking around 2m30s before we get to enabling the modules taking the total install/enable time to just under 10 minutes! Have we recently changed something in our buildkit recipe around this?