-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adhoc benchmarks from dh core branch or image (#275)
- Loading branch information
Showing
11 changed files
with
193 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Build a local docker image on the remote side | ||
# Ensure the docker image is running in the Deephaven directory | ||
|
||
HOST=`hostname` | ||
GIT_DIR=/root/git | ||
DEEPHAVEN_DIR=/root/deephaven | ||
DEEPHAVEN_VERSION_FILE=${GIT_DIR}/deephaven-core/build/version | ||
|
||
if [ ! -d "${DEEPHAVEN_DIR}" ]; then | ||
echo "$0: Missing one or more Benchmark setup directories" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "${DEEPHAVEN_VERSION_FILE}" ]; then | ||
echo "$0: Missing Deephaven version file. Was the project built first?" | ||
exit 1 | ||
fi | ||
|
||
title () { echo; echo $1; } | ||
|
||
title "- Setting up Remote Docker Image on ${HOST} -" | ||
|
||
title "-- Building Deephaven Docker Image --" | ||
export DEEPHAVEN_VERSION=$(cat ${DEEPHAVEN_VERSION_FILE}) | ||
cd ${GIT_DIR}/deephaven-server-docker | ||
cp ${GIT_DIR}/deephaven-core/server/jetty-app/build/distributions/server-jetty-*.tar contexts/server/ | ||
cp ${GIT_DIR}/deephaven-core/server/jetty-app/build/distributions/server-jetty-*.tar contexts/server-slim/ | ||
cp ${GIT_DIR}/deephaven-core/py/server/build/wheel/deephaven_core-*-py3-none-any.whl contexts/server/ | ||
|
||
export DEEPHAVEN_SOURCES=custom | ||
export DEEPHAVEN_CORE_WHEEL=$(find . -type f -name "*.whl" | xargs -n 1 basename) | ||
export TAG=benchmark-local | ||
|
||
echo "DEEPHAVEN_VERSION: ${DEEPHAVEN_VERSION}" | ||
echo "DEEPHAVEN_CORE_WHEEL: ${DEEPHAVEN_CORE_WHEEL}" | ||
docker buildx bake -f server.hcl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Assemble the Deephaven server artifacts on the remote side if needed | ||
# The supplied argument can be an image name or <owner>::<branch> | ||
# Ensure that the artifacts and Deephaven version are available in standard directories | ||
|
||
HOST=`hostname` | ||
GIT_DIR=/root/git | ||
DEEPHAVEN_DIR=/root/deephaven | ||
DOCKER_IMG=$1 | ||
BRANCH_DELIM="::" | ||
BUILD_JAVA=temurin-11-jdk-amd64 | ||
|
||
if [ ! -d "${DEEPHAVEN_DIR}" ]; then | ||
echo "$0: Missing one or more Benchmark setup directories" | ||
exit 1 | ||
fi | ||
|
||
if [[ $# != 1 ]]; then | ||
echo "$0: Missing docker image/branch argument" | ||
exit 1 | ||
fi | ||
|
||
title () { echo; echo $1; } | ||
|
||
readarray -d "${BRANCH_DELIM}" -t splitarr <<< "${DOCKER_IMG}" | ||
OWNER=${splitarr[0]} | ||
BRANCH_NAME=${splitarr[1]} | ||
|
||
title "-- Cloning deephaven-core --" | ||
cd ${GIT_DIR} | ||
rm -rf deephaven-core | ||
git clone https://github.com/${OWNER}/deephaven-core.git | ||
cd deephaven-core | ||
git checkout ${BRANCH_NAME} | ||
|
||
title "-- Cloning deephaven-server-docker --" | ||
cd ${GIT_DIR} | ||
rm -rf deephaven-server-docker | ||
git clone https://github.com/deephaven/deephaven-server-docker.git | ||
cd deephaven-server-docker | ||
git checkout main | ||
|
||
title "-- Assembling Python Deephaven Core Server --" | ||
cd ${GIT_DIR}/deephaven-core | ||
OLD_JAVA_HOME="${JAVA_HOME}" | ||
export JAVA_HOME=/usr/lib/jvm/${BUILD_JAVA} | ||
|
||
echo "org.gradle.daemon=false" >> gradle.properties | ||
./gradlew outputVersion server-jetty-app:assemble py-server:assemble | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# Start or Stop a Deephaven image based on the given directive and image/branch name | ||
# The directives argument can be start or stop | ||
# The supplied image argument can be an image name or <owner>::<branch> | ||
|
||
HOST=`hostname` | ||
DEEPHAVEN_DIR=/root/deephaven | ||
DIRECTIVE=$1 | ||
DOCKER_IMG=$2 | ||
BRANCH_DELIM="::" | ||
|
||
if [ ! -d "${DEEPHAVEN_DIR}" ]; then | ||
echo "$0: Missing one or more Benchmark setup directories" | ||
exit 1 | ||
fi | ||
|
||
if [[ $# != 2 ]]; then | ||
echo "$0: Missing docker directive or image/branch argument" | ||
exit 1 | ||
fi | ||
|
||
title () { echo; echo $1; } | ||
|
||
title "- Setting up Remote Docker Image on ${HOST} -" | ||
|
||
cd ${DEEPHAVEN_DIR} | ||
|
||
if [[ ${DOCKER_IMG} != *"${BRANCH_DELIM}"* ]]; then | ||
echo "DOCKER_IMG=ghcr.io/deephaven/server:${DOCKER_IMG}" > .env | ||
docker compose pull | ||
else | ||
echo "DOCKER_IMG=deephaven/server:benchmark-local" > .env | ||
fi | ||
|
||
if [[ ${DIRECTIVE} == 'start' ]]; then | ||
docker compose up -d | ||
fi | ||
|
||
if [[ ${DIRECTIVE} == 'stop' ]]; then | ||
docker compose down | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters