Skip to content

Commit

Permalink
dataverse-k8s: remove reference_data.sql loading from bootstrap, as I…
Browse files Browse the repository at this point in the history
…QSS#7256 introduced a migration for this.
  • Loading branch information
poikilotherm committed Aug 23, 2021
1 parent 8ca692e commit c5ac53e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion conf/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN mkdir -p ${DATA_DIR} ${METADATA_DIR} ${DOCROOT_DIR} ${SECRETS_DIR} ${DUMPS_D

# Install prerequisites
RUN apt-get -qq update && \
apt-get -qqy install postgresql-client jq imagemagick curl wget unzip && \
apt-get -qqy install jq imagemagick curl wget unzip && \
rm -rf /var/lib/apt/lists/*

# Install esh template engine from Github
Expand Down
13 changes: 1 addition & 12 deletions conf/container/scripts/bootstrap-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ DATAVERSE_URL=${DATAVERSE_URL:-"http://${DATAVERSE_SERVICE_HOST}:${DATAVERSE_SER
# option to override.
SOLR_K8S_HOST=${SOLR_K8S_HOST:-"solr"}

# Check postgres and API key secrets are available
if [ ! -s "${SECRETS_DIR}/db/password" ]; then
echo "No database password present. Failing."
exit 126
fi
# Check API key secret is available
if [ ! -s "${SECRETS_DIR}/api/key" ]; then
echo "No API key present. Failing."
exit 126
Expand All @@ -35,13 +31,6 @@ if [ -s "${SECRETS_DIR}/admin/password" ]; then
ADMIN_PASSWORD=`cat ${SECRETS_DIR}/admin/password`
fi

# Drop the Postgres credentials into .pgpass
echo "${POSTGRES_SERVER}:*:*:${POSTGRES_USER}:`cat ${SECRETS_DIR}/db/password`" > ${HOME_DIR}/.pgpass
chmod 0600 ${HOME_DIR}/.pgpass

# 1.) Load SQL data
psql -h ${POSTGRES_SERVER} -U ${POSTGRES_USER} ${POSTGRES_DATABASE} < ${DEPLOY_DIR}/dataverse/supplements/reference_data.sql

# 2) Initialize common data structures to make Dataverse usable
cd ${DEPLOY_DIR}/dataverse/supplements
# 2a) Patch load scripts with k8s based URL
Expand Down

0 comments on commit c5ac53e

Please sign in to comment.