Skip to content

Commit

Permalink
Programmatically download Kafka Connect HTTP
Browse files Browse the repository at this point in the history
This way we don't have to have a huge file in our repository.
  • Loading branch information
borfast committed Feb 15, 2025
1 parent 6307f64 commit 3d905b0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 204 deletions.
12 changes: 12 additions & 0 deletions scripts/cli
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,14 @@ function install_libs() {
(cd $CLI_HOME/.. && pnpm i --frozen-lockfile)
}

function download_kafka_connect_http() {
say "Downloading Kafka Connect HTTP plugin..."
wget -nv https://github.com/lensesio/stream-reactor/releases/download/8.1.28/kafka-connect-http-8.1.28.zip -O $CLI_HOME/kafka-connect-http.zip
unzip -q $CLI_HOME/kafka-connect-http.zip -d $CLI_HOME/scaffold/kafka-connect/kafka-connect-http
rm $CLI_HOME/kafka-connect-http.zip
say "Kafka Connect HTTP plugin downloaded."
}

function up_scaffold() {
scaffold_set_up_network "$PROJECT_NAME-bridge" $DOCKER_NETWORK_SUBNET $DOCKER_NETWORK_GATEWAY

Expand All @@ -696,6 +704,10 @@ function up_scaffold() {
profile='--profile nginx'
fi

if [[ ! -d "$CLI_HOME/scaffold/kafka-connect/kafka-connect-http" ]]; then
download_kafka_connect_http
fi

$_DC --compatibility -p $PROJECT_NAME -f $CLI_HOME/scaffold.yaml ${profile} up -d --build
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/scaffold/kafka-connect/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN yum install -y jq findutils unzip

RUN confluent-hub install snowflakeinc/snowflake-kafka-connector:2.5.0 --no-prompt
RUN confluent-hub install questdb/kafka-questdb-connector:0.12 --no-prompt
COPY kafka-connect-http-8.1.25/ /usr/share/confluent-hub-components/kafka-connect-http-8.1.25/
COPY kafka-connect-http/ /usr/share/confluent-hub-components/kafka-connect-http/


VOLUME /storage
Expand Down
5 changes: 5 additions & 0 deletions scripts/scaffold/kafka-connect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The Kafka HTTP Connector we're using comes from here:
https://github.com/lensesio/stream-reactor/releases

Its documentation is available here:
https://docs.lenses.io/latest/connectors/kafka-connectors/sinks/http
202 changes: 0 additions & 202 deletions scripts/scaffold/kafka-connect/kafka-connect-http-8.1.25/LICENSE

This file was deleted.

This file was deleted.

Binary file not shown.

0 comments on commit 3d905b0

Please sign in to comment.