Skip to content

Instantly share code, notes, and snippets.

@martinhynar
Last active August 29, 2015 14:20
Show Gist options
  • Save martinhynar/d64609639a4b2e858a1f to your computer and use it in GitHub Desktop.
Save martinhynar/d64609639a4b2e858a1f to your computer and use it in GitHub Desktop.
.idea
.vagrant
Download ElasticSearch:
archive.extracted:
- name: /opt/
- source: https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.4.5.tar.gz
- source_hash: https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.4.5.tar.gz.sha1.txt
- archive_format: tar
- tar_options: zv
- if_missing: /opt/elasticsearch-1.4.5
#!/usr/bin/env bash
curl -XDELETE "localhost:9200/test"
curl -XPUT "localhost:9200/test" -d '
{
"settings": {
"index.routing.allocation.include.node_label" : "alpha",
"number_of_shards" : 6,
"number_of_replicas" : 0
}
}
'
echo
for i in $(seq 20); do
curl -s -XPOST "localhost:9200/test/test/$i" -d "{ \"when\" : \"$(date --rfc-3339=ns)\"}"
echo
done;
java-1.7.0-openjdk:
pkg:
- latest
file_client: local
#!/usr/bin/env bash
curl "localhost:9200/_cluster/state/nodes?pretty"
curl "localhost:9200/test/_segments?pretty"
#!/usr/bin/env bash
/opt/elasticsearch-1.4.5/bin/elasticsearch -d --node.node_label alpha --node.name alpha-1
/opt/elasticsearch-1.4.5/bin/elasticsearch -d --node.node_label alpha --node.name alpha-2
/opt/elasticsearch-1.4.5/bin/elasticsearch -d --node.node_label omega --node.name omega-1
/opt/elasticsearch-1.4.5/bin/elasticsearch -d --node.node_label omega --node.name omega-2
base:
'*':
- java
- elasticsearch
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-6.6"
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.name = "estest"
vb.memory = 2048
vb.cpus = 1
end
config.vm.synced_folder ".", "/srv/salt/"
config.vm.provision :salt do |salt|
salt.minion_config = "./minion"
salt.run_highstate = true
salt.colorize = true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment