Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Break all the things! #609

Closed
5 of 6 tasks
geerlingguy opened this issue May 12, 2016 · 17 comments
Closed
5 of 6 tasks

Break all the things! #609

geerlingguy opened this issue May 12, 2016 · 17 comments
Milestone

Comments

@geerlingguy
Copy link
Owner

geerlingguy commented May 12, 2016

Here are some things I'm going to do now that I'm committing to dropping some cruft and updating all the things—especially since 2.5.1 locks in role dependencies at specific versions:

  • Switch all out-of-the-box defaults to assume PHP 7.0
  • Drop all extensions that don't work with PHP 7.0 (or mark them 'experimental' until they do)
  • Switch default OS to Ubuntu 16.04 LTS
  • Remove any support / visible sign of PHP < 5.5
  • Work on some of the other things that will help with local.config.yml etc.
  • ??? (TBD)
@geerlingguy
Copy link
Owner Author

I'm running through all the different addons to see what I can get working easily, what is partially-broken, and what just plain won't install. Surprisingly, 16.04 includes a working Memcached PHP extension!

@geerlingguy
Copy link
Owner Author

And php-redis. Nice! http://packages.ubuntu.com/xenial/php/php-redis

@geerlingguy
Copy link
Owner Author

Xdebug works with no changes required.

@geerlingguy
Copy link
Owner Author

Working on XHProf here: geerlingguy/ansible-role-php-xhprof#14

@chumkui
Copy link

chumkui commented May 12, 2016

Have you already made changes re the PHP role then? I have been building fine and suddenly today I get this:

==> dpsubsvm: TASK [geerlingguy.php : Ensure PHP packages are installed.] ********************
==> dpsubsvm: failed: [localhost](item=[u'php7.0-common', u'php7.0-cli', u'php7.0-dev', u'php7.0-fpm', u'libpcre3-dev',
u'php7.0-gd', u'php7.0-curl', u'php7.0-imap', u'php7.0-json', u'php7.0-opcache', u'php7.0-xml', u'php7.0-mbstring', u'p
hp7.0-apcu']) => {"failed": true, "item": ["php7.0-common", "php7.0-cli", "php7.0-dev", "php7.0-fpm", "libpcre3-dev", "p
hp7.0-gd", "php7.0-curl", "php7.0-imap", "php7.0-json", "php7.0-opcache", "php7.0-xml", "php7.0-mbstring", "php7.0-apcu"
], "msg": "No package matching 'php7.0-common' is available"}
==> dpsubsvm: to retry, use: --limit @/vagrant//provisioning/playbook.retry

Running under Windows 8.1 (yes Windows!), latest version of DrupalVM, latest version of Vagrant and VirtualBox (although I don't think it is anything to do with Vagrant or VB)

Problem is, it breaks everything downstream, including my own post provisioning playbook!

I took a look at the geerlingguy.php role and I can see see recent changes, but not proficient enough to work out what I can change to get it to run through (without removing the check) not sure what effect that would have further on.

@chumkui
Copy link

chumkui commented May 12, 2016

Sorry running under PHP5.6 as prod site uses that for the moment.

@oxyc
Copy link
Collaborator

oxyc commented May 12, 2016

To get back the previous versions of the roles you need the last few commits to Drupal VM. So either update drupal vm or just apply these two particular changes if you're in a hurry:
a04c0d0
4534ca8

Then run (note that sudo is not required anymore):
ansible-galaxy install -r provisioning/requirements.yml --force
(edit: I just noticed you were running windows. You will also need this 2 day old change 9749414)

Once you've done that it should work as before for you. And from now on these types of problems will never happen again thanks to those two commits :)

@chumkui
Copy link

chumkui commented May 12, 2016

Mmmm - thanks for that. I am on Windows and therefore the provisioning is being done 'In VM'. I'll update and take a look!

@oxyc
Copy link
Collaborator

oxyc commented May 12, 2016

I just realized! Sorry for my hasty response. I edited my previous comment with a third commit which you need. Probably easiest just to update Drupal VM to the current master and everything should work.

With those 3 commits the following things will happen:

  • The ansible roles will never receive upgrades unless you choose to upgrade your Drupal VM version. So stuff like this cant happen again.
  • When you run vagrant provision all roles will be re-installed.

@chumkui
Copy link

chumkui commented May 12, 2016

Many thanks - I can confirm all is good.

I was a too complacent anyway - I should have kept more of an eye on this from a config management point of view as it affects the team (of 3 of us). Trouble is there are multiple dependencies - the DrupalVM repo, the role repos and also, the Box itself updates.

It is a huge time saver though, so the efforts are much appreciated! It has made our lives much easier as we were managing individual build envs before. Nightmare

My longer term aim is to get this all working natively for HyperV for us Windies, rather than use VirtualBox - now there is a challenge...

Thanks again guys

@oxyc
Copy link
Collaborator

oxyc commented May 12, 2016

Glad you solved it!

Good news it that from now on all versions are locked in. So unless you upgrade Drupal VM things shouldn't break. And once you do upgrade, you will receive the roles locked to that particular Drupal VM version.

@chumkui
Copy link

chumkui commented May 12, 2016

That is good news indeed. You realise just how important these dev envs are when they break. I'll let you know how I get on with HyperV in the future :-)

@geerlingguy
Copy link
Owner Author

My longer term aim is to get this all working natively for HyperV for us Windies, rather than use VirtualBox - now there is a challenge...

This is interesting... please let me know if there's anything I can do to help you work towards this goal, or if you find anything that can make Drupal VM potentially work inside HyperV more easily.

@chumkui
Copy link

chumkui commented May 12, 2016

Will do. I think there are quite a few people that just use Virtual Box because of the effort, but I think it is worth a go. I'll let you know for sure. Thanks for a great project - it works really well for us and I suspect many others as well.

@condor616
Copy link

condor616 commented May 17, 2016

I get the following error after fetched the latest commits:
fatal: [condor616]: FAILED! => {"changed": false, "failed": true, "msg": "No package matching 'php-redis' is available"}

I'm running Drupal VM on my mac.
Have already installed all the requirements (with --force).

Note: I'm still running php 5.6.

Thank you in advance for your help.

@geerlingguy
Copy link
Owner Author

For redis in 5.6, you need to install php5-redis—set php_redis_package: php-redis in config.yml. I'll update the docs.

@condor616
Copy link

condor616 commented May 17, 2016

Thank you for your quick reply.
I've added the php_redis_package: php-redis in my config.yaml file but the issue still exists.

I've also added "php_redis_install_from_source == false" (to meet the condition in #32 here)....not sure this is needed.

Attaching the config.yaml file in case it helps.
config.yml.zip

Thank you

P.S: the error I get is the following

_TASK [geerlingguy.php-redis : Install PhpRedis extension (Debian).] ************
fatal: [condor616]: FAILED! => {"changed": false, "failed": true, "msg": "No package matching 'php-redis' is available"}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @/Users/Marcello/Sites/drupal-vm/provisioning/playbook.retry

PLAY RECAP *********************************************************************
condor616 : ok=160 changed=5 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again._

UPDATE
All issues are solved now. I pulled from upstream and run the provision again.
Thank you so much. Drupal VM is amazing.

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

No branches or pull requests

4 participants