Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2F85FEA9 for ; Tue, 23 Apr 2013 22:04:09 +0000 (UTC) Received: (qmail 40576 invoked by uid 500); 23 Apr 2013 22:04:09 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 40554 invoked by uid 500); 23 Apr 2013 22:04:09 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 40510 invoked by uid 99); 23 Apr 2013 22:04:09 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 22:04:09 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A22278234C5; Tue, 23 Apr 2013 22:04:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org Date: Tue, 23 Apr 2013 22:04:10 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: Making vagrant setup better Making vagrant setup better Signed-off-by: Tim Van Steenburgh 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 Authored: Thu Apr 4 21:10:02 2013 +0000 Committer: Tim Van Steenburgh 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" ]],