diff --git a/Backup.md b/Backup.md index 6a2825c..b9772cf 100644 --- a/Backup.md +++ b/Backup.md @@ -8,18 +8,15 @@ Restore is done via an init script in solr image, which checks the need of resto ![alt Architectural diagram](./SolrBackup.svg) - - -| Variable | Default | Comments | -|------------------------------------------------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------| -| RESTORE_FROM_BACKUP | none | Whether to attempt a restore from backup at startup | -| RESTORE_BACKUP_NAME | none | If provided, restores from that specific snapshot. If not provided, it's the last snapshot from the bucket. | -| JAVA_OPTS_S3_ENDPOINT=-DS3_ENDPOINT= | http://s3.eu-central-1.amazonaws.com | S3 endpoint | -| JAVA_OPTS_S3_BUCKET_NAME=-DS3_BUCKET_NAME= | test-bucket | S3 bucket | -| JAVA_OPTS_S3_REGION=-DS3_REGION= | eu-central-1 | S3 bucket region | -| JAVA_OPTS_AWS_ACCESS_KEY=-Daws.accessKeyId= | none | S3 access key | -| JAVA_OPTS_AWS_SECRET_KEY=-Daws.secretKey= | none | S3 secret key | - +| Variable | Default | Comments | +|---------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------| +| RESTORE_FROM_BACKUP | none | Whether to attempt a restore from backup at startup | +| RESTORE_BACKUP_NAME | none | If provided, restores from that specific snapshot. If not provided, it's the last snapshot from the bucket. | +| S3_ENDPOINT | http://s3.eu-central-1.amazonaws.com | S3 endpoint | +| S3_BUCKET_NAME | test-bucket | S3 bucket | +| S3_REGION | eu-central-1 | S3 bucket region | +| S3_ACCESS_KEY | none | S3 access key | +| S3_SECRET_KEY | none | S3 secret key | ### Communication via SSL In case communication to Solr requires mtls, certificates needed should be included in the backup container and in solr image. A set of default certificates is provided. \ No newline at end of file diff --git a/SolrBackup.svg b/SolrBackup.svg index c0402c0..54c99ed 100644 --- a/SolrBackup.svg +++ b/SolrBackup.svg @@ -1,3 +1,286 @@ -
Scheduler
Scheduler
Solr <stack1> instance 1
backup
Solr <stack1> instance...
Caringo Swarm
Caringo Swarm
backup 0 3 * * *
backup 0 3 * * *
/replication?command=backup&numberToKeep=3
/replication?command=backup&numberToKeep=3
restore
restore
restore-from-backup
restore-from-backup
solr
solr
/replication?command=restore
/replication?command=restore
restore-from-backup
restore-from-backup
solr
solr
/replication?command=restore
/replication?command=restore
backup
backup
Viewer does not support full SVG 1.1
\ No newline at end of file + + + + + + + + +
+
+
+ Scheduler +
+
+
+
+ + Scheduler + +
+
+ + + + +
+
+
+ Solr <stack1> instance 1
backup +
+
+
+
+ Solr + <stack1> instance... + +
+
+ + + + +
+
+
+ S3 Bucket +
+
+
+
+ + S3 Bucket + +
+
+ + + + + + + + +
+
+
+ backup 0 3 * * * +
+
+
+
+ + backup 0 3 * * * + +
+
+ + + + + + +
+
+
+ /replication?command=backup&numberToKeep=3 +
+
+
+
+ + /replication?command=backup&numberToKeep=3 + +
+
+ + + + + + +
+
+
+ restore +
+
+
+
+ + restore + +
+
+ + + + + + +
+
+
+ restore-from-backup +
+
+
+
+ + restore-from-backup + +
+
+ + + + +
+
+
+ solr +
+
+
+
+ + solr + +
+
+ + + + +
+
+
+ /replication?command=restore +
+
+
+
+ + /replication?command=restore + +
+
+ + + + + +
+
+
+ restore-from-backup +
+
+
+
+ + restore-from-backup + +
+
+ + + + +
+
+
+ solr +
+
+
+
+ solr + +
+
+ + + +
+
+
+ /replication?command=restore +
+
+
+
+ + /replication?command=restore + +
+
+ + + + + +
+
+
+ backup +
+
+
+
+ + backup + +
+
+
+ + + + Viewer does not support full SVG 1.1 + + +
\ No newline at end of file diff --git a/upstream/solr6/local/92-init-solr.sh b/upstream/solr6/local/92-init-solr.sh index d2c230c..0902199 100755 --- a/upstream/solr6/local/92-init-solr.sh +++ b/upstream/solr6/local/92-init-solr.sh @@ -229,7 +229,11 @@ echo "export SOLR_SOLR_DATA_DIR=${SOLR_DATA_DIR:-$SOLR_DATA_ROOT/index}" >>"$CON echo "export SOLR_SOLR_MODEL_DIR=${SOLR_MODEL_DIR:-$SOLR_DATA_ROOT/model}" >>"$CONFIG_FILE_SOLR_START" echo "export SOLR_SOLR_CONTENT_DIR=${SOLR_CONTENT_DIR:-$SOLR_DATA_ROOT/contentstore}" >>"$CONFIG_FILE_SOLR_START" -if [ $ALFRESCO_SSL != none ] && [ $ALFRESCO_SSL != secret ]; then +if [ "$ALFRESCO_SSL" == "secret" ]; then + setOption 'alfresco.secureComms.secret' "$ALFRESCO_SECRET" "$CONFIG_FILE_CORE" +fi + +if [ "$ALFRESCO_SSL" != "none" ] && [ "$ALFRESCO_SSL" != "secret" ]; then cp -r ${SOLR_DIR_ROOT}/keystore/* ${SOLR_DIR_ROOT}/templates/${TEMPLATE}/conf/ setOption 'SOLR_SSL_KEY_STORE_TYPE' "JCEKS" "$CONFIG_FILE_SOLR_START" diff --git a/xenit/build.gradle b/xenit/build.gradle index de37edc..5442a52 100644 --- a/xenit/build.gradle +++ b/xenit/build.gradle @@ -15,7 +15,7 @@ subprojects { ext { alfredTelemetryVersion = '0.10.1' actuatorsVersion = '0.0.7' - solrBackupVersion = '0.0.4' + solrBackupVersion = '0.0.5' composeDir = "${rootProject.projectDir}/src/integrationTest/resources"; // atm test without ssl enabled tests_use_ssl = false diff --git a/xenit/solr6/local/solr.xml b/xenit/solr6/local/solr.xml index 6319bb5..686d3b4 100644 --- a/xenit/solr6/local/solr.xml +++ b/xenit/solr6/local/solr.xml @@ -7,6 +7,10 @@ ${S3_BUCKET_NAME:test-bucket} ${S3_ENDPOINT:http://s3.eu-central-1.amazonaws.com} ${S3_REGION:eu-central-1} + ${S3_ACCESS_KEY:} + ${S3_SECRET_KEY:} + ${S3_PROXY_HOST:} + ${S3_PROXY_PORT:0}