##TUNING##
System: set file descriptors to 32K or 64K
vim /etc/security/limit.conf
| #!/usr/bin/env bash | |
| # script: watch | |
| # author: Mike Smullin <mike@smullindesign.com> | |
| # license: GPLv3 | |
| # description: | |
| # watches the given path for changes | |
| # and executes a given command when changes occur | |
| # usage: | |
| # watch <path> <cmd...> | |
| # |
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
Test on single node, MacBook Pro, 16 GB RAM, 1TB SSD, OS X Maverick
ES 1.1.0 with Java 8, G1 GC, 12 GB heap
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java -Xms12g -Xmx12g -Djava.awt.headless=true -XX:+UseG1GC -Delasticsearch -Des.foreground=yes -Des.path.home=/Users/es/elasticsearch-1.1.0 -cp :/Users/es/elasticsearch-1.1.0/lib/elasticsearch-1.1.0.jar:/Users/es/elasticsearch-1.1.0/lib/:/Users/es/elasticsearch-1.1.0/lib/sigar/ org.elasticsearch.bootstrap.Elasticsearch
Node
| # This is a general-purpose function to ask Yes/No questions in Bash, either | |
| # with or without a default answer. It keeps repeating the question until it | |
| # gets a valid answer. | |
| ask() { | |
| # http://djm.me/ask | |
| while true; do | |
| if [ "${2:-}" = "Y" ]; then | |
| prompt="Y/n" |
| # +--------------------------------------------------------------------------- | |
| # | File : BackuptoS3_Snapshots.ps1 | |
| # | Version : 1.0 | |
| # | Purpose : Backs up to S3 & creates EBS snapshots | |
| # | Synopsis: | |
| # | Usage : .\BackuptoS3_Snapshots.ps1 | |
| # +---------------------------------------------------------------------------- | |
| # | | |
| # | File Requirements: | |
| # | Must have AWS S3 CLI installed & Powershell tools |
| /* | |
| get SSH.NET (BSD License: http://sshnet.codeplex.com/license) | |
| with NuGet: | |
| >Install-Package SSH.NET -Version 2013.4.7 | |
| or just get the dll from here: http://j.mp/sshNet | |
| */ | |
| using System; |
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,| // create an index with an analyzer "myindex" | |
| curl -X PUT localhost:9200/myindex -d ' | |
| { | |
| "settings" : {` | |
| "index":{ | |
| "number_of_replicas":0, | |
| "number_of_shards":1, | |
| "analysis":{ | |
| "analyzer":{ | |
| "first":{ |