ElasticSearch for VMs.

master
Nick Sergeant 2014-10-30 21:08:26 -04:00
parent 21c2a7a440
commit 7d5c865ea3
5 changed files with 30 additions and 1 deletions

View File

@ -111,6 +111,7 @@ vagrant:
@vagrant ssh -c '$(pm) syncdb;'
@$(ssh-vagrant) '$(pm) migrate;'
@$(ssh-vagrant) '$(pm) backfill_api_keys'
@$(ssh-vagrant) '$(pm) rebuild_index --noinput'
.PHONY: assets, \
db, \

View File

@ -0,0 +1,24 @@
elasticsearch-file:
file.managed:
- name: /tmp/elasticsearch-1.3.4.deb
- source: https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.deb
- unless: test -d /usr/local/elasticsearch/bin
- source_hash: sha1=6a4b6a12825f141245bb581c76052464d17de874
elasticsearch-install:
cmd:
- cwd: /tmp
- names:
- dpkg -i elasticsearch-1.3.4.deb
- unless: test -d /usr/local/elasticsearch/bin
- run
- require:
- file: elasticsearch-file
elasticsearch:
service:
- running
- enable: True
- reload: True
- require:
- file: elasticsearch-file

View File

@ -22,3 +22,4 @@ system:
- mercurial
- python-dev
- tree
- openjdk-7-jdk

View File

@ -5,6 +5,7 @@ base:
- ssh
- users
- fish
- elasticsearch
- postgresql
- nginx
- supervisor

View File

@ -27,6 +27,8 @@ DATABASES = {
}
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': 'haystack',
},
}