Some fixes to run the 3.2 versions.

This commit is contained in:
Andrea Dell'Amico 2022-03-17 18:16:36 +01:00
parent 8b92472b88
commit 3ff3a7a09a
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
4 changed files with 30 additions and 16 deletions

View File

@ -28,6 +28,7 @@ orientdb_ssl_enabled: False
orientdb_letsencrypt_ssl_enabled: False orientdb_letsencrypt_ssl_enabled: False
orientdb_ssl_client_auth_enabled: False orientdb_ssl_client_auth_enabled: False
orientdb_hooks_enabled: False
orientdb_hooks_classes: orientdb_hooks_classes:
- { name: 'org.gcube.informationsystem.orientdb.hooks.HeaderHook', position: 'REGULAR' } - { name: 'org.gcube.informationsystem.orientdb.hooks.HeaderHook', position: 'REGULAR' }
- { name: 'org.gcube.informationsystem.orientdb.hooks.ConsistsOfHook', position: 'REGULAR' } - { name: 'org.gcube.informationsystem.orientdb.hooks.ConsistsOfHook', position: 'REGULAR' }

View File

@ -11,11 +11,29 @@
args: args:
creates: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}-{{ orientdb_version }}' creates: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}-{{ orientdb_version }}'
- name: Create the needed directory inside the orientdb user home
become: True
become_user: '{{ orientdb_user }}'
file: dest={{ item }} state=directory mode=0750
loop:
- '{{ orientdb_data_dir }}'
- '{{ orientdb_pid_dir }}'
- '{{ orientdb_automatic_backup_directory }}'
- name: Link to the latest version - name: Link to the latest version
become: True become: True
become_user: '{{ orientdb_user }}' become_user: '{{ orientdb_user }}'
file: src={{ orientdb_tar_filename }} dest={{ orientdb_install_dir }} state=link file: src={{ orientdb_tar_filename }} dest={{ orientdb_install_dir }} state=link
- name: Create a link to the data directory
become: True
become_user: '{{ orientdb_user }}'
ansible.builtin.file:
src: '{{ orientdb_data_dir }}'
dest: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}-{{ orientdb_version }}/databases'
state: link
force: True
- name: Create a orientdb log directory out of the distribution directory - name: Create a orientdb log directory out of the distribution directory
file: file:
dest: '{{ orientdb_log_dir }}' dest: '{{ orientdb_log_dir }}'
@ -29,15 +47,6 @@
become_user: '{{ orientdb_user }}' become_user: '{{ orientdb_user }}'
file: dest={{ orientdb_home_prefix }}/{{ orientdb_user }}/logs src={{ orientdb_log_dir }} state=link file: dest={{ orientdb_home_prefix }}/{{ orientdb_user }}/logs src={{ orientdb_log_dir }} state=link
- name: Create the needed directory inside the orientdb user home
become: True
become_user: '{{ orientdb_user }}'
file: dest={{ item }} state=directory mode=0750
loop:
- '{{ orientdb_data_dir }}'
- '{{ orientdb_pid_dir }}'
- '{{ orientdb_automatic_backup_directory }}'
- name: Remove the old hook jars - name: Remove the old hook jars
shell: rm -f {{ orientdb_install_dir }}/lib/{{ item }} shell: rm -f {{ orientdb_install_dir }}/lib/{{ item }}
with_items: '{{ orientdb_hooks_to_be_removed | default([]) }}' with_items: '{{ orientdb_hooks_to_be_removed | default([]) }}'

View File

@ -9,14 +9,16 @@
</parameters> </parameters>
</handler> </handler>
{% endif %} {% endif %}
<!--handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin"> {% if orientdb_distributed %}
<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
<parameters> <parameters>
<parameter value="{{ orientdb_distributed | ternary('true','false') }}" name="enabled"/> <parameter value="{{ orientdb_distributed | ternary('true','false') }}" name="enabled"/>
<parameter value="{{ ansible_hostname }}" name="nodeName"/> <parameter value="{{ ansible_hostname }}" name="nodeName"/>
<parameter value="${ORIENTDB_HOME}/config/default-distributed-db-config.json" name="configuration.db.default"/> <parameter value="${ORIENTDB_HOME}/config/default-distributed-db-config.json" name="configuration.db.default"/>
<parameter value="${ORIENTDB_HOME}/config/hazelcast.xml" name="configuration.hazelcast"/> <parameter value="${ORIENTDB_HOME}/config/hazelcast.xml" name="configuration.hazelcast"/>
</parameters> </parameters>
</handler--> </handler>
{% endif %}
<handler class="com.orientechnologies.orient.server.handler.OJMXPlugin"> <handler class="com.orientechnologies.orient.server.handler.OJMXPlugin">
<parameters> <parameters>
<parameter value="false" name="enabled"/> <parameter value="false" name="enabled"/>
@ -104,16 +106,14 @@
<entry value="1" name="db.pool.min"/> <entry value="1" name="db.pool.min"/>
<entry value="50" name="db.pool.max"/> <entry value="50" name="db.pool.max"/>
<entry value="50" name="script.pool.maxSize"/> <entry value="50" name="script.pool.maxSize"/>
<!-- Profile is available in enterprise edition only http://orientdb.com/docs/3.0.x/tuning/Profiler.html -->
<entry value="false" name="profiler.enabled"/> <entry value="false" name="profiler.enabled"/>
<!--entry value="0" name="distributed.autoRemoveOfflineServers"/ -->
<entry value="{{ orientdb_data_dir }}" name="server.database.path" />
</properties> </properties>
<!-- {% if orientdb_hooks_enabled %}
<hooks> <hooks>
{% for class in orientdb_hooks_classes %} {% for class in orientdb_hooks_classes %}
<hook class="{{ class.name }}" position="{{ class.position }}"/> <hook class="{{ class.name }}" position="{{ class.position }}"/>
{% endfor %} {% endfor %}
</hooks> </hooks>
--> {% endif %}
</orient-server> </orient-server>

View File

@ -16,6 +16,10 @@ RestartSec=10
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog
SyslogIdentifier=orientdb SyslogIdentifier=orientdb
{% if orientdb_distributed %}
ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/dserver.sh
{% else %}
ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.sh ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.sh
{% endif %}
ExecStop={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/shutdown.sh ExecStop={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/shutdown.sh
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID