-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The environment was not set correctly, so it could not fire kafka events. It (mce-cli) always worked when running outside of docker. I also added a dev ingestion docker image / script which may be much faster if you've already built locally. Tested: 1. Cleaned docker volumes and started datahub. Verified it is empty. 2. Built with gradle. 3. Ran ./docker/ingestion/ingestion-dev.sh. Verified data shows in DataHub. 4. Ran step 1 again. 5. Ran ./docker/ingestion/ingestion.sh. Verified data shows in DataHub.
- Loading branch information
John Plaisted
authored
Dec 3, 2020
1 parent
a1e7e26
commit 5f9d967
Showing
6 changed files
with
51 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
FROM openjdk:8 as builder | ||
# Defining environment | ||
ARG APP_ENV=prod | ||
|
||
FROM openjdk:8-jre-alpine as base | ||
|
||
FROM openjdk:8 as prod-build | ||
COPY . datahub-src | ||
RUN cd datahub-src && ./gradlew :metadata-ingestion-examples:mce-cli:build | ||
|
||
FROM openjdk:8-jre-alpine | ||
COPY --from=builder datahub-src/metadata-ingestion-examples/mce-cli/build/libs/mce-cli.jar ./ | ||
COPY --from=builder datahub-src/metadata-ingestion-examples/mce-cli/example-bootstrap.json ./ | ||
CMD java -jar mce-cli.jar -m produce example-bootstrap.json | ||
FROM base as prod-install | ||
COPY --from=prod-build datahub-src/metadata-ingestion-examples/mce-cli/build/libs/mce-cli.jar /datahub/ingestion/bin/mce-cli.jar | ||
COPY --from=prod-build datahub-src/metadata-ingestion-examples/mce-cli/example-bootstrap.json /datahub/ingestion/example-bootstrap.json | ||
|
||
FROM base as dev-install | ||
# Dummy stage for development. Assumes code is built on your machine and mounted to this image. | ||
# See this excellent thread https://github.com/docker/cli/issues/1134 | ||
|
||
FROM ${APP_ENV}-install as final | ||
CMD java -jar /datahub/ingestion/bin/mce-cli.jar -m produce /datahub/ingestion/example-bootstrap.json |
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,18 @@ | ||
--- | ||
version: '3.5' | ||
services: | ||
ingestion: | ||
image: datahub-ingestion:debug | ||
env_file: env/docker.env | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
APP_ENV: dev | ||
volumes: | ||
- ../../metadata-ingestion-examples/mce-cli/build/libs/:/datahub/ingestion/bin | ||
- ../../metadata-ingestion-examples/mce-cli/example-bootstrap.json:/datahub/ingestion/example-bootstrap.json | ||
|
||
networks: | ||
default: | ||
name: datahub_network |
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,2 @@ | ||
KAFKA_BOOTSTRAP_SERVER=broker:29092 | ||
KAFKA_SCHEMAREGISTRY_URL=http://schema-registry:8081 |
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,6 @@ | ||
#!/bin/bash | ||
|
||
# Runs the ingestion image using your locally built mce-cli. Gradle build must have been run before this script. | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
cd $DIR && COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.dev.yml -p datahub up |
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