Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed to install Drupal 10 #269

Closed
RodBruce opened this issue Nov 9, 2023 · 22 comments
Closed

Changes needed to install Drupal 10 #269

RodBruce opened this issue Nov 9, 2023 · 22 comments
Assignees

Comments

@RodBruce
Copy link

RodBruce commented Nov 9, 2023

I had to make a few changes in order to get the playbook to do a clean install of Drupal 10:

  1. Update: vars/starter.yml to use a newer version of the Starter Site:
diff ~/tmp/islandora-playbook/vars/starter.yml vars/starter.yml
8c8
< drupal_composer_project_package: 'islandora/islandora-starter-site:~0.7'
---
> drupal_composer_project_package: 'islandora/islandora-starter-site:~1.2'
  1. The way Drush gets installed and used with Drupal 10 is different. We no longer need the geerlingguy.drush role in requirements.yml
diff ~/tmp/islandora-playbook/requirements.yml requirements.yml
39,42d38
< 
< - src: geerlingguy.drush
<   version: 3.1.1
< 

and we no longer need to include it in webserver.yml

diff ~/tmp/islandora-playbook/webserver.yml webserver.yml
24,25d23
<     - name: geerlingguy.drush  # Include drush as drupal-openseadragon needs it.
<       when: islandora_build_base_box|bool == False
  1. The geerlingguy.drupal role has not been updated for Drupal 10. The version we are loading (4.3.0) is the latest version on the ansible galaxy website (https://galaxy.ansible.com/ui/standalone/roles/geerlingguy/drupal/). So, after running ansible-galaxy install to pull in the requirements I needed to change the drush version in roles/external/geerlingguy.drupal/defaults/main.yml from 10.1 to 12.
diff ~/tmp/islandora-playbook/roles/external/geerlingguy.drupal/defaults/main.yml roles/external/geerlingguy.drupal/defaults/main.yml 
28c28
<   - "drush/drush:^10.1"
---
>   - "drush/drush:^12"

Would it make sense to fork that role, update it and move it to an internal role until it is updated on the galaxy site?

Thanks

@rosiel rosiel self-assigned this Nov 15, 2023
@whikloj
Copy link
Member

whikloj commented Nov 15, 2023

Another option is to make a PR against, the Geerlingguy repo. https://github.com/geerlingguy/ansible-role-drupal 🤷

@BrzIGH
Copy link

BrzIGH commented Dec 18, 2023

Hi folks,

I just ran the ansible playbook on a new instance. It still installs Drupal 9.

Is there an ETA when the playbook will install Drupal 10 ?

Thanks a lot for the playbook....great job !

@rosiel
Copy link
Contributor

rosiel commented Dec 19, 2023

Ah, bit again by the tilde operator!
All you have to do is change this line to drupal_composer_project_package: 'islandora/islandora-starter-site:^1.2'

Or, run starter_dev which will get you the latest starter site.

@BrzIGH
Copy link

BrzIGH commented Dec 19, 2023

Ah, bit again by the tilde operator! All you have to do is change this line to drupal_composer_project_package: 'islandora/islandora-starter-site:^1.2'

Or, run starter_dev which will get you the latest starter site.

Tried it and got this error when running
......inventory/production playbook.yml -e "islandora_distro=ubuntu/jammy64" -e "islandora_profile=starter" -e "islandora_build_base_box=false"

Error..

TASK [geerlingguy.drupal : Install dependencies with composer require (this may take a while).] *****************************************************************************************
Tuesday 19 December 2023 10:51:22 -0800 (0:00:00.032) 0:00:12.971 ******
failed: [default] (item=drush/drush:^10.1) => {"ansible_loop_var": "item", "changed": false, "item": "drush/drush:^10.1", "msg": "./composer.json has been updated Running composer update drush/drush Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.", "stdout": "./composer.json has been updated\nRunning composer update drush/drush\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n Problem 1\n - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev].\n\nUse the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.\n\nInstallation failed, reverting ./composer.json and ./composer.lock to their original content.\n", "stdout_lines": ["./composer.json has been updated", "Running composer update drush/drush", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", " Problem 1", " - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", " - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", " - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev].", "", "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.", "", "Installation failed, reverting ./composer.json and ./composer.lock to their original content."]}

@RodBruce
Copy link
Author

@BrzIGH
Make the changes to the playbook that I identify in my initial comment #269 (comment) to get the correct version of drush.

@BrzIGH
Copy link

BrzIGH commented Dec 20, 2023

Thanks. 10.5 running now...
Do you think the 10.5 build is production-worthy ?

Thanks

@BrzIGH
Copy link

BrzIGH commented Jan 8, 2024

Just a quick comment:
At the end of December I was successfully running the playbook for both Drupal 9 and Drupal 10.

However, in the New Year both playbook scripts fail... I posted a bug note on the Islandora issue queue Islandora/documentation#2277

Hope this helps...

Thanks

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

I just tried again and got the same error even after the latest merge:

TASK [geerlingguy.drupal : Move Drupal project files to drupal_composer_install_dir (this may take a while).] ***************************************************************************
Friday 19 January 2024 10:30:49 -0800 (0:00:00.273) 0:00:28.835 ********
changed: [default]

TASK [geerlingguy.drupal : Install dependencies with composer require (this may take a while).] *****************************************************************************************
Friday 19 January 2024 10:30:54 -0800 (0:00:04.593) 0:00:33.429 ********
failed: [default] (item=drush/drush:^10.1) => {"ansible_loop_var": "item", "changed": false, "item": "drush/drush:^10.1", "msg": "./composer.json has been updated Running composer update drush/drush Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.", "stdout": "./composer.json has been updated\nRunning composer update drush/drush\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n Problem 1\n - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev].\n\nUse the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.\n\nInstallation failed, reverting ./composer.json and ./composer.lock to their original content.\n", "stdout_lines": ["./composer.json has been updated", "Running composer update drush/drush", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", " Problem 1", " - drush/drush[10.1.0, ..., 10.3.1] require chi-teck/drupal-code-generator ^1.30.5 -> found chi-teck/drupal-code-generator[1.30.5, ..., 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", " - drush/drush[10.3.2, ..., 10.x-dev] require chi-teck/drupal-code-generator ^1.32.1 -> found chi-teck/drupal-code-generator[1.32.1, 1.33.0, 1.33.1, 1.x-dev] but the package is fixed to 3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", " - Root composer.json requires drush/drush ^10.1 -> satisfiable by drush/drush[10.1.0, ..., 10.x-dev].", "", "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.", "", "Installation failed, reverting ./composer.json and ./composer.lock to their original content."]}

I have a basic Server 22.04 image snapshot to which I revert and then redo all the tasks (playbook download etc.)... I am not doing anything different from what I did before Christmas...

Any ideas why I am unable to get this to work any more ?

Thanks

@rosiel
Copy link
Contributor

rosiel commented Jan 19, 2024

Can you please confirm

  • which commit of the playbook you're on, using git log in your playbook directory and selecting the message at the top.
  • since you're installing using the remote deployment method, when you run the long ansible-playbook command, what do you pass it as islandora_profile?
  • if the answer to the above is starter then in vars/starter.yml, what is the value of drupal_composer_project_package?
  • if the islandora_profile is not starter then what is in vars/[your-profile].yml?

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

git clone https://github.com/Islandora-Devops/islandora-playbook
"islandora_profile=starter"
^1.2

Hope this helps...

@rosiel
Copy link
Contributor

rosiel commented Jan 19, 2024

which commit of the playbook you're on, using git log in your playbook directory and selecting the message at the top.

The reason for this is that I want to make absolutely sure that the commit in your working directory is the latest commit. You did a git pull since the time of the latest merge, right? That will bring in the new changes to the folder that you've been using.

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

Yes, I did it this morning...

@rosiel
Copy link
Contributor

rosiel commented Jan 19, 2024

Then can you please disclose which commit of the playbook you are on so that we can continue to troubleshoot?

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

Sorry...how do I get that info ?

@rosiel
Copy link
Contributor

rosiel commented Jan 19, 2024

As I said in a previous message, the command git log will display a list of the latest commits. The most recent (the one we want) is at the top.

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

innopac@isl8:~/islandora-playbook$ git log
commit d4002ac (HEAD -> dev, origin/dev, origin/HEAD)
Author: Brian Gregg bdgregg@pitt.edu
Date: Fri Jan 19 11:35:27 2024 -0500

Issue-268: Changes needed to allow RHEL based builds via Islandora-playbook #268 (#273)

commit eaf133e
Author: Rosie Le Faive lefaive@gmail.com
Date: Thu Jan 18 13:37:10 2024 -0400

Add ansible_user and don't separately install drush. (#271)

commit 3b9d1c5
Author: Rosie Le Faive lefaive@gmail.com
Date: Wed Dec 20 16:54:50 2023 -0500

Update to modern starter site and use caret operator. (#270)

commit 1d4d76a (tag: 2.1.0)
Author: Jared Whiklo jwhiklo@gmail.com
Date: Mon Jul 10 12:03:26 2023 -0500

Upgrade 5.4 symfony and separate EntityMapper (#263)

* Changes for Crayfish changes

* Last changes for Milliner

* Switch back to main branch

* Update Crayfish branch too

commit 5e6fc18
Author: Rosie Le Faive lefaive@gmail.com
:

@rosiel
Copy link
Contributor

rosiel commented Jan 19, 2024

Hmm, I am baffled.

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

I deleted the inventory/vagrant folder as I presume the inventory/production folder is the one that is needed... and I do not use vagrant.

Could that be the reason ? Does the playbook need the inventory/vagrant folder ?

@aOelschlager
Copy link

Would the drush version in the geerlingguy.drupal role still need to be changed from 10.1 to 12: https://github.com/geerlingguy/ansible-role-drupal/blob/master/defaults/main.yml#L28
Is that possibly why the error is still happening?

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

I am showing "^10.1"

in ...roles/external/geerlingguy.drupal/defaults

@aOelschlager
Copy link

aOelschlager commented Jan 19, 2024

I would try changing that to "^12" and see if that fixes the error.

@BrzIGH
Copy link

BrzIGH commented Jan 19, 2024

We have success !

image

Thanks Annie...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants