From 71d1d8aac36ca6d5ce7b9f6b86a9891b45d3757c Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Wed, 11 Feb 2015 10:39:53 +0100 Subject: (Re-)added auto setup of vagrant ssh. - Issues #282, #252 --- .../pixelated/files/activate_custom_node_modules.sh | 10 ++++++++++ .../modules/pixelated/manifests/hackday_dev_env.pp | 14 ++++++++++++++ provisioning/modules/pixelated/manifests/source.pp | 12 ------------ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 provisioning/modules/pixelated/manifests/hackday_dev_env.pp (limited to 'provisioning/modules') diff --git a/provisioning/modules/pixelated/files/activate_custom_node_modules.sh b/provisioning/modules/pixelated/files/activate_custom_node_modules.sh index ec59a183..5fa90b6a 100755 --- a/provisioning/modules/pixelated/files/activate_custom_node_modules.sh +++ b/provisioning/modules/pixelated/files/activate_custom_node_modules.sh @@ -27,4 +27,14 @@ fi source /home/vagrant/user-agent-venv/bin/activate +cd /vagrant/service +echo "running python setup.py develop" +python setup.py develop >/dev/null +echo "running bower install" +cd /vagrant/web-ui/ +bower install >/dev/null + +echo "running go build" +./go build + cd /vagrant diff --git a/provisioning/modules/pixelated/manifests/hackday_dev_env.pp b/provisioning/modules/pixelated/manifests/hackday_dev_env.pp new file mode 100644 index 00000000..78de0bba --- /dev/null +++ b/provisioning/modules/pixelated/manifests/hackday_dev_env.pp @@ -0,0 +1,14 @@ +# +class pixelated::hackday_dev_env { + file { '/home/vagrant/.activate_custom_node_modules.sh': + owner => 'vagrant', + mode => '0600', + source => 'puppet:///modules/pixelated/activate_custom_node_modules.sh', + } + exec { 'add_custom_node_modules_to_bashrc': + command => "/bin/bash -c 'echo \"source /home/vagrant/.activate_custom_node_modules.sh\" >> /home/vagrant/.bashrc'", + unless => "/bin/grep \"source /home/vagrant/.activate_custom_node_modules.sh\" /home/vagrant/.bashrc", + user => 'vagrant', + require => File['/home/vagrant/.activate_custom_node_modules.sh'] + } +} diff --git a/provisioning/modules/pixelated/manifests/source.pp b/provisioning/modules/pixelated/manifests/source.pp index e1dc7844..3d0fa390 100644 --- a/provisioning/modules/pixelated/manifests/source.pp +++ b/provisioning/modules/pixelated/manifests/source.pp @@ -36,18 +36,6 @@ class pixelated::source { user => 'vagrant', timeout => 0 } - - file { '/home/vagrant/.activate_custom_node_modules.sh': - owner => 'vagrant', - mode => '0600', - source => 'puppet:///modules/pixelated/activate_custom_node_modules.sh', - } - exec { 'add_custom_node_modules_to_bashrc': - command => "/bin/bash -c 'echo \"source /home/vagrant/.activate_custom_node_modules.sh\" >> /home/vagrant/.bashrc'", - unless => "/bin/grep \"source /home/vagrant/.activate_custom_node_modules.sh\" /home/vagrant/.bashrc", - user => 'vagrant', - require => [Exec['install-pixelated'], File['/home/vagrant/.activate_custom_node_modules.sh']] - } } Stage['main'] -> Stage['install_pixelated'] -- cgit v1.2.3