Merge pull request 'orientdb: support hazelcast in unicast/tcp mode.' (#161) from adellam/ansible-roles:master into master

This commit is contained in:
Andrea Dell'Amico 2020-03-19 12:02:01 +01:00
commit ee602bd005
3 changed files with 18 additions and 7 deletions

View File

@ -1,7 +1,7 @@
---
orientdb_install: False
orientdb_enabled: True
orientdb_version: 3.0.15
orientdb_version: 3.0.29
orientdb_archive_commpression: tar.gz
orientdb_dir: 'orientdb'
orientdb_tar_filename: '{{ orientdb_dir }}-{{ orientdb_version }}'
@ -60,9 +60,12 @@ orientbd_graph_server_enabled: False
orientdb_hazelcast_group_name: orientdb
orientdb_hazelcast_group_password: orientdb
orientbd_hazelcast_encryption: False
orientdb_hazelcast_multicast_enabled: True
orientdb_hazelcast_port_min: 2434
orientdb_hazelcast_port_max: 2454
orientdb_hazelcast_multicast_enabled: False
orientdb_hazelcast_multicast_group: 235.1.1.1
orientdb_hazelcast_multicast_port: 2434
orientdb_hazelcast_unicast_members:
- { member: 'localhost', port: '{{ orientdb_hazelcast_port_min }}' }
# For Reference see http://orientdb.com/docs/3.0.x/plugins/Automatic-Backup.html

View File

@ -52,11 +52,12 @@
template: src=orientdb.default.j2 dest=/etc/default/orientdb owner=root group=root mode=0444
notify: Restart orientdb
- name: Fix the pid file path inside the start/stop scripts
lineinfile: dest={{ orientdb_install_dir }}/bin/{{ item }} regexp="^ORIENTDB_PID=.*$" line="ORIENTDB_PID={{ orientdb_pid_dir }}/orientdb.pid"
- name: Fix the pid file path inside the start and shutdown scripts
lineinfile: dest={{ orientdb_install_dir }}/bin/{{ item }} regexp="^ORIENTDB_PID=.*$" line="ORIENTDB_PID={{ orientdb_pid_dir }}/orientdb.pid" insertafter="^PRG=.*$" firstmatch=yes
with_items:
- server.sh
- shutdown.sh
tags: [ 'orientdb', 'orientdb_pid' ]
- name: Install the orientdb configuration files
template: src={{ item }}.j2 dest={{ orientdb_install_dir }}/config/{{ item }} owner={{ orientdb_user }} group={{ orientdb_user }} mode=0640

View File

@ -16,12 +16,19 @@
<password>{{ orientdb_hazelcast_group_password }}</password>
</group>
<network>
<port auto-increment="true">{{ orientdb_hazelcast_multicast_port }}</port>
<port auto-increment="true">{{ orientdb_hazelcast_port_min }}</port>
<join>
<multicast enabled="{{ orientdb_hazelcast_multicast_enabled | ternary('true','false') }}">
<multicast-group>{{ orientdb_hazelcast_multicast_group }}</multicast-group>
<multicast-port>{{ orientdb_hazelcast_multicast_port }}</multicast-port>
<multicast-port>{{ orientdb_hazelcast_port_min }}</multicast-port>
</multicast>
{% if not orientdb_hazelcast_multicast_enabled %}
<tcp-ip enabled="true">
{% for node in orientdb_hazelcast_unicast_members %}
<member>{{ node.member }}:{{ node.port | default(orientdb_hazelcast_port_min) }}</member>
{% endfor %}
</tcp-ip>
{% endif %}
</join>
{% if orientbd_hazelcast_encryption %}
<symmetric-encryption enabled="true">