From 5dcd8f293dfee0032f6a083d740aa1f4b353f327 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Fri, 1 Aug 2014 17:28:38 -0300 Subject: [PATCH] Installing Solr on the deploy task --- fabfile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fabfile.py b/fabfile.py index 18d303f..1dfda53 100644 --- a/fabfile.py +++ b/fabfile.py @@ -248,6 +248,8 @@ def deploy(noprovision=False): else: update_code() + install_solr() + mkvirtualenv() sudo('supervisorctl stop all') @@ -264,9 +266,11 @@ def deploy(noprovision=False): @task def install_solr(): """Install Solr""" + + SOLR_PKG = 'https://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz' + if not exists('~/solr-4.6.1'): - link = 'https://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz' - run('wget {} -O /tmp/solr-4.6.1.tgz'.format(link)) + run('wget {} -O /tmp/solr-4.6.1.tgz'.format(SOLR_PKG)) run('tar xzf /tmp/solr-4.6.1.tgz -C /tmp/') run('cp -rf /tmp/solr-4.6.1 ~/solr-4.6.1') run('mv ~/solr-4.6.1/example ~/solr-4.6.1/colab') -- libgit2 0.21.2