summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOla Bini <ola@olabini.se>2016-12-07 18:36:33 -0200
committerOla Bini <ola@olabini.se>2016-12-07 18:36:51 -0200
commitcef353491e5032d30f924b46dcae4e63897e189b (patch)
treed1f10c968d14885e1fef4a769f29cfb3e388b469
parent3e9f6d5684913c6d2e996cd46f75934ac075e342 (diff)
Fix out of memory errors and problems with older node versions that stopped vagrant from working
-rw-r--r--Vagrantfile4
-rwxr-xr-xinstall-pixelated.sh13
-rw-r--r--provisioning/modules/pixelated/manifests/apt.pp4
3 files changed, 17 insertions, 4 deletions
diff --git a/Vagrantfile b/Vagrantfile
index ad247dc4..5d8a66d5 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -27,12 +27,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
config.vm.provider "libvirt" do |v, override|
- v.memory = 1024
+ v.memory = 2048
override.vm.network :forwarded_port, guest: 3333, guest_ip: '127.0.0.1', host: 3333
end
config.vm.provider "virtualbox" do |v, override|
- v.memory = 1024
+ v.memory = 2048
override.vm.network :forwarded_port, guest: 3333, host: 3333 # do NOT add host_ip in this line. It is not necessary
override.vm.network :forwarded_port, guest: 8089, host: 8089
end
diff --git a/install-pixelated.sh b/install-pixelated.sh
index 4c6142a2..e3f4aaf1 100755
--- a/install-pixelated.sh
+++ b/install-pixelated.sh
@@ -57,6 +57,19 @@ function check_installed() {
set -e
}
+
+# The below is necessary to allow node to use enough memory
+# so that installing phantomjs won't fail
+mkdir -p /home/vagrant/bin
+cat > /home/vagrant/bin/node <<EOF
+#!/usr/bin/env bash
+
+/usr/bin/node --max_old_space_size=2000 "\$@"
+EOF
+chmod +x /home/vagrant/bin/node
+export PATH=/home/vagrant/bin:$PATH
+
+
function install_node_modules_at_custom_location() {
local LOCATION="$1"
local WEBUI_DIR=$(pwd)
diff --git a/provisioning/modules/pixelated/manifests/apt.pp b/provisioning/modules/pixelated/manifests/apt.pp
index bd44b86a..cf9cda66 100644
--- a/provisioning/modules/pixelated/manifests/apt.pp
+++ b/provisioning/modules/pixelated/manifests/apt.pp
@@ -60,8 +60,8 @@ class pixelated::apt {
# nodejs latest repo
file { '/etc/apt/sources.list.d/noderesource.list':
content =>
- 'deb https://deb.nodesource.com/node_6.x jessie main
- deb-src https://deb.nodesource.com/node_6.x jessie main',
+ 'deb https://deb.nodesource.com/node_7.x jessie main
+ deb-src https://deb.nodesource.com/node_7.x jessie main',
owner => 'root'
}
exec{'add_nodesource_key':