diff --git a/deployments/examples/bare-metal-simple/README.md b/deployments/examples/bare-metal-simple/README.md index cc52dc7f1..c27c224fe 100644 --- a/deployments/examples/bare-metal-simple/README.md +++ b/deployments/examples/bare-metal-simple/README.md @@ -26,6 +26,18 @@ This script should **NOT** be run as user root. Set the environment variable `OC_VERSION` to the version you want to download. If not set, there is a reasonable default. +## Data Location + +Set the environment variable `OC_BASE_DIR` to a directory where the +`data` and `config` subdirectories shall be located. Per default, +both configuration and storage data are within a sandbox subdirectory +in the current working directory. + +## Server Address + +Set the environment variable `OC_HOST` to the fully qualified hostname +of this server to allow remote accesse. Default: `localhost`. + # Example Call diff --git a/deployments/examples/bare-metal-simple/install.sh b/deployments/examples/bare-metal-simple/install.sh index e0cd69c86..71e7ce843 100755 --- a/deployments/examples/bare-metal-simple/install.sh +++ b/deployments/examples/bare-metal-simple/install.sh @@ -69,14 +69,14 @@ echo "Downloading ${dlurl}/${dlfile}" curl -L -o "${dlfile}" --progress-bar "${dlurl}/${dlfile}" chmod 755 ${dlfile} -mkdir data config - -export OC_CONFIG_DIR="$(pwd)/config" -export OC_BASE_DATA_PATH="$(pwd)/data" +basedir="${OC_BASE_DIR:-$(pwd)}" +export OC_CONFIG_DIR="$basedir/config" +export OC_BASE_DATA_PATH="$basedir/data" +mkdir -p "$OC_CONFIG_DIR" "$OC_BASE_DATA_PATH" # It is bound to localhost for now to deal with non existing routes # to certain host names for example in WSL -host="localhost" +host="${OC_HOST:-localhost}" ./${dlfile} init --insecure yes --ap admin