Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Conversation

@vdloo
Copy link
Member

@vdloo vdloo commented Jul 5, 2017

so our buildscripts can build in an PHP56 environment

so our buildscripts can build in an PHP56 environment
@vdloo vdloo force-pushed the add-php56-to-hypernode-vagrant-runner branch from 51f4c07 to 73f9242 Compare July 5, 2017 10:23
@dverkade
Copy link

Hi @vdloo

Great addition, we need this for our projects. Let me know when this has been merged so that we can update our vagrants and start using PHP 5.6

@vdloo
Copy link
Member Author

vdloo commented Jul 10, 2017

Hi @dverkade, I'm waiting for someone internally to review the initial PHP5.6 changes in the playbooks of our private provisioning repository, but everything is lined up and ready to go. I'll keep you updated on when we push a new box with this included. Note that this does not include all php-modules yet, we need this box to build those so it's kind of a chicken-egg thing. To give you some insight in what will be missing in the first release of this box with 5.6 until we re-build and re-release:

modules

I think you need some of those to run Magento, but anyway it's coming. I'll keep you posted.

edit: also happy birthday @dverkade

@vdloo
Copy link
Member Author

vdloo commented Jul 12, 2017

Hi @dverkade, I just deployed box version 4219 which contains the base PHP 5.6 packages. You can switch as root by running hypernode-switch-php 5.6

vdloo@workstation4:~/code/projects/hypernode-vagrant$ export VAGRANT_DEFAULT_PROVIDER=lxc
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant box update
==> hypernode: Successfully added box 'hypernode_xenial' (v4219) for 'lxc'!
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant up
...
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant ssh
vagrant@beb7b8-projects-magweb-vgr:~$ sudo su
root@beb7b8-projects-magweb-vgr /home/vagrant # 
root@beb7b8-projects-magweb-vgr /home/vagrant # hypernode-switch-php --help
usage: hypernode-switch-php [-h] {7.0,5.6,5.5}

Set the PHP version

positional arguments:
  {7.0,5.6,5.5}  The PHP version

optional arguments:

root@beb7b8-projects-magweb-vgr /home/vagrant # hypernode-switch-php 5.6
...
root@beb7b8-projects-magweb-vgr /home/vagrant # curl -s localhost/?info=true | grep "PHP Version" | sed 's/<\/\?[^>]\+>//g' 
PHP Version 5.6.30-12

@dverkade
Copy link

Hi @vdloo

Great! Is it also possible to configure this in de local.yml? With this code snippet?

php:
version: 5.5

@vdloo
Copy link
Member Author

vdloo commented Jul 12, 2017

Yeah, I just pushed the latest vagrant-hypconfigmgmt to rubygems, that's the Vagrant plugin that prompts for the configuration of the box. You also can manually edit the local.yml and specify 5.6 like so:

php:
  version: 5.6

or throw away your local.yml and run 'vagrant up' again to configure the box using the dialogue. You can also just remove the php setting from your local.yml and it will only prompt for the PHP version again.

vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant up
Bringing machine 'hypernode' up with 'lxc' provider...
    hypernode: Is this a Magento 1 or 2 Hypernode? [default 2]: 
==> hypernode: Nginx will be configured for Magento 2. /data/web/magento2/pub will be symlinked to /data/web/public
    hypernode: Is this a PHP 5.5 or 5.6 or 7.0 Hypernode? [default 7.0]: 5.6
==> hypernode: Will boot a box with PHP 5.6 installed
    hypernode: Do you want to enable Varnish? Enter true or false [default false]: 
==> hypernode: Varnish will be disabled by loading a nocache vcl.
    hypernode: What filesystem type do you want to use? Options: nfs_guest, nfs, rsync, virtualbox [default virtualbox]: 
==> hypernode: Virtualbox is the default fs type. If you later want to try a faster fs type like nfs_guest, edit local.yml
==> hypernode: Disabling fs->folders->magento1 in the local.yml because Magento 2 was configured..
    hypernode: Do you want to enable the production-like firewall? Enter true or false [default false]: 
==> hypernode: The firewall will be disabled
    hypernode: Do you want to enable production-like memory management? 
    hypernode: This might be slower but it is more in-line with a real Hypernode. 
    hypernode: Note: for LXC boxes this setting is disabled. 
    hypernode: Enter true or false [default false]: 
==> hypernode: Production-like memory management will be disabled
    hypernode: Do you want to install Xdebug? Enter true or false [default false]: 
==> hypernode: Xdebug will be disabled
    hypernode: What Ubuntu version do you want to use? Options: xenial, precise (deprecated) [default xenial]: 
==> hypernode: Will use the Xenial version. This is the default.
==> hypernode: Your hypernode-vagrant is now configured. Please run "vagrant up" again.
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant up
Bringing machine 'hypernode' up with 'lxc' provider...
==> hypernode: Importing base box 'hypernode_xenial'...
..
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant ssh
vagrant@beb7b8-projects-magweb-vgr:~$ php -v
PHP 5.6.30-12 (cli) 

Example local.yml:

vdloo@workstation4:~/code/projects/hypernode-vagrant$ cat local.yml 
---
fs:
  folders:
    magento2:
      host: data/web/magento2
      guest: "/data/web/magento2"
    nginx:
      host: data/web/nginx/
      guest: "/data/web/nginx/"
  type: virtualbox
  disabled_folders:
    magento1:
      host: data/web/public
      guest: "/data/web/public"
hostmanager:
  extra-aliases:
  - my-custom-store-url1.local
  - my-custom-store-url2.local
  default_domain: hypernode.local
magento:
  version: 2
php:
  version: 5.6
varnish:
  state: false
firewall:
  state: false
cgroup:
  state: false
xdebug:
  state: false
vagrant:
  box: hypernode_xenial
  box_url: http://vagrant.hypernode.com/customer/xenial/catalog.json
ubuntu_version: xenial

@vdloo vdloo merged commit ecca8e2 into master Jul 12, 2017
@vdloo vdloo deleted the add-php56-to-hypernode-vagrant-runner branch July 12, 2017 11:32
vdloo added a commit that referenced this pull request Feb 5, 2018
for reference, see the earlier #158 and #157
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants