Skip to content

Commit

Permalink
Switch over developer prepareCompose workflow to jetty (deephaven#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith authored Oct 4, 2022
1 parent e6c7d64 commit 24ea523
Show file tree
Hide file tree
Showing 29 changed files with 186 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COMPOSE_PROJECT_NAME=core
DEEPHAVEN_PORT=10000
DEEPHAVEN_CONSOLE_TYPE=python
DEEPHAVEN_APPLICATION_DIR=/data/app.d
DEEPHAVEN_SERVER_IMAGE=deephaven/server:local-build
DEEPHAVEN_SERVER_IMAGE=deephaven/server-jetty:local-build
26 changes: 13 additions & 13 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server
ghcr.io/${{ github.repository_owner }}/server-netty
flavor: |
latest=false
tags: |
Expand All @@ -65,7 +65,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-nltk
ghcr.io/${{ github.repository_owner }}/server-nltk-netty
flavor: |
latest=false
tags: |
Expand All @@ -79,7 +79,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-pytorch
ghcr.io/${{ github.repository_owner }}/server-pytorch-netty
flavor: |
latest=false
tags: |
Expand All @@ -93,7 +93,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-sklearn
ghcr.io/${{ github.repository_owner }}/server-sklearn-netty
flavor: |
latest=false
tags: |
Expand All @@ -107,7 +107,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-tensorflow
ghcr.io/${{ github.repository_owner }}/server-tensorflow-netty
flavor: |
latest=false
tags: |
Expand All @@ -121,7 +121,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-all-ai
ghcr.io/${{ github.repository_owner }}/server-all-ai-netty
flavor: |
latest=false
tags: |
Expand All @@ -135,7 +135,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/server-slim
ghcr.io/${{ github.repository_owner }}/server-slim-netty
flavor: |
latest=false
tags: |
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
with:
build-args: |
BASE=deephaven/server-base:local-build
SERVER=server
SERVER=server-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -191,7 +191,7 @@ jobs:
with:
build-args: |
BASE=deephaven/nltk-base:local-build
SERVER=server-nltk
SERVER=server-nltk-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server_nltk.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -203,7 +203,7 @@ jobs:
with:
build-args: |
BASE=deephaven/pytorch-base:local-build
SERVER=server-pytorch
SERVER=server-pytorch-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server_pytorch.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -215,7 +215,7 @@ jobs:
with:
build-args: |
BASE=deephaven/sklearn-base:local-build
SERVER=server-sklearn
SERVER=server-sklearn-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server_sklearn.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -227,7 +227,7 @@ jobs:
with:
build-args: |
BASE=deephaven/tensorflow-base:local-build
SERVER=server-tensorflow
SERVER=server-tensorflow-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server_tensorflow.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -239,7 +239,7 @@ jobs:
with:
build-args: |
BASE=deephaven/all-ai-base:local-build
SERVER=server-all-ai
SERVER=server-all-ai-netty
DEEPHAVEN_VERSION=${{ steps.deephaven_version.outputs.deephaven_version }}
tags: ${{ steps.docker_meta_server_all_ai.outputs.tags }}
builder: ${{ steps.buildx.outputs.name }}
Expand Down
4 changes: 2 additions & 2 deletions Integrations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def runInDocker = { String name, String sourcePath, List<String> command, Closur
into 'python/configs'
}
}
parentContainers = [project(':docker-server').tasks.findByName('buildDocker-server')] // deephaven/server
parentContainers = [project(':docker-server').tasks.findByName('buildDocker-server-netty')] // deephaven/server-netty

imageName = 'deephaven/py-integrations:local-build'

addConfig(it)

dockerfile {
// set up the container, env vars - things that aren't likely to change
from 'deephaven/server:local-build'
from 'deephaven/server-netty:local-build'
runCommand '''set -eux; \\
pip3 install unittest-xml-reporting==3.0.4;\\
mkdir -p /out/report;\\
Expand Down
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ tasks.register('nightly') {
tasks.register('prepareCompose') {
it.group 'Deephaven lifecycle'
it.description 'A lifecycle task that prepares prerequisites for local docker-compose builds'
it.dependsOn project(':docker-server-slim').tasks.findByName('buildDocker-server-slim'),
project(':docker-server').tasks.findByName('buildDocker-server'),
project(':docker-web').tasks.findByName('buildDocker'),
project(':envoy').tasks.findByName('buildDocker'),
project(':grpc-proxy').tasks.findByName('buildDocker-grpc-proxy')
it.dependsOn project(':docker-server-jetty').tasks.findByName('buildDocker-server-jetty')
}

tasks.register('smoke') {
Expand All @@ -77,6 +73,7 @@ tasks.register('smoke') {
it.dependsOn project(':server').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':docker-server-slim').tasks.findByName('prepareDocker')
it.dependsOn project(':docker-server').tasks.findByName('prepareDocker')
it.dependsOn project(':docker-server-jetty').tasks.findByName('prepareDocker')
it.dependsOn project(':web').tasks.findByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME)
it.dependsOn project(':Generators').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public abstract class DeephavenInDockerExtension {
// irritating configuration order of operations to work out here, so just leaving
// these as constants until we decide they aren't any more
deephavenServerProject = ':docker-server'
serverTask = 'buildDocker-server'
serverTask = 'buildDocker-server-netty'
def serverProject = project.evaluationDependsOn(deephavenServerProject)

def createDeephavenGrpcApiNetwork = project.tasks.register('createDeephavenGrpcApiNetwork', DockerCreateNetwork) { task ->
Expand Down
2 changes: 1 addition & 1 deletion debezium/demo/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ COMPOSE_PROJECT_NAME=core-debezium-demo
DEEPHAVEN_PORT=10000
DEEPHAVEN_CONSOLE_TYPE=python
DEEPHAVEN_APPLICATION_DIR=/data/app.d
DEEPHAVEN_SERVER_IMAGE=deephaven/server:local-build
DEEPHAVEN_SERVER_IMAGE=deephaven/server-jetty:local-build
DEBEZIUM_VERSION=1.4
REDPANDA_VERSION=v21.9.5
REDPANDA_MEMORY=1G
Expand Down
28 changes: 0 additions & 28 deletions debezium/demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,6 @@ services:
- ../scripts:/scripts
- ./logs:/logs

web:
extends:
file: ../../docker-compose-common.yml
service: web

# Should only be used for non-production deployments, see grpc-proxy/README.md for more info
grpc-proxy:
extends:
file: ../../docker-compose-common.yml
service: grpc-proxy
depends_on:
server:
condition: service_healthy

envoy:
# A reverse proxy configured for no SSL on localhost. It fronts the requests
# for the static content and the websocket proxy.
extends:
file: ../../docker-compose-common.yml
service: envoy
depends_on:
server:
condition: service_healthy
grpc-proxy:
condition: service_started
web:
condition: service_started

redpanda:
extends:
file: ../docker-compose-debezium-common.yml
Expand Down
47 changes: 3 additions & 44 deletions docker-compose-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ services:
# with max memory.
#
# To turn on debug logging, add: -Dlogback.configurationFile=logback-debug.xml
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR} -Dstorage.path=/data
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
#
# For remote debugging switch the line above for the one below (and also change the ports below)
# - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
#
# For jprofiler sessions (if you tweaked the jprofiler version in jprofiler-server/Dockerfile you need to tweak path)
# - JAVA_TOOL_OPTIONS=-agentpath:/opt/jprofiler13.0/bin/linux-x64/libjprofilerti.so=port=8849,nowait -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}

expose:
- '8080'
ports:
- '10000:10000'
# For remote debugging (change if using different port)
# ports:
# - '5005:5005'
# For jprofiler (change if using different port)
# ports:
# - '8849:8849'

# Note: using old-style volume mounts, so that the directories get created if they don't exist
Expand All @@ -50,42 +48,3 @@ services:
# $ docker exec core_server_1 tc qdisc add dev eth0 root netem delay 10ms
cap_add:
- SYS_PTRACE

web:
image: deephaven/web:local-build
expose:
- "8080"
volumes:
- ./data:/data
deploy:
resources:
limits:
cpus: '1'
memory: 256M

# Should only be used for non-production deployments, see grpc-proxy/README.md for more info
grpc-proxy:
image: deephaven/grpc-proxy:local-build
environment:
- BACKEND_ADDR=server:8080
expose:
- '8080'
# - '8443' #unused
deploy:
resources:
limits:
cpus: '1'
memory: 256M

envoy:
# A reverse proxy configured for no SSL on localhost. It fronts the requests
# for the static content and the websocket proxy.
image: deephaven/envoy:local-build
ports:
- "${DEEPHAVEN_PORT}:10000"
# - '9090:9090' #envoy admin
deploy:
resources:
limits:
cpus: '1'
memory: 256M
28 changes: 0 additions & 28 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,3 @@ services:
extends:
file: docker-compose-common.yml
service: server

web:
extends:
file: docker-compose-common.yml
service: web

# Should only be used for non-production deployments, see grpc-proxy/README.md for more info
grpc-proxy:
extends:
file: docker-compose-common.yml
service: grpc-proxy
depends_on:
server:
condition: service_healthy

envoy:
# A reverse proxy configured for no SSL on localhost. It fronts the requests
# for the static content and the websocket proxy.
extends:
file: docker-compose-common.yml
service: envoy
depends_on:
server:
condition: service_healthy
grpc-proxy:
condition: service_started
web:
condition: service_started
12 changes: 6 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## docker-server-slim

The `docker-server-slim` project produces the image `deephaven/server-slim:local-build`.
The `docker-server-slim` project produces the image `deephaven/server-slim-netty:local-build`.

## docker-server

The `docker-server` project produces the images:
* `deephaven/server:local-build`
* `deephaven/server-nltk:local-build`
* `deephaven/server-pytorch:local-build`
* `deephaven/server-sklearn:local-build`
* `deephaven/server-tensorflow:local-build`
* `deephaven/server-netty:local-build`
* `deephaven/server-nltk-netty:local-build`
* `deephaven/server-pytorch-netty:local-build`
* `deephaven/server-sklearn-netty:local-build`
* `deephaven/server-tensorflow-netty:local-build`

When the base images for `docker-server` are updated, the requirements.txt files may need to be updated.
This can currently be done manually via:
Expand Down
Loading

0 comments on commit 24ea523

Please sign in to comment.