summaryrefslogtreecommitdiff
path: root/provisioning
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-02-11 10:39:53 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-02-11 10:39:53 +0100
commit71d1d8aac36ca6d5ce7b9f6b86a9891b45d3757c (patch)
tree2e41a14b459db16a8b2047fcae13ccefc2616c15 /provisioning
parentdcec274dd5d727f113bbc64a95e9fc0773829ce3 (diff)
(Re-)added auto setup of vagrant ssh.
- Issues #282, #252
Diffstat (limited to 'provisioning')
-rw-r--r--provisioning/manifests/hackday.pp1
-rwxr-xr-xprovisioning/modules/pixelated/files/activate_custom_node_modules.sh10
-rw-r--r--provisioning/modules/pixelated/manifests/hackday_dev_env.pp14
-rw-r--r--provisioning/modules/pixelated/manifests/source.pp12
4 files changed, 25 insertions, 12 deletions
diff --git a/provisioning/manifests/hackday.pp b/provisioning/manifests/hackday.pp
new file mode 100644
index 00000000..87a72728
--- /dev/null
+++ b/provisioning/manifests/hackday.pp
@@ -0,0 +1 @@
+class { '::pixelated::hackday_dev_env': }
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']