Skip to content
This repository was archived by the owner on Jan 24, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions clouder_template_elasticsearch/README.rst
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
5 changes: 5 additions & 0 deletions clouder_template_elasticsearch/__init__.py
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
29 changes: 29 additions & 0 deletions clouder_template_elasticsearch/__manifest__.py
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,
}
44 changes: 44 additions & 0 deletions clouder_template_elasticsearch/data/application.xml
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" />
Copy link
Owner

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

<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>
20 changes: 20 additions & 0 deletions clouder_template_elasticsearch/data/application_link.xml
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 clouder_template_elasticsearch/data/application_template.xml
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>
14 changes: 14 additions & 0 deletions clouder_template_elasticsearch/data/application_type.xml
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>
24 changes: 24 additions & 0 deletions clouder_template_elasticsearch/data/image.xml
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>
23 changes: 23 additions & 0 deletions clouder_template_elasticsearch/data/image_port.xml
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>
Copy link
Owner

Choose a reason for hiding this comment

The 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"

Copy link
Contributor Author

@lasley lasley Dec 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is my assumption that switching to https would identify it as an SSL only port? That's not the case here yet, but just good to know.

Copy link
Owner

Choose a reason for hiding this comment

The 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>
19 changes: 19 additions & 0 deletions clouder_template_elasticsearch/data/image_template.xml
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>
61 changes: 61 additions & 0 deletions clouder_template_elasticsearch/data/image_volume.xml
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>
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
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
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"
Loading