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

Install PHP 7.1 #91

Merged
merged 2 commits into from
Feb 8, 2019
Merged

Install PHP 7.1 #91

merged 2 commits into from
Feb 8, 2019

Conversation

whikloj
Copy link
Member

@whikloj whikloj commented Feb 5, 2019

Resolves: Islandora/documentation#1007

Based on @kayakr's work in that issue

I tried to get a single location to add/edit the php_version but it keep missing it and defaulting to PHP 7.2.

If anyone has a suggestion please let me know, but Ansible variables are the stuff of nightmares.

I have tested it in Ubuntu and Centos and it seems to work.

Once this is confirmed we should also update the composer.lock files for the Crayfish microservices and Crayfish-Commons as well.

Copy link
Contributor

@kayakr kayakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASK [geerlingguy.php-versions : Purge PHP version packages.] ******************
Wednesday 06 February 2019  12:48:24 +1300 (0:00:00.064)       0:01:33.984 **** 
fatal: [default]: FAILED! => {"msg": "The conditional check ''php' + php_version not in item' failed. The error was: Unexpected templating type error occurred on ({% if 'php' + php_version not in item %} True {% else %} False {% endif %}): can only concatenate str (not \"float\") to str\n\nThe error appears to have been in '/Users/jonathan/Documents/CatalystIT/vagrant-claw-playbook-catalyst4/roles/external/geerlingguy.php-versions/tasks/setup-Debian.yml': line 44, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# PHP package purges.\n- name: Purge PHP version packages.\n  ^ here\n"}

I wrapped the vars php_version in quotes:

diff --git a/crayfish.yml b/crayfish.yml
index f2f2b16..d66d743 100644
--- a/crayfish.yml
+++ b/crayfish.yml
@@ -4,7 +4,7 @@
   become: yes
 
   vars:
-    php_version: 7.1
+    php_version: "7.1"
 
   roles:
     - name: geerlingguy.repo-remi
diff --git a/webserver.yml b/webserver.yml
index bfae8f3..50be975 100644
--- a/webserver.yml
+++ b/webserver.yml
@@ -4,7 +4,7 @@
   become: yes
 
   vars:
-    php_version: 7.1
+    php_version: "7.1"
 
   roles:
     - name: geerlingguy.repo-remi

and re-provisioned ok (took two rounds to be successful).

Now http://localhost:8000/admin/reports/status reports "PHP
7.1.26-1+ubuntu16.04.1+deb.sury.org+1"

@whikloj
Copy link
Member Author

whikloj commented Feb 6, 2019

@kayakr not sure why it worked for me, but I'll wrap it.

@kayakr
Copy link
Contributor

kayakr commented Feb 8, 2019

fwiw, this works fine for me.

@dannylamb
Copy link
Member

I can confirm Ubuntu is good to go. Testing CENTOS now.

@dannylamb
Copy link
Member

Hrm... oddly, changing ISLANDORA_DISTRO in the Vagrantfile to centos/7 fails and running vagrant up fails, but $ ISLANDORA_DISTRO="centos/7" vagrant up works just fine. Anyway, serves me right not to read the README when trying Centos (I prefer Ubuntu).

Anyway, from Cent:

daniel@daniel-Latitude-3560:~/Code/Environments/claw-playbook$ vagrant ssh
Last login: Fri Feb  8 18:41:08 2019 from 10.0.2.2
[vagrant@claw ~]$ php --version
PHP 7.1.26 (cli) (built: Jan  9 2019 08:02:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Copy link
Member

@dannylamb dannylamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@dannylamb dannylamb merged commit 45a2ba5 into Islandora-Devops:master Feb 8, 2019
@whikloj whikloj deleted the issue-1007 branch February 8, 2019 18:43
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

Successfully merging this pull request may close these issues.

3 participants