diff --git a/R/tasks/r-installation.yml b/R/tasks/r-installation.yml
index 93af5b3..c87ec14 100644
--- a/R/tasks/r-installation.yml
+++ b/R/tasks/r-installation.yml
@@ -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"
diff --git a/letsencrypt-acmetool-client/tasks/main.yml b/letsencrypt-acmetool-client/tasks/main.yml
index 7b7a3e5..f629569 100644
--- a/letsencrypt-acmetool-client/tasks/main.yml
+++ b/letsencrypt-acmetool-client/tasks/main.yml
@@ -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
diff --git a/orientdb/defaults/main.yml b/orientdb/defaults/main.yml
index b264abd..d163e13 100644
--- a/orientdb/defaults/main.yml
+++ b/orientdb/defaults/main.yml
@@ -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
\ No newline at end of file
diff --git a/orientdb/tasks/main.yml b/orientdb/tasks/main.yml
index 9bf01cc..8eb69e1 100644
--- a/orientdb/tasks/main.yml
+++ b/orientdb/tasks/main.yml
@@ -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
diff --git a/orientdb/templates/automatic-backup.json.j2 b/orientdb/templates/automatic-backup.json.j2
new file mode 100644
index 0000000..398b642
--- /dev/null
+++ b/orientdb/templates/automatic-backup.json.j2
@@ -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 }}
+}
\ No newline at end of file
diff --git a/orientdb/templates/orientdb-server-config.xml.j2 b/orientdb/templates/orientdb-server-config.xml.j2
index c856dc3..7c70423 100644
--- a/orientdb/templates/orientdb-server-config.xml.j2
+++ b/orientdb/templates/orientdb-server-config.xml.j2
@@ -9,12 +9,8 @@
- {% if orientdb_distributed %}
-
- {% else %}
-
- {% endif %}
-
+
+
@@ -27,7 +23,7 @@
-
+
@@ -90,6 +86,7 @@
+
diff --git a/orientdb/templates/orientdb.init.j2 b/orientdb/templates/orientdb.init.j2
index eefc591..0ad1f4c 100755
--- a/orientdb/templates/orientdb.init.j2
+++ b/orientdb/templates/orientdb.init.j2
@@ -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() {
diff --git a/smartgears/resource_registry/defaults/main.yml b/smartgears/resource_registry/defaults/main.yml
index c2e0bcb..8e3fce6 100644
--- a/smartgears/resource_registry/defaults/main.yml
+++ b/smartgears/resource_registry/defaults/main.yml
@@ -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 }}'