Skip to content

Commit

Permalink
Configure the extent to be in Unicode comparison mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Aug 23, 2023
1 parent 029f5bf commit 05df4aa
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 10 deletions.
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ You can configure some things with environment variables:
- `STONE_PORT` Stone service port. Defaults to `50385`
- `GEMSTONE_NRS_ALL` Defaults to `#netldi:gs64ldi#dir:/opt/gemstone/logs/#log:/opt/gemstone/logs/%N_%P.log`
- `GS_FORCE_CLEAN_LOG_FILE_DELETE` Defaults to `true`
- `DATA_CURATOR_PASSWORD` Password of the `DataCurator` user, used for stopping
- `GS64_DATA_CURATOR_PASSWORD` Password of the `DataCurator` user, used for stopping
the services. Defaults to `swordfish`.
- `STOPSTONE_TIMEOUT_SECONDS` time-out in seconds to wait for `stopstone`
- `GS64_SYSTEM_USER_PASSWORD` Password of the `SystemUser` user, used for configuring
the Unicode comparison mode in the repository. Defaults to `swordfish`.
- `GS64_STOPSTONE_TIMEOUT_SECONDS` time-out in seconds to wait for `stopstone`
command to finish. Defaults to 8

## Important directories and files
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/how-to-load-rowan-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ The script supports the following configuration:
the project to load
- `GS64_CI_SPEC` is optional. It's the name of the spec file to load.
Defaults to `${GS64_CI_PROJECT_NAME}-CI`
- `GS64_CI_SYSTEM_USER_PASSWORD` is optional. The password for the `SystemUser`
- `GS64_SYSTEM_USER_PASSWORD` is optional. The password for the `SystemUser`
account in the mounted extent. Defaults to `swordfish`.
2 changes: 1 addition & 1 deletion docs/how-to/how-to-run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ docker exec -it examples-stone-1 ./run-tests.sh Buoy
The script supports the following configuration:

- The only accepted script argument is the rowan-aware project name
- `GS64_CI_SYSTEM_USER_PASSWORD` is optional. The password for the `SystemUser`
- `GS64_SYSTEM_USER_PASSWORD` is optional. The password for the `SystemUser`
account in the mounted extent. Defaults to `swordfish`.
6 changes: 4 additions & 2 deletions source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ ENV NETLDI_PORT=50384
ENV STONE_SERVICE_NAME=gs64stone
ENV STONE_PORT=50385

ENV DATA_CURATOR_PASSWORD=swordfish
ENV GS64_DATA_CURATOR_PASSWORD=swordfish
ENV GS64_SYSTEM_USER_PASSWORD=swordfish
# By default `docker stop` will wait 10 seconds for the container to handle
# SIGTERM signals, after the grace period docker will send a SIGKILL.
# By default we wait 8 seconds to allow a clean shutdown of the Stone.
# If your installation needs a greater timeout change the docker wait time
# and this timet-out in consequence
ENV STOPSTONE_TIMEOUT_SECONDS=8
ENV GS64_STOPSTONE_TIMEOUT_SECONDS=8

ENV GS_FORCE_CLEAN_LOG_FILE_DELETE=true
ENV GEMSTONE_NRS_ALL=#netldi:$NETLDI_SERVICE_NAME#dir:$GEMSTONE_LOG_DIR/#log:$GEMSTONE_LOG_DIR/%N_%P.log
Expand Down Expand Up @@ -139,6 +140,7 @@ RUN apt-get update \
ENV ROWAN_PROJECTS_HOME=${GEMSTONE_GLOBAL_DIR}/projects

RUN install -d --owner=${GS_USER} --group=users ${ROWAN_PROJECTS_HOME}
COPY --chown=${GS_USER}:users configure.sh ${GEMSTONE_GLOBAL_DIR}/configure.sh
COPY --chown=${GS_USER}:users load-rowan-project.sh ${GEMSTONE_GLOBAL_DIR}/load-rowan-project.sh
COPY --chown=${GS_USER}:users run-tests.sh ${GEMSTONE_GLOBAL_DIR}/run-tests.sh
COPY --chown=${GS_USER}:users StdOutPrinter.gs ${GEMSTONE_GLOBAL_DIR}/StdOutPrinter.gs
Expand Down
21 changes: 21 additions & 0 deletions source/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -e

readonly SYSTEM_USER_PASSWORD="${GS64_SYSTEM_USER_PASSWORD:-swordfish}"

echo "Configuring GS Repository..."

topaz -i -q <<EOF > "${GEMSTONE_LOG_DIR}/configuring-repository.log"
set gemstone gs64stone user SystemUser pass ${SYSTEM_USER_PASSWORD}
iferror exit 1
login
doit
StringConfiguration enableUnicodeComparisonMode
%
commit
logout
exit 0
EOF

echo "Configuring GS Repository... [FINISHED]"
2 changes: 1 addition & 1 deletion source/load-rowan-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
readonly LRP_LOAD_SPEC="${GS64_CI_SPEC:-${LRP_PROJECT_NAME}-CI}"
fi

readonly SYSTEM_USER_PASSWORD="${GS64_CI_SYSTEM_USER_PASSWORD:-swordfish}"
readonly SYSTEM_USER_PASSWORD="${GS64_SYSTEM_USER_PASSWORD:-swordfish}"

echo "Loading code in GS..."
echo " Project Name: ${LRP_PROJECT_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion source/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

readonly PROJECT_NAME=$1
readonly SYSTEM_USER_PASSWORD="${GS64_CI_SYSTEM_USER_PASSWORD:-swordfish}"
readonly SYSTEM_USER_PASSWORD="${GS64_SYSTEM_USER_PASSWORD:-swordfish}"

echo "Running ${PROJECT_NAME} tests..."

Expand Down
8 changes: 6 additions & 2 deletions source/start-gemstone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ sigterm_handler() {
stopnetldi
stopstone \
-i \
-t "${STOPSTONE_TIMEOUT_SECONDS}" \
-t "${GS64_STOPSTONE_TIMEOUT_SECONDS}" \
"$STONE_SERVICE_NAME" \
DataCurator \
"${DATA_CURATOR_PASSWORD}"
"${GS64_DATA_CURATOR_PASSWORD}"
exit 143; # 128 + 15 -- SIGTERM
}

Expand Down Expand Up @@ -43,6 +43,10 @@ startstone \
# list GemStone servers
gslist -cvl

# Configure GS repository

"${GEMSTONE_GLOBAL_DIR}"/configure.sh

# wait forever, (loop to handle multiple signals if needed)
while true
do
Expand Down

0 comments on commit 05df4aa

Please sign in to comment.