This repository was archived by the owner on Jan 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
[ADD] clouder_template_elasticsearch: Provide Elastic #179
Merged
YannickB
merged 4 commits into
YannickB:master
from
LasLabs:feature/master/elasticsearch
Dec 26, 2016
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a93f35d
[ADD] clouder_template_elasticsearch: Provide Elastic
lasley 697b647
[REF] clouder_template_elasticsearch: PR Review updates
lasley 1f028ae
[REF] clouder_template_elasticsearch: PR Review updates
lasley c868b64
[MIG] clouder_template_elasticsearch: Upgrade to v10
lasley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg | ||
| :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
| :alt: License: LGPL-3 | ||
|
|
||
| ================================ | ||
| Clouder Template - Elasticsearch | ||
| ================================ | ||
|
|
||
| This module provides a template for Elasticsearch in Clouder. | ||
|
|
||
|
|
||
| Configuration | ||
| ============= | ||
|
|
||
| Clouder configuration instructions are available at https://clouder.readthedocs.io/ | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| To use this module, you need to: | ||
|
|
||
| #. Create an Elasticsearch Service in the Clouder Control Panel | ||
|
|
||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| * Add ElasticDump db backup & restore | ||
| * ElasticDump should be a separate service | ||
| * Add SSL (Requires CA - https://github.com/clouder-community/clouder/issues/167) | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues | ||
| <https://github.com/clouder-community/clouder/issues>`_. In case of trouble, please | ||
| check there if your issue has already been reported. If you spotted it first, | ||
| help us smashing it by providing a detailed and welcomed feedback. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| * Dave Lasley <[email protected]> | ||
|
|
||
| Maintainer | ||
| ---------- | ||
|
|
||
| This module is maintained by Clouder Community. | ||
|
|
||
| To contribute to this module, please visit https://github.com/clouder-community/clouder |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright 2016 LasLabs Inc. | ||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
|
||
| from . import models |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright 2016 LasLabs Inc. | ||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
|
||
| { | ||
| 'name': 'Clouder Template Elasticsearch', | ||
| 'version': '10.0.10.0.0', | ||
| 'category': 'Clouder', | ||
| 'depends': [ | ||
| 'clouder', | ||
| 'clouder_template_proxy', | ||
| 'clouder_template_dns', | ||
| ], | ||
| 'author': 'LasLabs Inc.', | ||
| 'license': 'LGPL-3', | ||
| 'website': 'https://github.com/clouder-community/clouder', | ||
| 'data': [ | ||
| 'data/image_template.xml', | ||
| 'data/image.xml', | ||
| 'data/image_port.xml', | ||
| 'data/image_volume.xml', | ||
| 'data/application_type.xml', | ||
| 'data/application_template.xml', | ||
| 'data/application.xml', | ||
| 'data/application_link.xml', | ||
| ], | ||
| 'installable': True, | ||
| 'application': False, | ||
| } |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="application_elasticsearch_data" model="clouder.application"> | ||
| <field name="name">Elasticsearch Data</field> | ||
| <field name="code">data</field> | ||
| <field name="type_id" ref="application_type_elasticsearch" /> | ||
| <field name="tag_ids" eval="[(4, [ref('clouder.tag_data')])]" /> | ||
| <field name="default_image_id" ref="image_elasticsearch_data" /> | ||
| <field name="sequence">1</field> | ||
| <field name="required" eval="True"/> | ||
| </record> | ||
|
|
||
| <record id="application_elasticsearch_exec" model="clouder.application"> | ||
| <field name="name">Elasticsearch Exec</field> | ||
| <field name="code">exec</field> | ||
| <field name="type_id" ref="application_type_elasticsearch" /> | ||
| <field name="tag_ids" eval="[(4, [ref('clouder.tag_exec')])]" /> | ||
| <field name="default_image_id" ref="image_elasticsearch_exec" /> | ||
| <field name="sequence">2</field> | ||
| <field name="required" eval="True"/> | ||
| <field name="update_strategy">auto</field> | ||
| </record> | ||
|
|
||
| <record id="application_elasticsearch" model="clouder.application"> | ||
| <field name="name">Elasticsearch</field> | ||
| <field name="code">elasticsearch</field> | ||
| <field name="type_id" ref="application_type_elasticsearch" /> | ||
| <field name="template_ids" | ||
| eval="[(4, ref('clouder.application_template_base_www'))]" | ||
| /> | ||
| <field name="child_ids" | ||
| eval="[(4, [ref('application_elasticsearch_data'), | ||
| ref('application_elasticsearch_exec'), | ||
| ])]" | ||
| /> | ||
| <field name="sequence">1</field> | ||
| <field name="required" eval="True"/> | ||
| </record> | ||
|
|
||
| </odoo> | ||
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="application_link_elasticsearch" | ||
| model="clouder.application.link" | ||
| > | ||
| <field name="template_id" | ||
| ref="application_template_elasticsearch" | ||
| /> | ||
| <field name="name" ref="application_elasticsearch" /> | ||
| <field name="service" eval="True" /> | ||
| <field name="required" eval="True" /> | ||
| <field name="auto" eval="True" /> | ||
| <field name="make_link" eval="True" /> | ||
| </record> | ||
|
|
||
| </odoo> |
13 changes: 13 additions & 0 deletions
13
clouder_template_elasticsearch/data/application_template.xml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="application_template_elasticsearch" | ||
| model="clouder.application.template" | ||
| > | ||
| <field name="name">Elasticsearch</field> | ||
| </record> | ||
|
|
||
| </odoo> |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="application_type_elasticsearch" | ||
| model="clouder.application.type" | ||
| > | ||
| <field name="name">elasticsearch</field> | ||
| <field name="system_user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| </odoo> |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="image_elasticsearch_data" model="clouder.image"> | ||
| <field name="name">image_elasticsearch_data</field> | ||
| <field name="template_ids" | ||
| eval="[(4, [ref('image_template_elasticsearch_data')])]" | ||
| /> | ||
| <field name="parent_from">lasley/elasticsearch-data</field> | ||
| </record> | ||
|
|
||
| <record id="image_elasticsearch_exec" model="clouder.image"> | ||
| <field name="name">image_elasticsearch_exec</field> | ||
| <field name="template_ids" | ||
| eval="[(4, [ref('image_template_elasticsearch_exec')])]" | ||
| /> | ||
| <field name="parent_from">lasley/elasticsearch-exec</field> | ||
| <field name="volumes_from">data</field> | ||
| </record> | ||
|
|
||
| </odoo> |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="image_port_elasticsearch_http" | ||
| model="clouder.image.port" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_exec" /> | ||
| <field name="name">http</field> | ||
| <field name="local_port">9200</field> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The port which need to be redirected by the proxy container need to be named "http"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is my assumption that switching to
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| </record> | ||
|
|
||
| <record id="image_port_elasticsearch_transport" | ||
| model="clouder.image.port" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_exec" /> | ||
| <field name="name">transport</field> | ||
| <field name="local_port">9300</field> | ||
| </record> | ||
|
|
||
| </odoo> | ||
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="image_template_elasticsearch_data" | ||
| model="clouder.image.template" | ||
| > | ||
| <field name="name">image_template_elasticsearch_data</field> | ||
| </record> | ||
|
|
||
| <record id="image_template_elasticsearch_exec" | ||
| model="clouder.image.template" | ||
| > | ||
| <field name="name">image_template_elasticsearch_exec</field> | ||
| </record> | ||
|
|
||
| </odoo> |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 LasLabs Inc. | ||
| License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). --> | ||
|
|
||
| <odoo> | ||
|
|
||
| <record id="image_volume_elasticsearch_data" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_data" /> | ||
| <field name="name">data</field> | ||
| <field name="localpath">/opt/elasticsearch/data</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| <record id="image_volume_elasticsearch_etc" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_data" /> | ||
| <field name="name">etc</field> | ||
| <field name="localpath">/opt/elasticsearch/config</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| <record id="image_volume_elasticsearch_log" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_data" /> | ||
| <field name="name">log</field> | ||
| <field name="localpath">/opt/elasticsearch/logs</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| <record id="image_volume_elasticsearch_lib" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_exec" /> | ||
| <field name="name">lib</field> | ||
| <field name="localpath">/opt/elasticsearch/lib</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| <record id="image_volume_elasticsearch_module" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_exec" /> | ||
| <field name="name">module</field> | ||
| <field name="localpath">/opt/elasticsearch/modules</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| <record id="image_volume_elasticsearch_plugin" | ||
| model="clouder.image.volume" | ||
| > | ||
| <field name="template_id" ref="image_template_elasticsearch_exec" /> | ||
| <field name="name">plugin</field> | ||
| <field name="localpath">/opt/elasticsearch/plugins</field> | ||
| <field name="user">elasticsearch</field> | ||
| </record> | ||
|
|
||
| </odoo> |
6 changes: 6 additions & 0 deletions
6
clouder_template_elasticsearch/images/elasticsearch5-data/Dockerfile
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| FROM clouder/base:3.4 | ||
| MAINTAINER Dave Lasley <[email protected]> | ||
|
|
||
| COPY etc ./config | ||
|
|
||
| CMD tail -f /dev/null |
5 changes: 5 additions & 0 deletions
5
clouder_template_elasticsearch/images/elasticsearch5-data/etc/elasticsearch.yml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| network.host: 0.0.0.0 | ||
|
|
||
| # this value is required because we set "network.host" | ||
| # be sure to modify it appropriately for a production cluster deployment | ||
| discovery.zen.minimum_master_nodes: 1 |
15 changes: 15 additions & 0 deletions
15
clouder_template_elasticsearch/images/elasticsearch5-data/etc/logging.yml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # you can override this using by setting a system property, for example -Des.logger.level=DEBUG | ||
| es.logger.level: INFO | ||
| rootLogger: ${es.logger.level}, console | ||
| logger: | ||
| # log action execution errors for easier debugging | ||
| action: DEBUG | ||
| # reduce the logging for aws, too much is logged under the default INFO | ||
| com.amazonaws: WARN | ||
|
|
||
| appender: | ||
| console: | ||
| type: console | ||
| layout: | ||
| type: consolePattern | ||
| conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is a web access you'll probably want to inherit the base_www template to get the link to dns/proxy/monitoring and allow base creation.
Look at the old shinken configuration here : https://github.com/clouder-community/clouder/blob/0.9.0/clouder_template_shinken/template.xml#L70