forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of gitorious.research-infrastructures.eu:infrastructure-management/ansible-playbooks
This commit is contained in:
commit
1b7b067d89
|
@ -94,7 +94,7 @@
|
|||
|
||||
- name: Install R packages from github
|
||||
command: >
|
||||
Rscript --slave --no-save --no-restore-history -e "if (! ('{{ item.plugin_name }}' %in% installed.packages()[,'Package'])) { require(devtools); require(methods) ; options(repos='{{ r_cran_mirror_site }}/') ; install_github('{{ item.plugin_name }}', '{{ item.github_user }}'); print('Added'); } else { print('Already Installed'); }"
|
||||
Rscript --slave --no-save --no-restore-history -e "if (! ('{{ item.plugin_name }}' %in% installed.packages()[,'Package'])) { require(devtools); require(methods) ; options(repos='{{ r_cran_mirror_site }}/') ; install_github('{{ item.github_user }}/{{ item.plugin_name }}'); print('Added'); } else { print('Already Installed'); }"
|
||||
register: install_github_plugins_result
|
||||
failed_when: "install_github_plugins_result.rc != 0 or 'had non-zero exit status' in install_github_plugins_result.stderr"
|
||||
changed_when: "'Added' in install_github_plugins_result.stdout"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
tags: letsencrypt
|
||||
|
||||
- name: Install the letsencrypt acmetool package and some deps
|
||||
apt: pkg={{ item }} state={{ letsencrypt_acme_pkg_state }}
|
||||
apt: pkg={{ item }} state={{ letsencrypt_acme_pkg_state }} update_cache=yes cache_valid_time=3600
|
||||
with_items: '{{ letsencrypt_acme_pkgs }}'
|
||||
when:
|
||||
- letsencrypt_acme_install
|
||||
|
|
|
@ -18,6 +18,7 @@ orientdb_configuration_files:
|
|||
- orientdb-server-config.xml
|
||||
- default-distributed-db-config.json
|
||||
- hazelcast.xml
|
||||
- automatic-backup.json
|
||||
|
||||
orientdb_letsencrypt_ssl_enabled: False
|
||||
|
||||
|
@ -51,3 +52,15 @@ orientbd_hazelcast_encryption: False
|
|||
orientdb_hazelcast_multicast_enabled: True
|
||||
orientdb_hazelcast_multicast_group: 235.1.1.1
|
||||
orientdb_hazelcast_multicast_port: 2434
|
||||
|
||||
|
||||
# For Reference see http://orientdb.com/docs/2.2/Automatic-Backup.html
|
||||
orientdb_automatic_backup: True
|
||||
orientdb_automatic_backup_mode: 'EXPORT'
|
||||
orientdb_automatic_backup_export_options: ''
|
||||
orientdb_automatic_backup_delay: 24h
|
||||
orientdb_automatic_backup_first_time: '23:00:00'
|
||||
orientdb_automatic_backup_directory: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/backups'
|
||||
orientdb_automatic_backup_target_file_name: '${DBNAME}-${DATE:yyyyMMddHHmmss}.zip'
|
||||
orientdb_automatic_backup_compression_level: 9
|
||||
orientdb_automatic_backup_buffer_size: 1048576
|
|
@ -24,22 +24,25 @@
|
|||
become_user: '{{ orientdb_user }}'
|
||||
file: dest={{ orientdb_home_prefix }}/{{ orientdb_user }}/logs src={{ orientdb_log_dir }} state=link
|
||||
|
||||
- name: Create the databases directory inside the orientdb user home
|
||||
- name: Create the needed directory inside the orientdb user home
|
||||
become: True
|
||||
become_user: '{{ orientdb_user }}'
|
||||
file: dest={{ item }} state=directory mode=0750
|
||||
with_items:
|
||||
- '{{ orientdb_data_dir }}'
|
||||
- '{{ orientdb_pid_dir }}'
|
||||
- '{{ orientdb_automatic_backup_directory }}'
|
||||
|
||||
- name: Remove the old hook jars
|
||||
shell: rm {{ orientdb_install_dir }}/lib/{{ item }}
|
||||
with_items: '{{ orientdb_hooks_to_be_removed | default([]) }}'
|
||||
tags: [ 'orientdb', 'orientdb_hooks' ]
|
||||
|
||||
- name: Fetch and install the hook jars
|
||||
get_url: url='{{ item }}' dest={{ orientdb_install_dir }}/lib
|
||||
with_items: '{{ orientdb_hooks_jars | default([]) }}'
|
||||
notify: Restart orientdb
|
||||
tags: [ 'orientdb', 'orientdb_hooks' ]
|
||||
|
||||
- name: Install the orientdb default settings
|
||||
template: src=orientdb.default.j2 dest=/etc/default/orientdb owner=root group=root mode=0444
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"enabled": {{ orientdb_automatic_backup | ternary('true','false') }},
|
||||
"mode": "{{ orientdb_automatic_backup_mode }}",
|
||||
"exportOptions": "{{ orientdb_automatic_backup_export_options }}",
|
||||
"delay": "{{ orientdb_automatic_backup_delay }}",
|
||||
"firstTime": "{{ orientdb_automatic_backup_first_time }}",
|
||||
"targetDirectory": "{{ orientdb_automatic_backup_directory }}",
|
||||
"targetFileName": "{{ orientdb_automatic_backup_target_file_name }}",
|
||||
"compressionLevel": {{orientdb_automatic_backup_compression_level }},
|
||||
"bufferSize": {{ orientdb_automatic_backup_buffer_size }}
|
||||
}
|
|
@ -9,12 +9,8 @@
|
|||
</handler>
|
||||
<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
|
||||
<parameters>
|
||||
{% if orientdb_distributed %}
|
||||
<parameter value="true" name="enabled"/>
|
||||
{% else %}
|
||||
<parameter value="false" name="enabled"/>
|
||||
{% endif %}
|
||||
<parameter value="nodeName" name="{{ ansible_fqdn }}"/>
|
||||
<parameter value="{{ orientdb_distributed | ternary('true','false') }}" name="enabled"/>
|
||||
<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/hazelcast.xml" name="configuration.hazelcast"/>
|
||||
</parameters>
|
||||
|
@ -27,7 +23,7 @@
|
|||
</handler>
|
||||
<handler class="com.orientechnologies.orient.server.handler.OAutomaticBackup">
|
||||
<parameters>
|
||||
<parameter value="false" name="enabled"/>
|
||||
<parameter value="true" name="enabled"/>
|
||||
<parameter value="${ORIENTDB_HOME}/config/automatic-backup.json" name="config"/>
|
||||
</parameters>
|
||||
</handler>
|
||||
|
@ -90,6 +86,7 @@
|
|||
<entry value="1" name="db.pool.min"/>
|
||||
<entry value="50" name="db.pool.max"/>
|
||||
<entry value="true" name="profiler.enabled"/>
|
||||
<entry value="0" name="distributed.autoRemoveOfflineServers"/>
|
||||
<entry value="{{ orientdb_data_dir }}" name="server.database.path" />
|
||||
</properties>
|
||||
<hooks>
|
||||
|
|
|
@ -29,7 +29,7 @@ start() {
|
|||
fi
|
||||
echo "Starting OrientDB server daemon..."
|
||||
cd "$ORIENTDB_DIR/bin"
|
||||
su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./server.sh $ORIENTDB_SERVER_OPTS 1>{{ orientdb_log_dir }}/orientdb.log 2>{{ orientdb_log_dir }}/orientdb.err &"
|
||||
su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./server.sh $ORIENTDB_SERVER_OPTS >> {{ orientdb_log_dir }}/orientdb.log 2>&1 &"
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
@ -41,7 +41,7 @@ stop() {
|
|||
fi
|
||||
echo "Stopping OrientDB server daemon..."
|
||||
cd "$ORIENTDB_DIR/bin"
|
||||
su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./shutdown.sh 1>>{{ orientdb_log_dir }}/orientdb.log 2>>{{ orientdb_log_dir }}/orientdb.err &"
|
||||
su $ORIENTDB_USER -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./shutdown.sh >> {{ orientdb_log_dir }}/orientdb.log 2>&1 &"
|
||||
}
|
||||
|
||||
status() {
|
||||
|
|
|
@ -3,7 +3,7 @@ resource_registry_install: False
|
|||
resource_registry_upgrade: False
|
||||
resource_registry_gcube_repository: gcube-snapshots
|
||||
resource_registry_snapshot_ver: 1.2.0-SNAPSHOT
|
||||
resource_registry_version: 1.2.0-20161031.161302-32
|
||||
resource_registry_version: 1.2.0-20161102.112213-33
|
||||
resource_registry_name: resource-registry
|
||||
resource_registry_file: '{{ resource_registry_name }}-{{ resource_registry_version }}.war'
|
||||
resource_registry_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ resource_registry_gcube_repository }}/org/gcube/information-system/{{resource_registry_name}}/{{ resource_registry_snapshot_ver }}/{{ resource_registry_file }}'
|
||||
|
|
Loading…
Reference in New Issue