You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/04/04 23:10:29 UTC

git commit: Making vagrant setup better

Updated Branches:
  refs/heads/tv/vagrant [created] c10e0fe9d


Making vagrant setup better

Signed-off-by: Tim Van Steenburgh <tv...@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/c10e0fe9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c10e0fe9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c10e0fe9

Branch: refs/heads/tv/vagrant
Commit: c10e0fe9de6d44a029346b5e8046a4772a3f8a0c
Parents: 4c3419a
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Apr 4 21:10:02 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Apr 4 21:10:02 2013 +0000

----------------------------------------------------------------------
 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/c10e0fe9/vagrant/allura_setup.sh
----------------------------------------------------------------------
diff --git a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
index 602d247..a1fb942 100755
--- a/vagrant/allura_setup.sh
+++ b/vagrant/allura_setup.sh
@@ -13,13 +13,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
@@ -33,13 +26,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/c10e0fe9/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 d80e22a..76b1707 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -49,9 +49,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" ],
@@ -74,17 +74,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,
@@ -97,7 +104,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" ]],