Commit 5dcd8f293dfee0032f6a083d740aa1f4b353f327

Authored by Sergio Oliveira
1 parent b5e1f7b7

Installing Solr on the deploy task

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
@@ -248,6 +248,8 @@ def deploy(noprovision=False): @@ -248,6 +248,8 @@ def deploy(noprovision=False):
248 else: 248 else:
249 update_code() 249 update_code()
250 250
  251 + install_solr()
  252 +
251 mkvirtualenv() 253 mkvirtualenv()
252 254
253 sudo('supervisorctl stop all') 255 sudo('supervisorctl stop all')
@@ -264,9 +266,11 @@ def deploy(noprovision=False): @@ -264,9 +266,11 @@ def deploy(noprovision=False):
264 @task 266 @task
265 def install_solr(): 267 def install_solr():
266 """Install Solr""" 268 """Install Solr"""
  269 +
  270 + SOLR_PKG = 'https://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz'
  271 +
267 if not exists('~/solr-4.6.1'): 272 if not exists('~/solr-4.6.1'):
268 - link = 'https://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz'  
269 - run('wget {} -O /tmp/solr-4.6.1.tgz'.format(link)) 273 + run('wget {} -O /tmp/solr-4.6.1.tgz'.format(SOLR_PKG))
270 run('tar xzf /tmp/solr-4.6.1.tgz -C /tmp/') 274 run('tar xzf /tmp/solr-4.6.1.tgz -C /tmp/')
271 run('cp -rf /tmp/solr-4.6.1 ~/solr-4.6.1') 275 run('cp -rf /tmp/solr-4.6.1 ~/solr-4.6.1')
272 run('mv ~/solr-4.6.1/example ~/solr-4.6.1/colab') 276 run('mv ~/solr-4.6.1/example ~/solr-4.6.1/colab')