Browse Source

ElasticSearch for VMs.

master
Nick Sergeant 8 years ago
parent
commit
7d5c865ea3
  1. 1
      Makefile
  2. 24
      salt/elasticsearch/init.sls
  3. 1
      salt/system/init.sls
  4. 1
      salt/top.sls
  5. 4
      settings_local.py-template

1
Makefile

@ -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, \

24
salt/elasticsearch/init.sls

@ -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

1
salt/system/init.sls

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

1
salt/top.sls

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

4
settings_local.py-template

@ -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',
},
}

Loading…
Cancel
Save