summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-01-29 11:01:12 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-01-29 11:01:12 +0100
commite5692d6d992bb9899e62c573d0fa3b5be9540778 (patch)
treec3ce45f06d12d7c92fa3581538862a62c9b416c1
parent2652238050640d7984f9464a9487d960133af19f (diff)
Issue #252: Now correct node_modules gets deleted and phantomjs is installed.
-rwxr-xr-xinstall-pixelated.sh2
-rw-r--r--provisioning/modules/phantomjs/manifests/init.pp17
-rw-r--r--provisioning/modules/pixelated/manifests/source.pp7
3 files changed, 22 insertions, 4 deletions
diff --git a/install-pixelated.sh b/install-pixelated.sh
index ceff0353..d5521399 100755
--- a/install-pixelated.sh
+++ b/install-pixelated.sh
@@ -72,7 +72,7 @@ function install_node_modules_at_custom_location() {
fi
if [ ! -h "node_modules" ] ; then
- rm -Rf "$LOCATION/node_modules"
+ rm -Rf "node_modules"
ln -s "$LOCATION/node_modules" node_modules
fi
}
diff --git a/provisioning/modules/phantomjs/manifests/init.pp b/provisioning/modules/phantomjs/manifests/init.pp
new file mode 100644
index 00000000..78ba734c
--- /dev/null
+++ b/provisioning/modules/phantomjs/manifests/init.pp
@@ -0,0 +1,17 @@
+class phantomjs {
+ exec{'download_phantomjs':
+ command => '/usr/bin/wget -O /var/local/phantomjs-1.9.8.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2',
+ creates => '/var/local/phantomjs-1.9.8.tar.bz2',
+ notify => Exec['unpack_phantomjs'],
+ }
+ exec{'unpack_phantomjs':
+ command => '/bin/tar xvfj phantomjs-1.9.8.tar.bz2',
+ cwd => '/var/local/',
+ refreshonly => true,
+ notify => Exec['install_phantomjs'],
+ }
+ exec{'install_phantomjs':
+ command => '/usr/bin/install /var/local/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/bin/phantomjs',
+ refreshonly => true,
+ }
+}
diff --git a/provisioning/modules/pixelated/manifests/source.pp b/provisioning/modules/pixelated/manifests/source.pp
index c84eecfe..d740bc86 100644
--- a/provisioning/modules/pixelated/manifests/source.pp
+++ b/provisioning/modules/pixelated/manifests/source.pp
@@ -1,4 +1,5 @@
class pixelated::source {
+ include phantomjs
package { [
'git',
@@ -26,7 +27,7 @@ class pixelated::source {
}
class install_pixelated {
- $virtualenv_path = "/home/vagrant/user-agent-venv"
+ $virtualenv_path = '/home/vagrant/user-agent-venv'
exec { 'install-pixelated':
environment => 'USERNAME=vagrant',
@@ -44,8 +45,8 @@ class pixelated::source {
}
file { '/home/vagrant/.activate_custom_node_modules.sh':
- owner => 'vagrant',
- mode => '0600',
+ owner => 'vagrant',
+ mode => '0600',
source => 'puppet:///modules/pixelated/activate_custom_node_modules.sh',
}
exec { 'add_custom_node_modules_to_bashrc':