incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [2/3] git commit: Making vagrant setup better
Date Tue, 23 Apr 2013 22:04:10 GMT
Making vagrant setup better

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/883c6d38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/883c6d38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/883c6d38

Branch: refs/heads/master
Commit: 883c6d3866e2c411bfcc7832bc0621ad4c647a3f
Parents: 70f0064
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Thu Apr 4 21:10:02 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Apr 23 17:57:51 2013 -0400

----------------------------------------------------------------------
 vagrant/allura_setup.sh                       |   11 +-------
 vagrant/manifests/ubuntu-1204-server-amd64.pp |   23 +++++++++++++-------
 2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/883c6d38/vagrant/allura_setup.sh
----------------------------------------------------------------------
diff --git a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
index 18d1ba6..e4973f6 100755
--- a/vagrant/allura_setup.sh
+++ b/vagrant/allura_setup.sh
@@ -30,13 +30,6 @@ then
     chown -R vagrant:vagrant /home/vagrant/src/apache-solr* /home/vagrant/src/allura/solr_config/conf/
 fi
 
-# Create log dir
-if [ ! -d /var/log/allura ]
-then
-    sudo mkdir -p /var/log/allura
-    sudo chown vagrant:vagrant /var/log/allura
-fi
-
 # Create startup script
 if [ ! -f /home/vagrant/start_allura ]
 then
@@ -50,13 +43,13 @@ if [ ! -f /home/vagrant/.bash_profile ]
 then
     echo "Creating ~/.bash_profile ..."
     cp /home/vagrant/.profile /home/vagrant/.bash_profile
-    echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/anvil/bin/activate &&
cd /home/vagrant/src/allura" >> /home/vagrant/.bash_profile
+    echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/env-allura/bin/activate &&
cd /home/vagrant/src/allura" >> /home/vagrant/.bash_profile
     chown vagrant:vagrant /home/vagrant/.bash_profile
 fi
 
 # Setup Allura python packages
 cd /home/vagrant/src/allura
-sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild-all.bash'
+sudo -u vagrant bash -c '. /home/vagrant/env-allura/bin/activate; ./rebuild-all.bash'
 
 echo "Purging unneeded packages..."
 aptitude clean

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/883c6d38/vagrant/manifests/ubuntu-1204-server-amd64.pp
----------------------------------------------------------------------
diff --git a/vagrant/manifests/ubuntu-1204-server-amd64.pp b/vagrant/manifests/ubuntu-1204-server-amd64.pp
index 26cbe3c..3e42118 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -66,9 +66,9 @@ exec { "install venv":
 
 # create Allura virtualenv
 exec { "create allura venv":
-  command => "/usr/local/bin/virtualenv anvil",
+  command => "/usr/local/bin/virtualenv env-allura",
   cwd     => "/home/vagrant",
-  creates => "/home/vagrant/anvil",
+  creates => "/home/vagrant/env-allura",
   user => "vagrant",
   group => "vagrant",
   require => Exec[ "install venv" ],
@@ -91,17 +91,24 @@ file { "/var/log/allura":
 # clone Allura source from git
 exec { "clone repo":
   command => "/usr/bin/git clone https://git-wip-us.apache.org/repos/asf/incubator-allura.git
allura",
-  cwd     => "/home/vagrant/src",
-  creates => "/home/vagrant/src/allura",
+  cwd     => "/vagrant",
+  creates => "/vagrant/allura",
   user => "vagrant",
   group => "vagrant",
-  require => [ File[ "/home/vagrant/src" ], Package[ "git-core" ] ],
+  require => [ Package[ "git-core" ] ],
+}
+
+# symlink allura src into the vagrant home dir just to be nice
+file { '/home/vagrant/src/allura':
+  ensure => 'link',
+  target => '/vagrant/allura',
+  require => [ File['/home/vagrant/src'], Exec['clone repo'] ],
 }
 
 # install Allura dependencies
 exec { "pip install":
-  command => "/home/vagrant/anvil/bin/pip install -r requirements.txt",
-  cwd     => "/home/vagrant/src/allura",
+  command => "/home/vagrant/env-allura/bin/pip install -r requirements.txt",
+  cwd     => "/vagrant/allura",
   user => "vagrant",
   group => "vagrant",
   timeout => 0,
@@ -114,7 +121,7 @@ exec { "pip install":
 }
 
 # symlink pysvn in from the system installation
-file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn':
+file { '/home/vagrant/env-allura/lib/python2.7/site-packages/pysvn':
   ensure => 'link',
   target => '/usr/lib/python2.7/dist-packages/pysvn',
   require => [ Package[ "python-svn" ], Exec[ "pip install" ]],


Mime
View raw message