Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configbaker container #9574

Merged
merged 37 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a55d6b6
feat(ct): add first elements of gdcc/configbaker
poikilotherm May 4, 2023
232b1af
feat(ct): print script descriptions in help of configbaker
poikilotherm May 4, 2023
18f2137
refactor(setup): enable overriding target url for setup scripts
poikilotherm May 9, 2023
10505a0
refactor(setup): ensure relative paths in setup scripts
poikilotherm May 9, 2023
f7a7c42
feat(ct): add Solr configset to configbaker
poikilotherm May 9, 2023
b9ea230
refactor(ct): make configbaker buildable via Maven
poikilotherm May 9, 2023
4e13b39
feat(ct): enable bootstrapping of instances
poikilotherm May 9, 2023
ceddf70
feat(ct): add configbaker based bootstrap init to compose
poikilotherm May 9, 2023
36a43ac
Merge branch 'develop' into 9573-configbaker
poikilotherm May 9, 2023
920770a
add docs #9573
pdurbin May 25, 2023
ae87556
add comments to scripts #9573
pdurbin May 25, 2023
9e4fcce
simplify dev usage, add quickstart #9573
pdurbin May 25, 2023
13f92f0
stop clearing out Solr on install #9573
pdurbin May 25, 2023
63811cc
Merge branch 'develop' into 9573-configbaker
poikilotherm May 25, 2023
590763b
chore(build): update Docker Maven Plugin to 0.43.0
poikilotherm May 25, 2023
e8ebd8f
feat(ct): make configbaker bootstrap list available personas in help …
poikilotherm May 30, 2023
4014438
ci: add configbaker to shellcheck workflow
poikilotherm May 30, 2023
c7210d6
ci: add PR write perm to shellcheck flow
poikilotherm May 30, 2023
8e51e98
ci: exclude lots of old scripts from shellcheck
poikilotherm May 30, 2023
77a395c
fix(scripts): remove little shellcheck annotated problems in setup-al…
poikilotherm May 30, 2023
b54431b
fix(scripts): suppress false positiv by shellcheck in configbaker hel…
poikilotherm May 30, 2023
d06e03f
fix(ct): rename permission fix script as per review
poikilotherm May 30, 2023
16ea1d1
docs(ct): extend description tag of configbaker image
poikilotherm May 30, 2023
d672e32
build(ct): skip running a second bootstrap container
poikilotherm May 30, 2023
969bd2f
feat(ct): switch compose file to use configbaker for Solr
poikilotherm May 30, 2023
36e4e87
fix(ct): make configbaker solr initializer command compatible with co…
poikilotherm May 30, 2023
415cfd4
docs(ct): fix source tag for configbake image
poikilotherm May 30, 2023
8f7c1d8
Merge branch 'develop' into 9573-configbaker
poikilotherm May 30, 2023
c8198a7
Merge branch 'develop' into 9573-configbaker
poikilotherm May 30, 2023
044e93a
ci(ct): push description of configbaker to Docker Hub, too
poikilotherm May 30, 2023
bf0a43f
ci(ct): fix wording to include configbaker, too.
poikilotherm May 30, 2023
cfe167a
docs(solr,ct): add info comment to field update script
poikilotherm May 31, 2023
32f0977
feat(ct): include Solr field update script in configbaker
poikilotherm May 31, 2023
fdc9b39
docs(admin): add anchor to metadata block customization solr update d…
poikilotherm May 31, 2023
b37d501
docs(ct): extend container guide on configbaker image
poikilotherm May 31, 2023
47f949d
docs(ct): make renaming of ConfigBaker to Config Baker consistent
poikilotherm May 31, 2023
3ab1394
small doc tweaks #9573
pdurbin May 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions modules/container-configbaker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2023 Forschungszentrum Jülich GmbH
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0

FROM alpine:3

ENV SCRIPT_DIR="/scripts"
ENV SECRETS_DIR="/secrets"
ENV PATH="${PATH}:${SCRIPT_DIR}"

ARG APK_PACKAGES="curl bind-tools netcat-openbsd jq bash dumb-init wait4x"

RUN <<EOT
apk add --no-cache ${APK_PACKAGES}

mkdir ${SCRIPT_DIR} ${SECRETS_DIR}
EOT

COPY scripts/* ${SCRIPT_DIR}/

# Copy the Solr config bits
# Copy the scripts/api things



RUN chmod +x scripts/*.sh

# Set the entrypoint to tini (as a process supervisor)
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# By default run a script that will print a help message and terminate
CMD ["help.sh"]

LABEL org.opencontainers.image.created="@git.build.time@" \
org.opencontainers.image.authors="Research Data Management at FZJ <forschungsdaten@fz-juelich.de>" \
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
org.opencontainers.image.url="https://guides.dataverse.org/en/latest/container/" \
org.opencontainers.image.documentation="https://guides.dataverse.org/en/latest/container/" \
org.opencontainers.image.source="https://github.com/IQSS/dataverse/tree/develop/modules/container-base" \
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
org.opencontainers.image.version="@project.version@" \
org.opencontainers.image.revision="@git.commit.id.abbrev@" \
org.opencontainers.image.vendor="Global Dataverse Community Consortium" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.title="Dataverse Base Image" \
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
org.opencontainers.image.description="This container image provides an application server tuned for Dataverse software"
3 changes: 3 additions & 0 deletions modules/container-configbaker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ConfigBaker

This is a placeholder. Needs more info about it.
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
62 changes: 62 additions & 0 deletions modules/container-configbaker/scripts/fix-fs-permissions.sh
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

# [INFO]: Fix folder permissions using 'chown' to be writeable by containers not running as root.
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved

set -euo pipefail

if [[ "$(id -un)" != "root" ]]; then
echo "This script must be run as user root (not $(id -un)), otherwise no fix is possible."
fi

DEF_DV_PATH="/dv"
DEF_SOLR_PATH="/var/solr"
DEF_DV_UID="1000"
DEF_SOLR_UID="8983"

function usage() {
echo "Usage: $(basename "$0") (dv|solr|[1-9][0-9]{3,4}) [PATH [PATH [...]]]"
echo ""
echo "You may omit a path when using 'dv' or 'solr' as first argument:"
echo " - 'dv' will default to user $DEF_DV_UID and $DEF_DV_PATH"
echo " - 'solr' will default to user $DEF_SOLR_UID and $DEF_SOLR_PATH"
exit 1
}

# Get a target name or id
TARGET=${1:-help}
# Get the rest of the arguments as paths to apply the fix to
PATHS=( "${@:2}" )

ID=0
case "$TARGET" in
dv)
ID="$DEF_DV_UID"
# If there is no path, add the default for our app image
if [[ ${#PATHS[@]} -eq 0 ]]; then
PATHS=( "$DEF_DV_PATH" )
fi
;;
solr)
ID="$DEF_SOLR_UID"
# In case there is no path, add the default path for Solr images
if [[ ${#PATHS[@]} -eq 0 ]]; then
PATHS=( "$DEF_SOLR_PATH" )
fi
;;
# If there is a digit in the argument, check if this is a valid UID (>= 1000, ...)
*[[:digit:]]* )
echo "$TARGET" | grep -q "^[1-9][0-9]\{3,4\}$" || usage
ID="$TARGET"
;;
*)
usage
;;
esac

# Check that we actually have at least 1 path
if [[ ${#PATHS[@]} -eq 0 ]]; then
usage
fi

# Do what we came for
chown -R "$ID:$ID" "${PATHS[@]}"
32 changes: 32 additions & 0 deletions modules/container-configbaker/scripts/help.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

set -euo pipefail

# [INFO]: This script.

poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
echo -e ' ╓mαo\n ╫ jh\n `%╥æ╨\n ╫µ\n ╓@M%╗,\n ▓` ╫U\n ▓² ╫╛\n ▓M#M╝"\n ┌æM╝╝%φ╫┘\n┌╫" "╫┐\n▓ ▓\n▓ ▓\n`╫µ ¿╫"\n "╜%%MM╜`'
echo ""
echo "Hello!"
echo ""
echo "I'm ConfigBaker, a container image with lots of tooling to 'bake' a containerized Dataverse instance!"
pdurbin marked this conversation as resolved.
Show resolved Hide resolved
echo "I can cook up an instance (initial config), put icing on your Solr search index configuration, and more!"
echo ""
echo "Here's a list of things I can do for you:"

# Get the longest name length
LENGTH=1
for SCRIPT in "${SCRIPT_DIR}"/*.sh; do
L="$(basename "$SCRIPT" | wc -m)"
if [ "$L" -gt "$LENGTH" ]; then
LENGTH="$L"
fi
done

# Print script names and info, but formatted
for SCRIPT in "${SCRIPT_DIR}"/*.sh; do
printf "%${LENGTH}s - " "$(basename "$SCRIPT")"
grep "# \[INFO\]: " "$SCRIPT" | sed -e "s|# \[INFO\]: ||"
done

echo ""
echo "Simply execute this container with the script name (and potentially arguments) as 'command'."
53 changes: 29 additions & 24 deletions scripts/api/setup-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
SECURESETUP=1
DV_SU_PASSWORD="admin"

DATAVERSE_URL=${DATAVERSE_URL:-"http://localhost:8080"}
# Make sure scripts we call from this one also get this env var!
export DATAVERSE_URL
SOLR_URL=${SOLR_URL:-"http://localhost:8983"}

SCRIPT_PATH="$(dirname "$0")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SCRIPT_PATH="$(dirname "$0")"
# scripts/api when called from the root of the source tree
SCRIPT_PATH="$(dirname "$0")"


for opt in $*
do
case $opt in
Expand All @@ -27,9 +34,7 @@ done
command -v jq >/dev/null 2>&1 || { echo >&2 '`jq` ("sed for JSON") is required, but not installed. Download the binary for your platform from http://stedolan.github.io/jq/ and make sure it is in your $PATH (/usr/bin/jq is fine) and executable with `sudo chmod +x /usr/bin/jq`. On Mac, you can install it with `brew install jq` if you use homebrew: http://brew.sh . Aborting.'; exit 1; }

echo "deleting all data from Solr"
curl http://localhost:8983/solr/collection1/update/json?commit=true -H "Content-type: application/json" -X POST -d "{\"delete\": { \"query\":\"*:*\"}}"

SERVER=http://localhost:8080/api
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it strictly necessary to remove the hard coded 8080 in this and other setup scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm awfully sorry me lad, but yes it is.

When you run this script inside a container which is not the application server itself, localhost is that container and not the app server. It's like a different machine. If you run this on the host, this works because of the mapped ports, but this will not work on a Windows host.

Sorry, hardcoding it never was a good idea, same as the paths not being relative to the script location.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW Jenkins made it to the end, so I'm pretty sure I didn't break the scripts 😄

curl "${SOLR_URL}/solr/collection1/update/json?commit=true" -H "Content-type: application/json" -X POST -d "{\"delete\": { \"query\":\"*:*\"}}"
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved

# Everything + the kitchen sink, in a single script
# - Setup the metadata blocks and controlled vocabulary
Expand All @@ -41,49 +46,49 @@ SERVER=http://localhost:8080/api


echo "Setup the metadata blocks"
./setup-datasetfields.sh
"$SCRIPT_PATH"/setup-datasetfields.sh

echo "Setup the builtin roles"
./setup-builtin-roles.sh
"$SCRIPT_PATH"/setup-builtin-roles.sh

echo "Setup the authentication providers"
./setup-identity-providers.sh
"$SCRIPT_PATH"/setup-identity-providers.sh

echo "Setting up the settings"
echo "- Allow internal signup"
curl -X PUT -d yes "$SERVER/admin/settings/:AllowSignUp"
curl -X PUT -d /dataverseuser.xhtml?editMode=CREATE "$SERVER/admin/settings/:SignUpUrl"

curl -X PUT -d doi "$SERVER/admin/settings/:Protocol"
curl -X PUT -d 10.5072 "$SERVER/admin/settings/:Authority"
curl -X PUT -d "FK2/" "$SERVER/admin/settings/:Shoulder"
curl -X PUT -d DataCite "$SERVER/admin/settings/:DoiProvider"
curl -X PUT -d burrito $SERVER/admin/settings/BuiltinUsers.KEY
curl -X PUT -d localhost-only $SERVER/admin/settings/:BlockedApiPolicy
curl -X PUT -d 'native/http' $SERVER/admin/settings/:UploadMethods
curl -X PUT -d yes "${DATAVERSE_URL}/api/admin/settings/:AllowSignUp"
curl -X PUT -d "/dataverseuser.xhtml?editMode=CREATE" "${DATAVERSE_URL}/api/admin/settings/:SignUpUrl"

curl -X PUT -d doi "${DATAVERSE_URL}/api/admin/settings/:Protocol"
curl -X PUT -d 10.5072 "${DATAVERSE_URL}/api/admin/settings/:Authority"
curl -X PUT -d "FK2/" "${DATAVERSE_URL}/api/admin/settings/:Shoulder"
curl -X PUT -d DataCite "${DATAVERSE_URL}/api/admin/settings/:DoiProvider"
curl -X PUT -d burrito "${DATAVERSE_URL}/api/admin/settings/BuiltinUsers.KEY"
curl -X PUT -d localhost-only "${DATAVERSE_URL}/api/admin/settings/:BlockedApiPolicy"
curl -X PUT -d 'native/http' "${DATAVERSE_URL}/api/admin/settings/:UploadMethods"
echo

echo "Setting up the admin user (and as superuser)"
adminResp=$(curl -s -H "Content-type:application/json" -X POST -d @data/user-admin.json "$SERVER/builtin-users?password=$DV_SU_PASSWORD&key=burrito")
adminResp=$(curl -s -H "Content-type:application/json" -X POST -d @"$SCRIPT_PATH"/data/user-admin.json "${DATAVERSE_URL}/api/builtin-users?password=$DV_SU_PASSWORD&key=burrito")
echo $adminResp
curl -X POST "$SERVER/admin/superuser/dataverseAdmin"
curl -X POST "${DATAVERSE_URL}/api/admin/superuser/dataverseAdmin"
echo

echo "Setting up the root dataverse"
adminKey=$(echo $adminResp | jq .data.apiToken | tr -d \")
curl -s -H "Content-type:application/json" -X POST -d @data/dv-root.json "$SERVER/dataverses/?key=$adminKey"
curl -s -H "Content-type:application/json" -X POST -d @"$SCRIPT_PATH"/data/dv-root.json "${DATAVERSE_URL}/api/dataverses/?key=$adminKey"
echo
echo "Set the metadata block for Root"
curl -s -X POST -H "Content-type:application/json" -d "[\"citation\"]" $SERVER/dataverses/:root/metadatablocks/?key=$adminKey
curl -s -X POST -H "Content-type:application/json" -d "[\"citation\"]" "${DATAVERSE_URL}/api/dataverses/:root/metadatablocks/?key=$adminKey"
echo
echo "Set the default facets for Root"
curl -s -X POST -H "Content-type:application/json" -d "[\"authorName\",\"subject\",\"keywordValue\",\"dateOfDeposit\"]" $SERVER/dataverses/:root/facets/?key=$adminKey
curl -s -X POST -H "Content-type:application/json" -d "[\"authorName\",\"subject\",\"keywordValue\",\"dateOfDeposit\"]" "${DATAVERSE_URL}/api/dataverses/:root/facets/?key=$adminKey"
echo

echo "Set up licenses"
# Note: CC0 has been added and set as the default license through
# Flyway script V5.9.0.1__7440-configurable-license-list.sql
curl -X POST -H 'Content-Type: application/json' -H "X-Dataverse-key:$adminKey" $SERVER/licenses --upload-file data/licenses/licenseCC-BY-4.0.json
curl -X POST -H 'Content-Type: application/json' -H "X-Dataverse-key:$adminKey" "${DATAVERSE_URL}/api/licenses" --upload-file "$SCRIPT_PATH"/data/licenses/licenseCC-BY-4.0.json

# OPTIONAL USERS AND DATAVERSES
#./setup-optional.sh
Expand All @@ -92,8 +97,8 @@ if [ $SECURESETUP = 1 ]
then
# Revoke the "burrito" super-key;
# Block sensitive API endpoints;
curl -X DELETE $SERVER/admin/settings/BuiltinUsers.KEY
curl -X PUT -d 'admin,builtin-users' $SERVER/admin/settings/:BlockedApiEndpoints
curl -X DELETE "${DATAVERSE_URL}/api/admin/settings/BuiltinUsers.KEY"
curl -X PUT -d 'admin,builtin-users' "${DATAVERSE_URL}/api/admin/settings/:BlockedApiEndpoints"
echo "Access to the /api/admin and /api/test is now disabled, except for connections from localhost."
else
echo "IMPORTANT!!!"
Expand Down
21 changes: 12 additions & 9 deletions scripts/api/setup-builtin-roles.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
SERVER=http://localhost:8080/api
#!/bin/bash

DATAVERSE_URL=${DATAVERSE_URL:-"http://localhost:8080"}
SCRIPT_PATH="$(dirname "$0")"

# Setup the builtin roles
echo "Setting up admin role"
curl -H "Content-type:application/json" -d @data/role-admin.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-admin.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up file downloader role"
curl -H "Content-type:application/json" -d @data/role-filedownloader.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-filedownloader.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up full contributor role"
curl -H "Content-type:application/json" -d @data/role-fullContributor.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-fullContributor.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up dv contributor role"
curl -H "Content-type:application/json" -d @data/role-dvContributor.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-dvContributor.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up ds contributor role"
curl -H "Content-type:application/json" -d @data/role-dsContributor.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-dsContributor.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up editor role"
curl -H "Content-type:application/json" -d @data/role-editor.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-editor.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up curator role"
curl -H "Content-type:application/json" -d @data/role-curator.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-curator.json "${DATAVERSE_URL}/api/admin/roles/"
echo

echo "Setting up member role"
curl -H "Content-type:application/json" -d @data/role-member.json http://localhost:8080/api/admin/roles/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/role-member.json "${DATAVERSE_URL}/api/admin/roles/"
echo
20 changes: 12 additions & 8 deletions scripts/api/setup-datasetfields.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/sh
curl http://localhost:8080/api/admin/datasetfield/loadNAControlledVocabularyValue
#!/bin/bash

DATAVERSE_URL=${DATAVERSE_URL:-"http://localhost:8080"}
SCRIPT_PATH="$(dirname "$0")"

curl "${DATAVERSE_URL}/api/admin/datasetfield/loadNAControlledVocabularyValue"
# TODO: The "@" is confusing. Consider switching to --upload-file citation.tsv
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/citation.tsv -H "Content-type: text/tab-separated-values"
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/geospatial.tsv -H "Content-type: text/tab-separated-values"
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/social_science.tsv -H "Content-type: text/tab-separated-values"
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/astrophysics.tsv -H "Content-type: text/tab-separated-values"
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/biomedical.tsv -H "Content-type: text/tab-separated-values"
curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @data/metadatablocks/journals.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/citation.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/geospatial.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/social_science.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/astrophysics.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/biomedical.tsv -H "Content-type: text/tab-separated-values"
curl "${DATAVERSE_URL}/api/admin/datasetfield/load" -X POST --data-binary @"$SCRIPT_PATH"/data/metadatablocks/journals.tsv -H "Content-type: text/tab-separated-values"
7 changes: 5 additions & 2 deletions scripts/api/setup-identity-providers.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
SERVER=http://localhost:8080/api
#!/bin/bash

DATAVERSE_URL=${DATAVERSE_URL:-"http://localhost:8080"}
SCRIPT_PATH="$(dirname "$0")"

# Setup the authentication providers
echo "Setting up internal user provider"
curl -H "Content-type:application/json" -d @data/authentication-providers/builtin.json http://localhost:8080/api/admin/authenticationProviders/
curl -H "Content-type:application/json" -d @"$SCRIPT_PATH"/data/authentication-providers/builtin.json "${DATAVERSE_URL}/api/admin/authenticationProviders/"

#echo "Setting up Echo providers"
#curl -H "Content-type:application/json" -d @data/authentication-providers/echo.json http://localhost:8080/api/admin/authenticationProviders/
Expand Down