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 20, 2018

also see previous #184

Note that the box file doesn't contain all required PHP modules for now, we use this box for building those in our CI. We will be gradually adding the required modules as soon as we've compiled and tested them for the new version.

Looks like:

vdloo@workstation4:~/code/projects/hypernode-vagrant/vagrant/plugins/vagrant-hypconfigmgmt$ make install
find pkg/ -name '*.gem' | sort -V | tail -n 1 | xargs vagrant plugin install
Installing the 'pkg/vagrant-hypconfigmgmt-0.0.11.gem' plugin. This can take a few minutes...
Successfully uninstalled vagrant-hypconfigmgmt-0.0.10
Installed the plugin 'vagrant-hypconfigmgmt (0.0.11)'!
(hypernode-control) vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant destroy -f && vagrant box update
==> hypernode: Forcing shutdown of container...
...
    hypernode: Downloading: http://vagrant.hypernode.com/customer/xenial/hypernode_xenial.lxc.release-5485.box
...
vdloo@workstation4:~/code/projects/hypernode-vagrant$ grep php local.yml -A1
php:
  version: 7.2
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant up
Bringing machine 'hypernode' up with 'lxc' provider...
==> hypernode: 'Tip: run "vagrant plugin install vagrant-gatling-rsync" to speed up 
==> hypernode: shared folder operations.
==> hypernode: You can then sync with "vagrant gatling-rsync-auto"
==> hypernode: instead of "vagrant rsync-auto" to increase performance
==> hypernode: Importing base box 'hypernode_xenial'...
==> hypernode: Checking if box 'hypernode_xenial' is up to date...
==> hypernode: Setting up mount entries for shared folders...
    hypernode: /vagrant => /home/vdloo/code/projects/hypernode-vagrant
==> hypernode: Starting container...
==> hypernode: Waiting for machine to boot. This may take a few minutes...
    hypernode: SSH address: 10.0.3.238:22
    hypernode: SSH username: vagrant
    hypernode: SSH auth method: private key
    hypernode: 
    hypernode: Vagrant insecure key detected. Vagrant will automatically replace
    hypernode: this with a newly generated keypair for better security.
    hypernode: 
    hypernode: Inserting generated public key within guest...
    hypernode: Removing insecure key from the guest if it's present...
    hypernode: Key inserted! Disconnecting and reconnecting using new SSH key...
==> hypernode: Machine booted and ready!
==> hypernode: Setting hostname...
==> hypernode: Rsyncing folder: /home/vdloo/code/projects/hypernode-vagrant/data/web/magento2/ => /data/web/magento2
==> hypernode: Rsyncing folder: /home/vdloo/code/projects/hypernode-vagrant/data/web/nginx/ => /data/web/nginx
==> hypernode: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> hypernode: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> hypernode: Running provisioner: shell...
    hypernode: Running: /tmp/vagrant-shell20180720-28405-1x6dcpm.sh
==> hypernode: Synchronizing state of php5.6-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
==> hypernode: Executing /lib/systemd/systemd-sysv-install disable php5.6-fpm
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php5.6-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php5.6-fpm' overrides LSB defaults (0 1 6).
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php5.6-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php5.6-fpm' overrides LSB defaults (0 1 6).
==> hypernode: Synchronizing state of php7.1-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
==> hypernode: Executing /lib/systemd/systemd-sysv-install disable php7.1-fpm
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php7.1-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php7.1-fpm' overrides LSB defaults (0 1 6).
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php7.1-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php7.1-fpm' overrides LSB defaults (0 1 6).
==> hypernode: Synchronizing state of php5.5-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
==> hypernode: Executing /lib/systemd/systemd-sysv-install disable php5.5-fpm
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php5.5-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php5.5-fpm' overrides LSB defaults (0 1 6).
==> hypernode: Synchronizing state of php7.0-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
==> hypernode: Executing /lib/systemd/systemd-sysv-install disable php7.0-fpm
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php7.0-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php7.0-fpm' overrides LSB defaults (0 1 6).
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php7.0-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php7.0-fpm' overrides LSB defaults (0 1 6).
==> hypernode: update-alternatives: using /usr/bin/php7.2 to provide /usr/bin/php (php) in manual mode
==> hypernode: Synchronizing state of php7.2-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
==> hypernode: Executing /lib/systemd/systemd-sysv-install enable php7.2-fpm
==> hypernode: insserv: warning: current start runlevel(s) (empty) of script `php7.2-fpm' overrides LSB defaults (2 3 4 5).
==> hypernode: insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `php7.2-fpm' overrides LSB defaults (0 1 6).
==> hypernode: VCL compiled.
==> hypernode: VCL 'nocache' now active
==> hypernode: Ensuring memory management is disabled
==> hypernode: Your hypernode-vagrant is ready! Log in with:
==> hypernode: ssh [email protected] -oStrictHostKeyChecking=no -A
==> hypernode: Or visit http://projects.hypernode.local in your browser
vdloo@workstation4:~/code/projects/hypernode-vagrant$ vagrant ssh
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-130-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
                                              _
  /\  /\_   _ _ __   ___ _ __ _ __   ___   __| | ___
 / /_/ / | | | '_ \ / _ \ '__| '_ \ / _ \ / _` |/ _ \
/ __  /| |_| | |_) |  __/ |  | | | | (_) | (_| |  __/
\/ /_/  \__, | .__/ \___|_|  |_| |_|\___/ \__,_|\___|
        |___/|_|

Host/IP:    xxxxx-dummytag-vagrant.nodes.hypernode.io (10.0.3.238)
Account_id: 666
Release:    release-5485-5-gc86ebfe @ 2018-07-20 08:58:18 UTC

Handy commands (more at http://support.hypernode.com):

 livefpm (see live PHP status)
 tal | pnl (follow live requests)

 hypernode-importer (import a Magento shop)
 hypernode-image-optimizer (reduce image size)
 hypernode-ftp (manage FTP accounts)

 magerun list (many useful extensions)

------------------------------------------------------------------------------
Last login: Tue Feb 14 14:44:18 2017 from 10.0.3.1
vagrant@beb7b8-projects-magweb-vgr:~$ sudo su
root@beb7b8-projects-magweb-vgr /home/vagrant # php -v
PHP 7.2.7-2 (cli) (built: Jul 16 2018 17:43:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.7-2, Copyright (c) 1999-2018, by Zend Technologies
root@beb7b8-projects-magweb-vgr /home/vagrant # ps aux | grep php
root      1692  0.0  1.0 501700 22204 ?        Ss   09:49   0:00 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
www-data  1693  0.0  0.4 501700  9288 ?        S    09:49   0:00 php-fpm: pool www
www-data  1694  0.0  0.4 501700  9292 ?        S    09:49   0:00 php-fpm: pool www
root      1868  0.0  0.0  20664   916 pts/4    S+   09:50   0:00 grep php
root@beb7b8-projects-magweb-vgr /home/vagrant # systemctl status php7.2-fpm
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/php7.2-fpm.service.d
           └─override.conf
   Active: active (running) since Fri 2018-07-20 09:49:50 UTC; 1min 1s ago
     Docs: man:php-fpm7.2(8)
 Main PID: 1692 (php-fpm7.2)
   Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
   CGroup: /limited.slice/php7.2-fpm.service
           ├─1692 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)                      
           ├─1693 php-fpm: pool www                                                            
           └─1694 php-fpm: pool www                                                            

Jul 20 09:49:49 beb7b8-projects-magweb-vgr systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
root@beb7b8-projects-magweb-vgr /home/vagrant # 

vdloo added 3 commits July 20, 2018 11:35
also see previous #184

Note that the box file doesn't contain all required PHP modules for now, we use this box for building those in our CI. We will be gradually adding the required modules as soon as we've compiled and tested them for the new version.
fixes
```
Failures:
  1) VagrantHypconfigmgmt::Command#get_options_string when the options are floats it casts the floats to strings and returns them separated by 'or'
     Failure/Error: expect( subject.get_options_string([5.5, 5.6, 7.0, 7.1]) ).to eq("5.5 or 5.6 or 7.0 or 7.1 or 7.2")

       expected: "5.5 or 5.6 or 7.0 or 7.1 or 7.2"
            got: "5.5 or 5.6 or 7.0 or 7.1"

       (compared using ==)
     # ./spec/unit/command/get_options_string_spec.rb:37:in `block (4 levels) in <top (required)>'
Finished in 0.13202 seconds (files took 0.27398 seconds to load)
98 examples, 1 failure
```
fixes:
```
FAIL: test_parse_start_runner_arguments_errors_when_php72_and_precise (tests.unit.hypernode_vagrant_runner.commands.test_parse_start_runner_arguments.TestParseStartRunnerArguments)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/ByteInternet/hypernode-vagrant/tools/hypernode-vagrant-runner/tests/unit/hypernode_vagrant_runner/commands/test_parse_start_runner_arguments.py", line 173, in test_parse_start_runner_arguments_errors_when_php72_and_precise
    self.argument_parser.return_value.error.assert_called_once_with(ANY)
  File "/home/travis/build/ByteInternet/hypernode-vagrant/tools/hypernode-vagrant-runner/venv/local/lib/python2.7/site-packages/mock/mock.py", line 947, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'error' to be called once. Called 0 times.
```
Copy link

@farzadghanei farzadghanei left a comment

Choose a reason for hiding this comment

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

I think 😉

@vdloo vdloo merged commit edd8ebc into master Jul 23, 2018
@vdloo vdloo deleted the add-php72-to-hypernode-vagrant branch July 23, 2018 08:15
@vdloo
Copy link
Member Author

vdloo commented Jul 23, 2018

hypernode-vagrant/vagrant/plugins/vagrant-hypconfigmgmt/pkg$ gem push vagrant-hypconfigmgmt-0.0.11.gem
Pushing gem to https://rubygems.org...
Successfully registered gem: vagrant-hypconfigmgmt (0.0.11)

https://rubygems.org/gems/vagrant-hypconfigmgmt/versions/0.0.11

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