Correct dev environment creation
authorYves-Marie Haussonne <ymh.work+github@gmail.com>
Thu, 08 May 2014 11:40:58 +0200
changeset 648 c8b44a569549
parent 647 c28be856aad5
child 649 fcf5309284df
Correct dev environment creation
.hgsubstate
dev/Vagrantfile
dev/modules/sysconfig/manifests/testserver_init.pp
dev/modules/sysconfig/templates/start-testserver.sh.erb
dev/modules/sysconfig/templates/url.test.workspace.info.js.erb
dev/modules/sysconfig/templates/url.workspace.info.js.erb
--- a/.hgsubstate	Mon May 05 11:36:41 2014 +0200
+++ b/.hgsubstate	Thu May 08 11:40:58 2014 +0200
@@ -1,6 +1,6 @@
-dcac07e03420afa9401429186aa41d0dde8c5b63 dev/modules/apt
-a278e5063c745a07b34f778efb3821065d754479 dev/modules/concat
-4d816c990a1d48199edd324070256fad8307cf8c dev/modules/nginx
-468c24d87a0133edd8c4c5a05b314cc4d1ad9dfb dev/modules/postgresql
-f8bfe46bbfa4a4737cef9a20cfe1bed04aee4bdc dev/modules/stdlib
+d33a4c103f625fbc0a68e5fd07d476e3ef9b0723 dev/modules/apt
+7ede29bd8edb12b9b57b30af23fa0f3d1e3281ee dev/modules/concat
+cd95690796851ca6c1b5d03b9584920dfd9a4bf0 dev/modules/nginx
+702998d8fd9a843fad13df8d9035ef1acce9a000 dev/modules/postgresql
+17a912ea0afb3fb018170477856c25a95009f2cc dev/modules/stdlib
 f1f5e323065c2a804527e0e5eb83a73ad321577b dev/modules/supervisord
--- a/dev/Vagrantfile	Mon May 05 11:36:41 2014 +0200
+++ b/dev/Vagrantfile	Thu May 08 11:40:58 2014 +0200
@@ -91,12 +91,12 @@
     puppet.manifests_path = "manifests"
     puppet.manifest_file  = "site.pp"
     puppet.module_path    = "modules"
-    #puppet.options        = "--hiera_config /vagrant/hiera.yaml --graph --graphdir '/vagrant/graphs' --noop"
-    puppet.options        = "--debug --verbose --hiera_config /vagrant/hiera.yaml"
+    puppet.options        = "--hiera_config /vagrant/hiera.yaml"
     puppet.facter = {
       "vagrant_base_path" => File.dirname(__FILE__)
     }
-  #  puppet.options        = "--debug --verbose --hiera_config /vagrant/hiera.yaml "
+  #  puppet.options        = "--debug --verbose --hiera_config /vagrant/hiera.yaml --graph --graphdir '/vagrant/graphs' --noop"
+
   end
 
   # Enable provisioning with chef solo, specifying a cookbooks path, roles
--- a/dev/modules/sysconfig/manifests/testserver_init.pp	Mon May 05 11:36:41 2014 +0200
+++ b/dev/modules/sysconfig/manifests/testserver_init.pp	Thu May 08 11:40:58 2014 +0200
@@ -61,7 +61,7 @@
         owner   => 'vagrant',
         group   => 'vagrant',
         mode    => 755,
-        content => template('sysconfig/start-test-suite-dev.sh.erb'),
+        content => template('sysconfig/start-test-suite-dev.sh.erb')
     }
 
     file { 'start-testserver.sh':
@@ -71,17 +71,17 @@
         owner   => 'vagrant',
         group   => 'vagrant',
         mode    => 755,
-        content => template('sysconfig/start-testserver.sh.erb'),
+        content => template('sysconfig/start-testserver.sh.erb')
     }
 
-    file { 'settings_dev'
+    file { 'settings_dev':
         ensure  => 'present',
         path    => "/srv/comt/src/cm/settings_dev.py",
         replace => 'no',
         owner   => 'vagrant',
         group   => 'vagrant',
-        mode    => 755,
-        content => template('sysconfig/settings_dev.py.erb'),
+        mode    => 644,
+        content => template('sysconfig/settings_dev.py.erb')
     }
 
 }
--- a/dev/modules/sysconfig/templates/start-testserver.sh.erb	Mon May 05 11:36:41 2014 +0200
+++ b/dev/modules/sysconfig/templates/start-testserver.sh.erb	Thu May 08 11:40:58 2014 +0200
@@ -6,7 +6,7 @@
 
 pushd "$ROOTPATH" > /dev/null
 
-nohup bin/django testserver --noinput --addrport=0.0.0.0:<%= @testserver_port %> initial_data roles_generic test_suite > $TMPFILE 2>&1 &
+nohup bin/django testserver --settings=cm.settings_dev --noinput --addrport=0.0.0.0:<%= @testserver_port %> initial_data roles_generic test_suite > $TMPFILE 2>&1 &
 echo "$!|$TMPFILE" > /tmp/testserver.pid
 
 cat  /tmp/testserver.pid
--- a/dev/modules/sysconfig/templates/url.test.workspace.info.js.erb	Mon May 05 11:36:41 2014 +0200
+++ b/dev/modules/sysconfig/templates/url.test.workspace.info.js.erb	Thu May 08 11:40:58 2014 +0200
@@ -1,4 +1,4 @@
 
 
-define ("WORKSPACE_URL", 'http://<%= @ipaddress_eth1 %>:<%= @testserver_port %>');
+define ("WORKSPACE_URL", 'http://<%= @ipaddress_eth1 %>:<%= @testserver_port %>/');
 
--- a/dev/modules/sysconfig/templates/url.workspace.info.js.erb	Mon May 05 11:36:41 2014 +0200
+++ b/dev/modules/sysconfig/templates/url.workspace.info.js.erb	Thu May 08 11:40:58 2014 +0200
@@ -1,4 +1,4 @@
 
 
-define ("WORKSPACE_URL", 'http://<%= @ipaddress_eth1 %>');
+define ("WORKSPACE_URL", 'http://<%= @ipaddress_eth1 %>/');