-
Notifications
You must be signed in to change notification settings - Fork 5
Setup Elasticsearch on Google Cloud
Pulkit Singhal edited this page Aug 19, 2015
·
19 revisions
0 sudo su
1 sudo apt-get update
2 sudo apt-get install python-software-properties
3 sudo add-apt-repository ppa:webupd8team/java
4 sudo apt-get update
5 sudo apt-get install tree
6 sudo apt-get install oracle-java7-installer
7 java -version
8 wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.2.deb
9 vim /etc/elasticsearch/elasticsearch.yml
10 sudo service elasticsearch restart
11 curl -X GET 'http://localhost:9200'
{
"status" : 200,
"name" : "Myron MacLain",
"version" : {
"number" : "1.1.2",
"build_hash" : "e511f7b28b77c4d99175905fac65bffbf4c80cf7",
"build_timestamp" : "2014-05-22T12:27:39Z",
"build_snapshot" : false,
"lucene_version" : "4.7"
},
"tagline" : "You Know, for Search"
}
12 find / -name elasticsearch
/var/log/elasticsearch
/var/lib/elasticsearch
/usr/share/lintian/overrides/elasticsearch
/usr/share/elasticsearch
/usr/share/elasticsearch/data/elasticsearch
/usr/share/elasticsearch/bin/elasticsearch
/usr/share/doc/elasticsearch
/etc/init.d/elasticsearch
/etc/default/elasticsearch
/etc/elasticsearch
/tmp/elasticsearch
36 cd /usr/share/elasticsearch
37 tree -L 1
.
├── bin
├── core-signatures.txt
├── data
├── lib
└── plugins
38 service elasticsearch status
* elasticsearch is running
39 service elasticsearch stop
* Stopping Elasticsearch Server [ OK ]
40 service elasticsearch status
* elasticsearch is not running
41 ./bin/plugin -i mobz/elasticsearch-head
-> Installing mobz/elasticsearch-head...
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip...
Downloading
...DONE
Installed mobz/elasticsearch-head into /usr/share/elasticsearch/plugins/head
Identified as a _site plugin, moving to _site structure ...
42 ./bin/plugin -i elasticsearch/marvel/latest
43 service elasticsearch start
* Starting Elasticsearch Server [ OK ]
44 service elasticsearch status
* elasticsearch is running
$ cd /usr/share/elasticsearch
$ ./bin/plugin -i elasticsearch/license/latest
-> Installing elasticsearch/license/latest...
Trying http://download.elasticsearch.org/elasticsearch/license/license-latest.zip...
Downloading ...............DONE
Installed elasticsearch/license/latest into /usr/share/elasticsearch/plugins/license
$ ./bin/plugin -i elasticsearch/shield/latest
-> Installing elasticsearch/shield/latest...
Trying http://download.elasticsearch.org/elasticsearch/shield/shield-latest.zip...
Downloading ...............DONE
Installed elasticsearch/shield/latest into /usr/share/elasticsearch/plugins/shield
$ service elasticsearch restart
* Stopping Elasticsearch Server [ OK ]
* Starting Elasticsearch Server [ OK ]
$ less /var/log/elasticsearch/es_shoppinpal.log
[Spot] version[1.1.2], pid[18013], build[e511f7b/2014-05-22T12:27:39Z]
[INFO ][node] [Spot] initializing ...
[WARN ][plugins] [Spot] failed to load plugin from [jar:file:/usr/share/elasticsearch/plugins/shield/elasticsearch-shield-1.1.1.jar!/es-plugin.properties]
org.elasticsearch.ElasticsearchException: Failed to load plugin class [org.elasticsearch.shield.ShieldPlugin]
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:512)
...
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/ElasticsearchException$WithRestHeaders
... 7 more
###
## Posted on forums:
## https://discuss.elastic.co/t/which-version-of-elasticsearch-does-shield-work-with/27677
###
$ ./bin/plugin -remove elasticsearch/license/latest
$ ./bin/plugin -remove elasticsearch/shield/latest
-> Removing elasticsearch/shield/latest
Removed elasticsearch/shield/latest
$ service elasticsearch restart
* Stopping Elasticsearch Server [ OK ]
* Starting Elasticsearch Server
## Elasticsearch on 64 bit Linux now uses mmapfs by default.
## Make sure that you set MAX_MAP_COUNT to a sufficiently high number.
## The RPM and Debian packages default this value to 262144.
11 sysctl vm.max_map_count
12 curl http://localhost:9200/_nodes/process?pretty
{
"cluster_name" : "...",
"nodes" : {
"hHZH7A4jS2qxBiMByJBSaA" : {
"name" : "Myron MacLain",
"transport_address" : "inet[/xx.xxx.xx.xx:xxxx]",
"host" : "elasticsearch-1-1.c.xxx-xxx-xxx.internal",
"ip" : "xx.xxx.xx.xx",
"version" : "1.1.2",
"build" : "e511f7b",
"http_address" : "inet[/xx.xxx.xx.xx:xxxx]",
"process" : {
"refresh_interval" : 1000,
"id" : 3866,
"max_file_descriptors" : 65535,
"mlockall" : false
}
}
}
}
- Setup Jenkins on Google Cloud
- [Save a Jenkins VM image](Save a Jenkins VM image)
- [Load Jenkins Instance from Image](Load Jenkins Instance from Image)
- [Save a Node VM image](Save a Node VM image)
- [Load a VM from image](Load a VM from image)
- [Setup Nginx on Google Cloud](Setup Nginx on Google Cloud)
- Jenkins Job: Build and Deploy App locally
- Jenkins Job: Build and Deploy App remotely
- TBD