Created
August 17, 2012 19:13
Revisions
-
karmi revised this gist
Aug 17, 2012 . No changes.There are no files selected for viewing
-
karmi revised this gist
Aug 17, 2012 . 1 changed file with 9 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,24 +7,17 @@ World's Smallest Application Hosted in elasticsearch — <http://www.elasticsearch.org/guide/reference/modules/plugins.html> elasticsearch plugins which don't contain any Java files are identified as “site” plugins, and their content is served as static files. This makes it easy to create small, self-contained HTML applications for elasticsearch, just like this one. Install ------- You can either simply copy the `index.html` file to `$ES_HOME/plugins/hello-elasticsearch/_site` directory, or use the `plugin` script included with elasticsearch installation: plugin -install hello-elasticsearch -url https://raw.github.com/gist/3381710/hello-elasticsearch.zip The application will be available at <http://localhost:9200/_plugin/hello-elasticsearch/index.html>. -
karmi revised this gist
Aug 17, 2012 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,14 +7,24 @@ World's Smallest Application Hosted in elasticsearch — <http://www.elasticsearch.org/guide/reference/modules/plugins.html> Install ------- plugin -install hello-elasticsearch -url https://raw.github.com/gist/dc733632435da2149963/hello-elasticsearch.zip open http://localhost:9200/_plugin/hello-elasticsearch/index.html Install “from source” --------------------- cd /tmp mkdir -p /tmp/hello-elasticsearch curl -# -L -k https://gist.github.com/gists/dc733632435da2149963/download | tar xv --strip=1 -C /tmp/hello-elasticsearch zip -mj hello-elasticsearch.zip /tmp/hello-elasticsearch/* plugin -install hello-elasticsearch -url file:///tmp/hello-elasticsearch.zip open http://localhost:9200/_plugin/hello-elasticsearch/index.html Done. -
karmi revised this gist
Aug 17, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Binary file not shown. -
karmi revised this gist
Aug 13, 2012 . 2 changed files with 53 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ World's Smallest Application Hosted in elasticsearch ==================================================== > Plugins can have “sites” in them, any plugin that exists under the plugins directory with a `_site` directory, > its content will be statically served when hitting `/_plugin/[plugin_name]/` url. > Those can be added even after the process has started. — <http://www.elasticsearch.org/guide/reference/modules/plugins.html> Install ------- cd /tmp curl -# -L -k https://gist.github.com/gists/dc733632435da2149963/download | tar xv --strip=1 -C /tmp/hello-elasticsearch zip -mj hello-elasticsearch.zip /tmp/hello-elasticsearch/* plugin -install hello-elasticsearch -url file:///tmp/hello-elasticsearch.zip open http://localhost:9200/_plugin/hello-elasticsearch/index.html Done. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ <!DOCTYPE html> <html> <head> <title>Hello, elasticsearch!</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style>body { font: 100% normal 'Helvetica Neue', sans-serif; margin: 4em; }</style> <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script> </head> <body> <p> "Hello, <span id="cluster_name">elasticsearch</span>!", says <strong id="node_name">node</strong>, running on <em id="host_name">localhost</em>. </p> <script> $(function() { $.getJSON('http://localhost:9200/_cluster/nodes/_local', function(data) { console.log(data); var node_id = Object.keys(data.nodes)[0] , cluster_name = data['cluster_name'] , node_name = data.nodes[node_id]['name'] , host_name = data.nodes[node_id]['hostname']; $('#cluster_name').html( cluster_name); $('#node_name').html( node_name ); $('#host_name').html( host_name ); }) }); </script> </body> </html> -
karmi created this gist
Aug 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ .DS_Store tmp/