├── .gitattributes ├── .gitmodules ├── README.md ├── Vagrantfile ├── LICENSE ├── manifests └── default.pp ├── kibana_config ├── config.js └── nginx.conf └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "modules/apt"] 2 | path = modules/apt 3 | url = https://github.com/puppetlabs/puppetlabs-apt.git 4 | [submodule "modules/stdlib"] 5 | path = modules/stdlib 6 | url = https://github.com/puppetlabs/puppetlabs-stdlib.git 7 | [submodule "modules/elasticsearch"] 8 | path = modules/elasticsearch 9 | url = https://github.com/elasticsearch/puppet-elasticsearch.git 10 | [submodule "modules/oracle-java"] 11 | path = modules/oracle-java 12 | url = https://github.com/drogerschariot/puppet-oracle-java.git 13 | [submodule "modules\\yum"] 14 | path = modules\\yum 15 | url = https://github.com/example42/puppet-yum.git 16 | [submodule "modules/puppi"] 17 | path = modules/puppi 18 | url = https://github.com/example42/puppi.git 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vagrant ElasticSearch box 2 | 3 | Intended to get a CentOs box with ElasticSearch environment quickly up and running in a VM. 4 | 5 | #BROKEN AT THE MOMENT, TRY OUT THE BRILLIANT [nhhagen](https://github.com/nhhagen/vagrant-elasticsearch-box) WHICH THIS IS FORKED FROM 6 | Or, if you really want CentOs - You should try out Babadofars pathetic attempt [https://github.com/babadofar/c6vagrant](https://github.com/babadofar/c6vagrant) 7 | 8 | ## Running the box 9 | 10 | 1. Install [Vagrant](http://www.vagrantup.com/) (and VirtualBox) 11 | 2. Peruse the [excellent and enlightening documentation](http://docs.vagrantup.com/v2/getting-started/index.html) 12 | 3. Clone this repo and type `vagrant up` from the directory that this README.md file resides in. 13 | 4. Open http://localhost:9200/ 14 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | 6 | config.vm.box = "CentOS-6.4-x86_64-v20130731.box" 7 | config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box" 8 | config.vm.network :private_network, ip: '192.168.1.40' 9 | config.vm.network :public_network 10 | 11 | config.vm.network :forwarded_port, guest: 9200, host: 9200 12 | config.vm.network :forwarded_port, guest: 9300, host: 9301 13 | config.vm.network :forwarded_port, guest: 5601, host: 5601 14 | config.vm.provision :puppet, :module_path => "modules" do |puppet| 15 | puppet.manifests_path = "manifests" 16 | puppet.manifest_file = "default.pp" 17 | end 18 | config.vm.provider "virtualbox" do |v| 19 | v.customize ["modifyvm", :id, "--cpus", "2"] 20 | v.customize ["modifyvm", :id, "--memory", "1024"] 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Niels Henrik Hagen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /manifests/default.pp: -------------------------------------------------------------------------------- 1 | define append_if_no_such_line($file, $line, $refreshonly = 'false') { 2 | exec { "/bin/echo '$line' >> '$file'": 3 | unless => "/bin/grep -Fxqe '$line' '$file'", 4 | path => "/bin", 5 | refreshonly => $refreshonly, 6 | } 7 | } 8 | 9 | class must-have { 10 | include yum 11 | 12 | 13 | #package { ['vim', 'curl', 'git', 'bash']: 14 | # ensure => present, 15 | # require => Exec['yum-update'], 16 | # } 17 | 18 | 19 | 20 | class { 'puppi': } 21 | 22 | class { 'elasticsearch': 23 | package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.0.Beta2.noarch.rpm', 24 | config => { 25 | 'cluster.name' => 'vagrant_elasticsearch', 26 | 'node.name' => $::ipaddress, 27 | 'index' => { 28 | 'number_of_replicas' => '0', 29 | 'number_of_shards' => '1', 30 | }, 31 | 'network' => { 32 | 'host' => $::ipaddress, 33 | }, 34 | 'path' => { 35 | 'conf' => '/elasticsearch_home/config', 36 | 'data' => '/vagrant/sample_data', 37 | 'work' => '/elasticsearch_home/work', 38 | 'logs' => '/elasticsearch_home/logs', 39 | 'plugins' => '/elasticsearch_home/plugins' 40 | } 41 | } 42 | } 43 | } 44 | 45 | include oracle_java 46 | include must-have 47 | 48 | -------------------------------------------------------------------------------- /kibana_config/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * These is the app's configuration, If you need to configure 3 | * the default dashboard, please see dashboards/default 4 | */ 5 | define(['settings'], 6 | function (Settings) { 7 | "use strict"; 8 | 9 | return new Settings({ 10 | 11 | /** 12 | * URL to your elasticsearch server. You almost certainly don't 13 | * want 'http://localhost:9200' here. Even if Kibana and ES are on 14 | * the same host 15 | * 16 | * By default this will attempt to reach ES at the same host you have 17 | * elasticsearch installed on. You probably want to set it to the FQDN of your 18 | * elasticsearch host 19 | * @type {String} 20 | */ 21 | elasticsearch: 'http://' + window.location.hostname + ':9200', 22 | 23 | /** 24 | * The default ES index to use for storing Kibana specific object 25 | * such as stored dashboards 26 | * @type {String} 27 | */ 28 | kibana_index: "kibana-int", 29 | 30 | /** 31 | * Panel modules available. Panels will only be loaded when they are defined in the 32 | * dashboard, but this list is used in the "add panel" interface. 33 | * @type {Array} 34 | */ 35 | panel_names: [ 36 | 'histogram', 37 | 'map', 38 | 'pie', 39 | 'table', 40 | 'filtering', 41 | 'timepicker', 42 | 'text', 43 | 'fields', 44 | 'hits', 45 | 'dashcontrol', 46 | 'column', 47 | 'derivequeries', 48 | 'trends', 49 | 'bettermap', 50 | 'query', 51 | 'terms', 52 | 'sparklines' 53 | ] 54 | }); 55 | }); 56 | -------------------------------------------------------------------------------- /kibana_config/nginx.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Nginx proxy for Elasticsearch + Kibana 3 | # 4 | # In this setup, we are password protecting the saving of dashboards. You may 5 | # wish to extend the password protection to all paths. 6 | # 7 | # Even though these paths are being called as the result of an ajax request, the 8 | # browser will prompt for a username/password on the first request 9 | # 10 | # If you use this, you'll want to point config.js at http://FQDN:80/ instead of 11 | # http://FQDN:9200 12 | # 13 | 14 | events { 15 | worker_connections 15000; 16 | } 17 | 18 | http { 19 | include mime.types; 20 | index index.html index.htm index.php; 21 | server { 22 | listen *:5601 ; 23 | 24 | server_name kibana.myhost.org; 25 | access_log /var/log/nginx/kibana.myhost.org.access.log; 26 | 27 | location / { 28 | root /home/vagrant/kibana/src; 29 | index index.html index.htm; 30 | } 31 | 32 | location ~ ^/_aliases$ { 33 | proxy_pass http://127.0.0.1:9200; 34 | proxy_read_timeout 90; 35 | } 36 | location ~ ^/_nodes$ { 37 | proxy_pass http://127.0.0.1:9200; 38 | proxy_read_timeout 90; 39 | } 40 | location ~ ^/.*/_search$ { 41 | proxy_pass http://127.0.0.1:9200; 42 | proxy_read_timeout 90; 43 | } 44 | location ~ ^/.*/_mapping$ { 45 | proxy_pass http://127.0.0.1:9200; 46 | proxy_read_timeout 90; 47 | } 48 | 49 | # Password protected end points 50 | location ~ ^/kibana-int/dashboard/.*$ { 51 | proxy_pass http://127.0.0.1:9200; 52 | proxy_read_timeout 90; 53 | #limit_except GET { 54 | # proxy_pass http://127.0.0.1:9200; 55 | # auth_basic "Restricted"; 56 | # auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd; 57 | #} 58 | } 59 | location ~ ^/kibana-int/temp.*$ { 60 | proxy_pass http://127.0.0.1:9200; 61 | proxy_read_timeout 90; 62 | #limit_except GET { 63 | # proxy_pass http://127.0.0.1:9200; 64 | # auth_basic "Restricted"; 65 | # auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd; 66 | #} 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | .orig 165 | 166 | **/App_Data/Log/* 167 | **/App_Data/Assembly/* 168 | **/App_Data/Config/* 169 | **/App_Data/Blob/* 170 | 171 | *.log 172 | 173 | *.dll 174 | *.orig 175 | 176 | .vagrant 177 | 178 | elasticsearch 179 | !modules/elasticsearch 180 | 181 | sample_data 182 | --------------------------------------------------------------------------------