Skip to content

Instantly share code, notes, and snippets.

@vdloo
Created January 30, 2018 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdloo/fa0a6f44554c9730b7cfbff3b758725f to your computer and use it in GitHub Desktop.
Save vdloo/fa0a6f44554c9730b7cfbff3b758725f to your computer and use it in GitHub Desktop.
# https://github.com/ByteInternet/hypernode-vagrant/issues/179
#
# The vagrant/provisioning/hypernode.sh shell provisioner script can not finish because of the PrivateDevices=no issue.
# To work around it until we fix that in the box you can comment out the varnish restart and not load the nocache vcl
# in that script but do it manually later.
#
# # remove the restart from hypernode.sh
# sed -i 's/service varnish restart/echo "not (re)starting varnish"/g' vagrant/provisioning/hypernode.sh
#
# 'Enable' varnish in the settings so it does not try to load the nocache vcl
# sed '/varnish/{n;s/false/true/'} local.yml -i
#
# then later in the box run this as the app user:
# $ echo -e 'vcl 4.0;\nbackend default {\n .host = \"127.0.0.1\";\n .port= \"8080\";\n}\nsub vcl_recv {\n return(pass);\n}' > /data/web/disabled_caching.vcl
# $ varnishadm vcl.list | grep -q nocache || varnishadm vcl.load nocache /data/web/disabled_caching.vcl
# Clean Archlinux installation -> root in the lxc Vagrant with 'sudo su':
[root@grid1 ~]# pacman -S screenfetch
resolving dependencies...
looking for conflicting packages...
Packages (31) bc-1.07.1-1 compositeproto-0.4.2-3 dmxproto-2.3.1-3 fixesproto-5.0+9+g4292ec1-1 inputproto-2.3.2-1
kbproto-1.0.7-1 libdmx-1.1.3-1 libx11-1.6.5-1 libxau-1.0.8-2 libxcb-1.12-1 libxcomposite-0.4.4-2
libxdmcp-1.1.2-1 libxext-1.3.3-1 libxfixes-5.0.3-1 libxi-1.7.9-1 libxinerama-1.1.3-2
libxrender-0.9.10-1 libxtst-1.2.3-1 libxxf86dga-1.1.4-1 libxxf86vm-1.1.4-1 recordproto-1.14.2-2
renderproto-0.11.1-3 xcb-proto-1.12-3 xextproto-7.3.0-1 xf86dgaproto-2.1-3 xf86vidmodeproto-2.3.1-3
xineramaproto-1.2.1-3 xorg-xdpyinfo-1.3.2-1 xorg-xprop-1.2.2-1 xproto-7.0.31-1 screenfetch-3.8.0-2
Total Download Size: 4.16 MiB
Total Installed Size: 21.18 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
bc-1.07.1-1-x86_64 83.0 KiB 1186K/s 00:00 [########################################] 100%
xcb-proto-1.12-3-any 101.5 KiB 1691K/s 00:00 [########################################] 100%
xproto-7.0.31-1-any 143.5 KiB 1888K/s 00:00 [########################################] 100%
libxdmcp-1.1.2-1-x86_64 24.9 KiB 0.00B/s 00:00 [########################################] 100%
libxau-1.0.8-2-x86_64 9.5 KiB 0.00B/s 00:00 [########################################] 100%
libxcb-1.12-1-x86_64 970.1 KiB 3.69M/s 00:00 [########################################] 100%
kbproto-1.0.7-1-any 124.8 KiB 6.10M/s 00:00 [########################################] 100%
libx11-1.6.5-1-x86_64 2.0 MiB 7.16M/s 00:00 [########################################] 100%
xextproto-7.3.0-1-any 103.4 KiB 0.00B/s 00:00 [########################################] 100%
libxext-1.3.3-1-x86_64 102.4 KiB 0.00B/s 00:00 [########################################] 100%
inputproto-2.3.2-1-any 77.9 KiB 0.00B/s 00:00 [########################################] 100%
libxi-1.7.9-1-x86_64 145.1 KiB 0.00B/s 00:00 [########################################] 100%
recordproto-1.14.2-2-any 14.6 KiB 0.00B/s 00:00 [########################################] 100%
fixesproto-5.0+9+g4292ec1-1-any 11.8 KiB 0.00B/s 00:00 [########################################] 100%
libxfixes-5.0.3-1-x86_64 12.8 KiB 0.00B/s 00:00 [########################################] 100%
libxtst-1.2.3-1-x86_64 28.2 KiB 0.00B/s 00:00 [########################################] 100%
xf86vidmodeproto-2.3.1-3-any 4.2 KiB 0.00B/s 00:00 [########################################] 100%
libxxf86vm-1.1.4-1-x86_64 14.2 KiB 0.00B/s 00:00 [########################################] 100%
xf86dgaproto-2.1-3-any 5.3 KiB 0.00B/s 00:00 [########################################] 100%
libxxf86dga-1.1.4-1-x86_64 16.1 KiB 0.00B/s 00:00 [########################################] 100%
renderproto-0.11.1-3-any 15.8 KiB 0.00B/s 00:00 [########################################] 100%
libxrender-0.9.10-1-x86_64 24.2 KiB 0.00B/s 00:00 [########################################] 100%
compositeproto-0.4.2-3-any 7.8 KiB 0.00B/s 00:00 [########################################] 100%
libxcomposite-0.4.4-2-x86_64 10.1 KiB 0.00B/s 00:00 [########################################] 100%
xineramaproto-1.2.1-3-any 3.0 KiB 0.00B/s 00:00 [########################################] 100%
libxinerama-1.1.3-2-x86_64 8.5 KiB 0.00B/s 00:00 [########################################] 100%
dmxproto-2.3.1-3-any 3.8 KiB 0.00B/s 00:00 [########################################] 100%
libdmx-1.1.3-1-x86_64 33.4 KiB 0.00B/s 00:00 [########################################] 100%
xorg-xdpyinfo-1.3.2-1-x86_64 14.8 KiB 3.62M/s 00:00 [########################################] 100%
xorg-xprop-1.2.2-1-x86_64 22.3 KiB 0.00B/s 00:00 [########################################] 100%
screenfetch-3.8.0-2-any 46.0 KiB 15.0M/s 00:00 [########################################] 100%
(31/31) checking keys in keyring [########################################] 100%
(31/31) checking package integrity [########################################] 100%
(31/31) loading package files [########################################] 100%
(31/31) checking for file conflicts [########################################] 100%
(31/31) checking available disk space [########################################] 100%
:: Processing package changes...
( 1/31) installing bc [########################################] 100%
( 2/31) installing xcb-proto [########################################] 100%
( 3/31) installing xproto [########################################] 100%
( 4/31) installing libxdmcp [########################################] 100%
( 5/31) installing libxau [########################################] 100%
( 6/31) installing libxcb [########################################] 100%
( 7/31) installing kbproto [########################################] 100%
( 8/31) installing libx11 [########################################] 100%
( 9/31) installing xextproto [########################################] 100%
(10/31) installing libxext [########################################] 100%
(11/31) installing inputproto [########################################] 100%
(12/31) installing libxi [########################################] 100%
(13/31) installing recordproto [########################################] 100%
(14/31) installing fixesproto [########################################] 100%
(15/31) installing libxfixes [########################################] 100%
(16/31) installing libxtst [########################################] 100%
(17/31) installing xf86vidmodeproto [########################################] 100%
(18/31) installing libxxf86vm [########################################] 100%
(19/31) installing xf86dgaproto [########################################] 100%
(20/31) installing libxxf86dga [########################################] 100%
(21/31) installing renderproto [########################################] 100%
(22/31) installing libxrender [########################################] 100%
(23/31) installing compositeproto [########################################] 100%
(24/31) installing libxcomposite [########################################] 100%
(25/31) installing xineramaproto [########################################] 100%
(26/31) installing libxinerama [########################################] 100%
(27/31) installing dmxproto [########################################] 100%
(28/31) installing libdmx [########################################] 100%
(29/31) installing xorg-xdpyinfo [########################################] 100%
(30/31) installing xorg-xprop [########################################] 100%
(31/31) installing screenfetch [########################################] 100%
Optional dependencies for screenfetch
scrot: to take screenshot
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the info directory file...
[root@grid1 ~]# screenfetch
-`
.o+` root@grid1
`ooo/ OS: Arch Linux
`+oooo: Kernel: x86_64 Linux 4.14.15-1-ARCH
`+oooooo: Uptime: 3m
-+oooooo+: Packages: 220
`/:-:++oooo+: Shell: bash 4.4.12
`/++++/+++++++: CPU: QEMU Virtual version 2.5+ @ 2x 4.008GHz
`/++++++++++++++: GPU: cirrusdrmfb
`/+++ooooooooooooo/` RAM: 192MiB / 5074MiB
./ooosssso++osssssso+`
.oossssso-````/ossssss+`
-osssssso. :ssssssso.
:osssssss/ osssso+++.
/ossssssss/ +ssssooo/-
`/ossssso+/:- -:/+osssso+-
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/
[root@grid1 ~]# pacman -S git lxc --needed
warning: git-2.16.1-1 is up to date -- skipping
resolving dependencies...
looking for conflicting packages...
Packages (3) cgmanager-0.41-2 libnih-1.0.3-2 lxc-1:2.1.1-1
Total Download Size: 0.74 MiB
Total Installed Size: 3.15 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
libnih-1.0.3-2-x86_64 137.4 KiB 1963K/s 00:00 [########################################] 100%
cgmanager-0.41-2-x86_64 115.1 KiB 2.81M/s 00:00 [########################################] 100%
lxc-1:2.1.1-1-x86_64 508.8 KiB 4.14M/s 00:00 [########################################] 100%
(3/3) checking keys in keyring [########################################] 100%
(3/3) checking package integrity [########################################] 100%
(3/3) loading package files [########################################] 100%
(3/3) checking for file conflicts [########################################] 100%
(3/3) checking available disk space [########################################] 100%
:: Processing package changes...
(1/3) installing libnih [########################################] 100%
(2/3) installing cgmanager [########################################] 100%
(3/3) installing lxc [########################################] 100%
Optional dependencies for lxc
arch-install-scripts: for archlinux template
dnsmasq: lxc-net.service
lua
lua-filesystem: lxc-top
lua-alt-getopt: lxc-top
:: Running post-transaction hooks...
(1/2) Creating temporary files...
(2/2) Arming ConditionNeedsUpdate...
[root@grid1 ~]# cat << EOF > /etc/default/lxc-net
> # Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your
> # containers. Set to "false" if you'll use virbr0 or another existing
> # bridge, or mavlan to your host's NIC.
> USE_LXC_BRIDGE="true"
>
> # If you change the LXC_BRIDGE to something other than lxcbr0, then
> # you will also need to update your /etc/lxc/default.conf as well as the
> # configuration (/var/lib/lxc/<container>/config) for any containers
> # already created using the default config to reflect the new bridge
> # name.
> # If you have the dnsmasq daemon installed, you'll also have to update
> # /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon.
> LXC_BRIDGE="lxcbr0"
> LXC_ADDR="10.0.3.1"
> LXC_NETMASK="255.255.255.0"
> LXC_NETWORK="10.0.3.0/24"
> LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
> LXC_DHCP_MAX="253"
> # Uncomment the next line if you'd like to use a conf-file for the lxcbr0
> # dnsmasq. For instance, you can use 'dhcp-host=mail1,10.0.3.100' to have
> # container 'mail1' always get ip address 10.0.3.100.
> #LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf
>
> # Uncomment the next line if you want lxcbr0's dnsmasq to resolve the .lxc
> # domain. You can then add "server=/lxc/10.0.3.1' (or your actual $LXC_ADDR)
> # to your system dnsmasq configuration file (normally /etc/dnsmasq.conf,
> # or /etc/NetworkManager/dnsmasq.d/lxc.conf on systems that use NetworkManager).
> # Once these changes are made, restart the lxc-net and network-manager services.
> # 'container1.lxc' will then resolve on your host.
> #LXC_DOMAIN="lxc"
> EOF
[root@grid1 ~]# cat << EOF > /etc/lxc/default.conf
> lxc.net.0.type = veth
> lxc.net.0.link = lxcbr0
> lxc.net.0.flags = up
> lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
> EOF
[root@grid1 ~]# pacman -S dnsmasq
resolving dependencies...
looking for conflicting packages...
Packages (3) libnetfilter_conntrack-1.0.6-1 libnfnetlink-1.0.1-2 dnsmasq-2.78-2
Total Download Size: 0.37 MiB
Total Installed Size: 0.91 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
libnfnetlink-1.0.1-2-x86_64 15.4 KiB 1542K/s 00:00 [########################################] 100%
libnetfilter_conntrack-1.0.6-1-x86_64 43.7 KiB 1458K/s 00:00 [########################################] 100%
dnsmasq-2.78-2-x86_64 318.0 KiB 1916K/s 00:00 [########################################] 100%
(3/3) checking keys in keyring [########################################] 100%
(3/3) checking package integrity [########################################] 100%
(3/3) loading package files [########################################] 100%
(3/3) checking for file conflicts [########################################] 100%
(3/3) checking available disk space [########################################] 100%
:: Processing package changes...
(1/3) installing libnfnetlink [########################################] 100%
(2/3) installing libnetfilter_conntrack [########################################] 100%
(3/3) installing dnsmasq [########################################] 100%
:: Running post-transaction hooks...
(1/2) Updating system user accounts...
(2/2) Arming ConditionNeedsUpdate...
[root@grid1 ~]# systemctl start lxc-net
[root@grid1 ~]# git clone https://github.com/byteinternet/hypernode-vagrant
Cloning into 'hypernode-vagrant'...
remote: Counting objects: 1410, done.
remote: Total 1410 (delta 0), reused 0 (delta 0), pack-reused 1410
Receiving objects: 100% (1410/1410), 1.03 MiB | 1.85 MiB/s, done.
Resolving deltas: 100% (746/746), done.
[root@grid1 ~]# pacman -S vagrant
resolving dependencies...
looking for conflicting packages...
Packages (3) libxml2-2.9.7+4+g72182550-2 libxslt-1.1.32+3+g32c88216-1 vagrant-2.0.2-1
Total Download Size: 9.09 MiB
Total Installed Size: 37.84 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
libxml2-2.9.7+4+g72182550-2-x86_64 1265.4 KiB 4.03M/s 00:00 [########################################] 100%
libxslt-1.1.32+3+g32c88216-1-x86_64 359.2 KiB 10.6M/s 00:00 [########################################] 100%
vagrant-2.0.2-1-x86_64 7.5 MiB 13.2M/s 00:01 [########################################] 100%
(3/3) checking keys in keyring [########################################] 100%
(3/3) checking package integrity [########################################] 100%
(3/3) loading package files [########################################] 100%
(3/3) checking for file conflicts [########################################] 100%
(3/3) checking available disk space [########################################] 100%
:: Processing package changes...
(1/3) installing libxml2 [########################################] 100%
(2/3) installing libxslt [########################################] 100%
(3/3) installing vagrant [########################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@grid1 ~]# vagrant plugin install vagrant-lxc
Installing the 'vagrant-lxc' plugin. This can take a few minutes...
Fetching: vagrant-lxc-1.3.0.gem (100%)
Installed the plugin 'vagrant-lxc (1.3.0)'!
[root@grid1 ~]# cd hypernode-vagrant/
[root@grid1 hypernode-vagrant]# vagrant up
Installing the 'vagrant-hypconfigmgmt --version '0.0.9'' plugin. This can take a few minutes...
Fetching: vagrant-hypconfigmgmt-0.0.9.gem (100%)
Installed the plugin 'vagrant-hypconfigmgmt (0.0.9)'!
Installed the vagrant-hypconfigmgmt plugin.
For the next configuration step, please again run: "vagrant up"
[root@grid1 hypernode-vagrant]# vagrant up
Bringing machine 'default' up with 'lxc' provider...
default: Is this a Magento 1 or 2 Hypernode? [default 2]:
==> default: Nginx will be configured for Magento 2. /data/web/magento2/pub will be symlinked to /data/web/public
default: Is this a PHP 5.5 or 5.6 or 7.0 Hypernode? [default 7.0]:
==> default: Will boot a box with PHP 7.0 installed
default: Do you want to enable Varnish? Enter true or false [default false]:
==> default: Varnish will be disabled by loading a nocache vcl.
default: What filesystem type do you want to use? Options: nfs_guest, nfs, rsync, virtualbox [default virtualbox]:
==> default: Virtualbox is the default fs type. If you later want to try a faster fs type like nfs_guest, edit local.yml
==> default: Disabling fs->folders->magento1 in the local.yml because Magento 2 was configured..
default: Do you want to enable the production-like firewall? Enter true or false [default false]:
==> default: The firewall will be disabled
default: Do you want to enable production-like memory management?
default: This might be slower but it is more in-line with a real Hypernode.
default: Note: for LXC boxes this setting is disabled.
default: Enter true or false [default false]:
==> default: Production-like memory management will be disabled
default: Do you want to install Xdebug? Enter true or false [default false]:
==> default: Xdebug will be disabled
default: What Ubuntu version do you want to use? Options: xenial, precise (deprecated) [default xenial]:
==> default: Will use the Xenial version. This is the default.
==> default: Installing the vagrant-hostmanager plugin.
Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
Fetching: vagrant-hostmanager-1.8.7.gem (100%)
Installed the plugin 'vagrant-hostmanager (1.8.7)'!
==> default: Installing the vagrant-vbguest plugin.
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.15.1.gem (100%)
Installed the plugin 'vagrant-vbguest (0.15.1)'!
==> default: Your hypernode-vagrant is now configured. Please run "vagrant up" again.
[root@grid1 hypernode-vagrant]# vagrant up
Bringing machine 'hypernode' up with 'lxc' provider...
==> hypernode: Box 'hypernode_xenial' could not be found. Attempting to find and install...
hypernode: Box Provider: lxc
hypernode: Box Version: >= 0
==> hypernode: Loading metadata for box 'http://vagrant.hypernode.com/customer/xenial/catalog.json'
hypernode: URL: http://vagrant.hypernode.com/customer/xenial/catalog.json
==> hypernode: Adding box 'hypernode_xenial' (v4832) for provider: lxc
hypernode: Downloading: http://vagrant.hypernode.com/customer/xenial/hypernode_xenial.lxc.release-4832.box
hypernode: Calculating and comparing box checksum...
==> hypernode: Successfully added box 'hypernode_xenial' (v4832) for 'lxc'!
==> hypernode: Importing base box 'hypernode_xenial'...
==> hypernode: Checking if box 'hypernode_xenial' is up to date...
#<Thread:0x000055cef2500ae8@/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
60: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
59: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in `action'
58: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in `call'
57: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/environment.rb:592:in `lock'
56: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:202:in `block in action'
55: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:227:in `action_raw'
54: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
53: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
52: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
51: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
50: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
49: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-hypconfigmgmt-0.0.9/lib/vagrant-hypconfigmgmt/command.rb:62:in `call'
48: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
47: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
46: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
45: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:53:in `call'
44: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
43: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
42: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
41: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
40: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
39: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
38: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
37: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
36: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
35: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.0/lib/vagrant-lxc/action/handle_box_metadata.rb:41:in `call'
34: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
33: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.0/lib/vagrant-lxc/action/create.rb:35:in `call'
32: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
31: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
30: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
29: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
28: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
27: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/box_check_outdated.rb:79:in `call'
26: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
25: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:53:in `call'
24: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
23: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
22: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
21: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
20: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
19: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
18: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
17: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:80:in `call'
16: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
15: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
14: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
13: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-hostmanager-1.8.7/lib/vagrant-hostmanager/action/update_all.rb:27:in `call'
12: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
11: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/env_set.rb:19:in `call'
10: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
9: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:49:in `call'
8: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
7: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.0/lib/vagrant-lxc/action/prepare_nfs_valid_ids.rb:14:in `call'
6: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
5: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
4: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
3: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/synced_folder_cleanup.rb:19:in `call'
2: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/mixin_synced_folders.rb:125:in `synced_folders'
1: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/mixin_synced_folders.rb:125:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/mixin_synced_folders.rb:144:in `block in synced_folders': The synced folder type 'virtualbox' is reporting as unusable for (Vagrant::Errors::SyncedFolderUnusable)
your current setup. Please verify you have all the proper
prerequisites for using this shared folder type and try again.
The synced folder type 'virtualbox' is reporting as unusable for
your current setup. Please verify you have all the proper
prerequisites for using this shared folder type and try again.
[root@grid1 hypernode-vagrant]# sed 's/virtualbox/rsync/g' local.yml -i
[root@grid1 hypernode-vagrant]# rm -Rf .vagrant
[root@grid1 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 => /root/hypernode-vagrant
==> hypernode: Starting container...
==> hypernode: Waiting for machine to boot. This may take a few minutes...
hypernode: SSH address: 10.0.3.133: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: /root/hypernode-vagrant/data/web/magento2/ => /data/web/magento2
==> hypernode: Rsyncing folder: /root/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-shell20180130-1630-1pwv5a6.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 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: update-alternatives: using /usr/bin/php7.0 to provide /usr/bin/php (php) in manual mode
hypernode: Synchronizing state of php7.0-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
hypernode: Executing /lib/systemd/systemd-sysv-install enable 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: Cannot open /var/lib/varnish/6af9cf-root-magweb-vgr/_.vsm: No such file or directory
hypernode: Cannot open /var/lib/varnish/6af9cf-root-magweb-vgr/_.vsm: No such file or directory
#<Thread:0x000055e299cf7138@/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:71 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
62: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
61: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in `action'
60: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:188:in `call'
59: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/environment.rb:592:in `lock'
58: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:202:in `block in action'
57: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:227:in `action_raw'
56: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
55: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
54: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
53: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
52: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
51: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-hypconfigmgmt-0.0.9/lib/vagrant-hypconfigmgmt/command.rb:62:in `call'
50: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
49: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
48: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
47: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:53:in `call'
46: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
45: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
44: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
43: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
42: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
41: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
40: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
39: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
38: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
37: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.0/lib/vagrant-lxc/action/handle_box_metadata.rb:41:in `call'
36: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
35: from /root/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.0/lib/vagrant-lxc/action/create.rb:35:in `call'
34: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
33: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
32: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
31: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
30: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
29: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/box_check_outdated.rb:79:in `call'
28: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
27: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/call.rb:53:in `call'
26: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
25: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
24: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
23: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
22: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
21: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
20: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
19: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:103:in `call'
18: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:103:in `each'
17: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:126:in `block in call'
16: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:126:in `call'
15: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/environment.rb:504:in `hook'
14: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `run'
13: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'
12: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/runner.rb:66:in `block in run'
11: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builder.rb:116:in `call'
10: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:34:in `call'
9: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
8: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/warden.rb:95:in `call'
7: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/provision.rb:138:in `run_provisioner'
6: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:27:in `provision'
5: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:61:in `provision_ssh'
4: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:287:in `with_script_file'
3: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:63:in `block in provision_ssh'
2: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:63:in `tap'
1: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/provisioners/shell/provisioner.rb:89:in `block (2 levels) in provision_ssh'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/communicators/ssh/communicator.rb:257:in `execute': The SSH command responded with a non-zero exit status. Vagrant (Vagrant::Errors::VagrantError)
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
[root@grid1 hypernode-vagrant]# sed -i 's/service varnish restart/echo "not (re)starting varnish"/g' vagrant/provisioning/hypernode.sh
[root@grid1 hypernode-vagrant]# sed '/varnish/{n;s/false/true/'} local.yml -i
[root@grid1 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 => /root/hypernode-vagrant
==> hypernode: Starting container...
==> hypernode: Waiting for machine to boot. This may take a few minutes...
hypernode: SSH address: 10.0.3.186:22
hypernode: SSH username: vagrant
hypernode: SSH auth method: private key
hypernode: Warning: Connection refused. Retrying...
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: /root/hypernode-vagrant/data/web/magento2/ => /data/web/magento2
==> hypernode: Rsyncing folder: /root/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-shell20180130-15812-33e8gr.sh
hypernode: not (re)starting varnish
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 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: update-alternatives: using /usr/bin/php7.0 to provide /usr/bin/php (php) in manual mode
hypernode: Synchronizing state of php7.0-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
hypernode: Executing /lib/systemd/systemd-sysv-install enable 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: Ensuring memory management is disabled
hypernode: Your hypernode-vagrant is ready! Log in with:
hypernode: ssh app@hypernode.local -oStrictHostKeyChecking=no -A
hypernode: Or visit http://root.hypernode.local in your browser
[root@grid1 hypernode-vagrant]# vagrant ssh
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.14.15-1-ARCH x86_64)
* Documentation: https://help.ubuntu.com/
_
/\ /\_ _ _ __ ___ _ __ _ __ ___ __| | ___
/ /_/ / | | | '_ \ / _ \ '__| '_ \ / _ \ / _` |/ _ \
/ __ /| |_| | |_) | __/ | | | | | (_) | (_| | __/
\/ /_/ \__, | .__/ \___|_| |_| |_|\___/ \__,_|\___|
|___/|_|
Host/IP: xxxxx-dummytag-vagrant.nodes.hypernode.io (10.0.3.133)
Account_id: 666
Release: release-4832 @ 2018-01-29 14:08:10 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@6af9cf-root-magweb-vgr:~$ sudo su
root@6af9cf-root-magweb-vgr /home/vagrant # whoami
root
@vdloo
Copy link
Author

vdloo commented Jan 31, 2018

The workaround for the Varnish issue indeed works, but can you also switch to the app user properly? Thats the main issue I've been having on Ubuntu

Switching to the app user also works for me on an lxc box in a clean install.

[root@grid1 ~]# pacman -S dnsmasq git lxc vagrant --needed
warning: git-2.16.1-1 is up to date -- skipping
resolving dependencies...
looking for conflicting packages...

Packages (9) cgmanager-0.41-2  libnetfilter_conntrack-1.0.6-1  libnfnetlink-1.0.1-2  libnih-1.0.3-2
             libxml2-2.9.7+4+g72182550-2  libxslt-1.1.32+3+g32c88216-1  dnsmasq-2.78-2  lxc-1:2.1.1-1
             vagrant-2.0.2-1

Total Download Size:   10.20 MiB
Total Installed Size:  41.90 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 libnfnetlink-1.0.1-2-x86_64             15.4 KiB  1101K/s 00:00 [###################################] 100%
 libnetfilter_conntrack-1.0.6-1-x86_64   43.7 KiB  1286K/s 00:00 [###################################] 100%
 dnsmasq-2.78-2-x86_64                  318.0 KiB  2.03M/s 00:00 [###################################] 100%
 libxml2-2.9.7+4+g72182550-2-x86_64    1265.4 KiB  5.52M/s 00:00 [###################################] 100%
 libxslt-1.1.32+3+g32c88216-1-x86_64    359.2 KiB  8.77M/s 00:00 [###################################] 100%
 libnih-1.0.3-2-x86_64                  137.4 KiB  7.89M/s 00:00 [###################################] 100%
 cgmanager-0.41-2-x86_64                115.1 KiB  0.00B/s 00:00 [###################################] 100%
 lxc-1:2.1.1-1-x86_64                   508.8 KiB  9.38M/s 00:00 [###################################] 100%
 vagrant-2.0.2-1-x86_64                   7.5 MiB  13.5M/s 00:01 [###################################] 100%
(9/9) checking keys in keyring                                   [###################################] 100%
(9/9) checking package integrity                                 [###################################] 100%
(9/9) loading package files                                      [###################################] 100%
(9/9) checking for file conflicts                                [###################################] 100%
(9/9) checking available disk space                              [###################################] 100%
:: Processing package changes...
(1/9) installing libnfnetlink                                    [###################################] 100%
(2/9) installing libnetfilter_conntrack                          [###################################] 100%
(3/9) installing dnsmasq                                         [###################################] 100%
(4/9) installing libnih                                          [###################################] 100%
(5/9) installing cgmanager                                       [###################################] 100%
(6/9) installing lxc                                             [###################################] 100%
Optional dependencies for lxc
    arch-install-scripts: for archlinux template
    dnsmasq: lxc-net.service [installed]
    lua
    lua-filesystem: lxc-top
    lua-alt-getopt: lxc-top
(7/9) installing libxml2                                         [###################################] 100%
(8/9) installing libxslt                                         [###################################] 100%
(9/9) installing vagrant                                         [###################################] 100%
:: Running post-transaction hooks...
(1/3) Updating system user accounts...
(2/3) Creating temporary files...
(3/3) Arming ConditionNeedsUpdate...
[root@grid1 ~]# cat << EOF > /etc/default/lxc-net
> # Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your
> # containers.  Set to "false" if you'll use virbr0 or another existing
> # bridge, or mavlan to your host's NIC.
> USE_LXC_BRIDGE="true"
> 
> # If you change the LXC_BRIDGE to something other than lxcbr0, then
> # you will also need to update your /etc/lxc/default.conf as well as the
> # configuration (/var/lib/lxc/<container>/config) for any containers
> # already created using the default config to reflect the new bridge
> # name.
> # If you have the dnsmasq daemon installed, you'll also have to update
> # /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon.
> LXC_BRIDGE="lxcbr0"
> LXC_ADDR="10.0.3.1"
> LXC_NETMASK="255.255.255.0"
> LXC_NETWORK="10.0.3.0/24"
> LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
> LXC_DHCP_MAX="253"
> # Uncomment the next line if you'd like to use a conf-file for the lxcbr0
> # dnsmasq.  For instance, you can use 'dhcp-host=mail1,10.0.3.100' to have
> # container 'mail1' always get ip address 10.0.3.100.
> #LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf
> 
> # Uncomment the next line if you want lxcbr0's dnsmasq to resolve the .lxc
> # domain.  You can then add "server=/lxc/10.0.3.1' (or your actual $LXC_ADDR)
> # to your system dnsmasq configuration file (normally /etc/dnsmasq.conf,
> # or /etc/NetworkManager/dnsmasq.d/lxc.conf on systems that use NetworkManager).
> # Once these changes are made, restart the lxc-net and network-manager services.
> # 'container1.lxc' will then resolve on your host.
> #LXC_DOMAIN="lxc"
> EOF
[root@grid1 ~]# cat << EOF > /etc/lxc/default.conf
> lxc.net.0.type = veth
> lxc.net.0.link = lxcbr0
> lxc.net.0.flags = up
> lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
> EOF
[root@grid1 ~]# systemctl start lxc-net
[root@grid1 ~]# git clone https://github.com/byteinternet/hypernode-vagrant
Cloning into 'hypernode-vagrant'...
remote: Counting objects: 1410, done.
remote: Total 1410 (delta 0), reused 0 (delta 0), pack-reused 1410
Receiving objects: 100% (1410/1410), 1.03 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (746/746), done.
[root@grid1 ~]# cd hypernode-vagrant/
[root@grid1 hypernode-vagrant]# vagrant plugin install vagrant-lxc
Installing the 'vagrant-lxc' plugin. This can take a few minutes...
Fetching: vagrant-lxc-1.3.0.gem (100%)
Installed the plugin 'vagrant-lxc (1.3.0)'!
[root@grid1 hypernode-vagrant]# vagrant up
Installing the 'vagrant-hypconfigmgmt --version '0.0.9'' plugin. This can take a few minutes...
Fetching: vagrant-hypconfigmgmt-0.0.9.gem (100%)
Installed the plugin 'vagrant-hypconfigmgmt (0.0.9)'!
Installed the vagrant-hypconfigmgmt plugin.
For the next configuration step, please again run: "vagrant up"
[root@grid1 hypernode-vagrant]# vagrant up
Bringing machine 'default' up with 'lxc' provider...
    default: Is this a Magento 1 or 2 Hypernode? [default 2]: 
==> default: Nginx will be configured for Magento 2. /data/web/magento2/pub will be symlinked to /data/web/public
    default: Is this a PHP 5.5 or 5.6 or 7.0 Hypernode? [default 7.0]: 
==> default: Will boot a box with PHP 7.0 installed
    default: Do you want to enable Varnish? Enter true or false [default false]: 
==> default: Varnish will be disabled by loading a nocache vcl.
    default: What filesystem type do you want to use? Options: nfs_guest, nfs, rsync, virtualbox [default virtualbox]: 
==> default: Virtualbox is the default fs type. If you later want to try a faster fs type like nfs_guest, edit local.yml
==> default: Disabling fs->folders->magento1 in the local.yml because Magento 2 was configured..
    default: Do you want to enable the production-like firewall? Enter true or false [default false]: 
==> default: The firewall will be disabled
    default: Do you want to enable production-like memory management? 
    default: This might be slower but it is more in-line with a real Hypernode. 
    default: Note: for LXC boxes this setting is disabled. 
    default: Enter true or false [default false]: 
==> default: Production-like memory management will be disabled
    default: Do you want to install Xdebug? Enter true or false [default false]: 
==> default: Xdebug will be disabled
    default: What Ubuntu version do you want to use? Options: xenial, precise (deprecated) [default xenial]: 
==> default: Will use the Xenial version. This is the default.
==> default: Installing the vagrant-hostmanager plugin.
Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
Fetching: vagrant-hostmanager-1.8.7.gem (100%)
Installed the plugin 'vagrant-hostmanager (1.8.7)'!
==> default: Installing the vagrant-vbguest plugin.
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.15.1.gem (100%)
Installed the plugin 'vagrant-vbguest (0.15.1)'!
==> default: Your hypernode-vagrant is now configured. Please run "vagrant up" again.
[root@grid1 hypernode-vagrant]# sed -i 's/service varnish restart/echo "not (re)starting varnish"/g' vagrant/provisioning/hypernode.sh
[root@grid1 hypernode-vagrant]# sed '/varnish/{n;s/false/true/'} local.yml -i
[root@grid1 hypernode-vagrant]# sed 's/virtualbox/rsync/g' local.yml -i 
[root@grid1 hypernode-vagrant]# vagrant up
Bringing machine 'hypernode' up with 'lxc' provider...
==> hypernode: Box 'hypernode_xenial' could not be found. Attempting to find and install...
    hypernode: Box Provider: lxc
    hypernode: Box Version: >= 0
==> hypernode: Loading metadata for box 'http://vagrant.hypernode.com/customer/xenial/catalog.json'
    hypernode: URL: http://vagrant.hypernode.com/customer/xenial/catalog.json
==> hypernode: Adding box 'hypernode_xenial' (v4833) for provider: lxc
    hypernode: Downloading: http://vagrant.hypernode.com/customer/xenial/hypernode_xenial.lxc.release-4833.box
    hypernode: Calculating and comparing box checksum...
==> hypernode: Successfully added box 'hypernode_xenial' (v4833) for 'lxc'!
==> 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 => /root/hypernode-vagrant
==> hypernode: Starting container...
==> hypernode: Waiting for machine to boot. This may take a few minutes...
    hypernode: SSH address: 10.0.3.197: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: /root/hypernode-vagrant/data/web/magento2/ => /data/web/magento2
==> hypernode: Rsyncing folder: /root/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-shell20180131-1173-10hptwo.sh
    hypernode: not (re)starting varnish
    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 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: update-alternatives: 
    hypernode: using /usr/bin/php7.0 to provide /usr/bin/php (php) in manual mode
    hypernode: Synchronizing state of php7.0-fpm.service with SysV init with /lib/systemd/systemd-sysv-install...
    hypernode: Executing /lib/systemd/systemd-sysv-install enable 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: Ensuring memory management is disabled
    hypernode: Your hypernode-vagrant is ready! Log in with:
    hypernode: ssh app@hypernode.local -oStrictHostKeyChecking=no -A
    hypernode: Or visit http://root.hypernode.local in your browser
[root@grid1 hypernode-vagrant]# vagrant ssh
Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.14.15-1-ARCH x86_64)

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

Host/IP:    xxxxx-dummytag-vagrant.nodes.hypernode.io (10.0.3.197)
Account_id: 666
Release:    release-4833 @ 2018-01-31 13:33:19 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

# Changing to the app user from the vagrant user with sudo works
vagrant@6af9cf-root-magweb-vgr:~$ sudo su
root@6af9cf-root-magweb-vgr /home/vagrant # su app
app@6af9cf-root-magweb-vgr:/home/vagrant$ whoami
app
vagrant@6af9cf-root-magweb-vgr:~$ sudo su app
app@6af9cf-root-magweb-vgr:/home/vagrant$ whoami
app

# Can not log in directly though because I had no SSH agent running. This would have also worked if I had.
app@6af9cf-root-magweb-vgr:/home/vagrant$ exit
vagrant@6af9cf-root-magweb-vgr:~$ logout
Connection to 10.0.3.197 closed.
[root@grid1 hypernode-vagrant]# ssh app@10.0.3.197
The authenticity of host '10.0.3.197 (10.0.3.197)' can't be established.
ECDSA key fingerprint is SHA256:2aQRsX8z4tJCpxQJv87IanxdZ4cI23hyPOzbqogUGps.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.3.197' (ECDSA) to the list of known hosts.
app@10.0.3.197's password: 

[root@grid1 hypernode-vagrant]# ssh root@@10.0.3.197
root@@10.0.3.197's password: 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment