How to add JDBC driver to Kafka Connect on DC/OS?











up vote
0
down vote

favorite












running Kafka Connect 4.1.1 on DC/OS using the confluent community package. How can we upload or add our jdbc driver to the remote cluster?



Update: It's a package installed DC/OS catalog, which is a mesos framework, running docker images.










share|improve this question
























  • I assume these are Docker containers that are running?
    – cricket_007
    Nov 12 at 23:38












  • Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
    – user432024
    Nov 12 at 23:40















up vote
0
down vote

favorite












running Kafka Connect 4.1.1 on DC/OS using the confluent community package. How can we upload or add our jdbc driver to the remote cluster?



Update: It's a package installed DC/OS catalog, which is a mesos framework, running docker images.










share|improve this question
























  • I assume these are Docker containers that are running?
    – cricket_007
    Nov 12 at 23:38












  • Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
    – user432024
    Nov 12 at 23:40













up vote
0
down vote

favorite









up vote
0
down vote

favorite











running Kafka Connect 4.1.1 on DC/OS using the confluent community package. How can we upload or add our jdbc driver to the remote cluster?



Update: It's a package installed DC/OS catalog, which is a mesos framework, running docker images.










share|improve this question















running Kafka Connect 4.1.1 on DC/OS using the confluent community package. How can we upload or add our jdbc driver to the remote cluster?



Update: It's a package installed DC/OS catalog, which is a mesos framework, running docker images.







docker apache-kafka mesos apache-kafka-connect dcos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 23:52









cricket_007

78.6k1142109




78.6k1142109










asked Nov 11 at 21:53









user432024

1,48342754




1,48342754












  • I assume these are Docker containers that are running?
    – cricket_007
    Nov 12 at 23:38












  • Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
    – user432024
    Nov 12 at 23:40


















  • I assume these are Docker containers that are running?
    – cricket_007
    Nov 12 at 23:38












  • Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
    – user432024
    Nov 12 at 23:40
















I assume these are Docker containers that are running?
– cricket_007
Nov 12 at 23:38






I assume these are Docker containers that are running?
– cricket_007
Nov 12 at 23:38














Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
– user432024
Nov 12 at 23:40




Yes, through a mesos framework. Updated question. I asked the DC/OS community also. But nothing yet.
– user432024
Nov 12 at 23:40












1 Answer
1






active

oldest

votes

















up vote
1
down vote













Update



Script borrowed from here (thanks to @rmoff)



It's an example of overriding the Docker CMD with a bash script to download and extract the REST API source connector.



bash -c 'echo Installing unzip… && 
curl -so unzip.deb http://ftp.br.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb &&
dpkg -i unzip.deb &&
echo Downloading connector… &&
curl -so kafka-connect-rest.zip https://storage.googleapis.com/rmoff-connectors/kafka-connect-rest.zip &&
mkdir -p /u01/connectors/ &&
unzip -j kafka-connect-rest.zip -d /u01/connectors/kafka-connect-rest &&
echo Launching Connect… &&
/etc/confluent/docker/run'




You'll need to build your own Docker images and publish them to a resolvable Docker Registry for your Mesos cluster, and then edit the Mesos Service to pull these images instead of the Confluent one.



For example, in your Dockerfiles, you would have



ADD http://somepath.com/someJDBC-driver.jar /usr/share/java/kafka-connect-jdbc


Or curl rather than ADD, as shown in the Confluent docs (because it needs to extract that .tar.gz file).



FROM confluentinc/cp-kafka-connect

ENV MYSQL_DRIVER_VERSION 5.1.39

RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz"
| tar -xzf - -C /usr/share/java/kafka-connect-jdbc/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar


You can also use confluent-hub install to add other connectors that aren't JDBC JAR files






share|improve this answer























  • Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
    – user432024
    Nov 13 at 15:35










  • I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
    – cricket_007
    Nov 13 at 15:37










  • It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
    – user432024
    Nov 13 at 15:42










  • Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
    – cricket_007
    Nov 13 at 15:46










  • Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
    – user432024
    Nov 13 at 15:55













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253626%2fhow-to-add-jdbc-driver-to-kafka-connect-on-dc-os%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Update



Script borrowed from here (thanks to @rmoff)



It's an example of overriding the Docker CMD with a bash script to download and extract the REST API source connector.



bash -c 'echo Installing unzip… && 
curl -so unzip.deb http://ftp.br.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb &&
dpkg -i unzip.deb &&
echo Downloading connector… &&
curl -so kafka-connect-rest.zip https://storage.googleapis.com/rmoff-connectors/kafka-connect-rest.zip &&
mkdir -p /u01/connectors/ &&
unzip -j kafka-connect-rest.zip -d /u01/connectors/kafka-connect-rest &&
echo Launching Connect… &&
/etc/confluent/docker/run'




You'll need to build your own Docker images and publish them to a resolvable Docker Registry for your Mesos cluster, and then edit the Mesos Service to pull these images instead of the Confluent one.



For example, in your Dockerfiles, you would have



ADD http://somepath.com/someJDBC-driver.jar /usr/share/java/kafka-connect-jdbc


Or curl rather than ADD, as shown in the Confluent docs (because it needs to extract that .tar.gz file).



FROM confluentinc/cp-kafka-connect

ENV MYSQL_DRIVER_VERSION 5.1.39

RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz"
| tar -xzf - -C /usr/share/java/kafka-connect-jdbc/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar


You can also use confluent-hub install to add other connectors that aren't JDBC JAR files






share|improve this answer























  • Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
    – user432024
    Nov 13 at 15:35










  • I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
    – cricket_007
    Nov 13 at 15:37










  • It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
    – user432024
    Nov 13 at 15:42










  • Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
    – cricket_007
    Nov 13 at 15:46










  • Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
    – user432024
    Nov 13 at 15:55

















up vote
1
down vote













Update



Script borrowed from here (thanks to @rmoff)



It's an example of overriding the Docker CMD with a bash script to download and extract the REST API source connector.



bash -c 'echo Installing unzip… && 
curl -so unzip.deb http://ftp.br.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb &&
dpkg -i unzip.deb &&
echo Downloading connector… &&
curl -so kafka-connect-rest.zip https://storage.googleapis.com/rmoff-connectors/kafka-connect-rest.zip &&
mkdir -p /u01/connectors/ &&
unzip -j kafka-connect-rest.zip -d /u01/connectors/kafka-connect-rest &&
echo Launching Connect… &&
/etc/confluent/docker/run'




You'll need to build your own Docker images and publish them to a resolvable Docker Registry for your Mesos cluster, and then edit the Mesos Service to pull these images instead of the Confluent one.



For example, in your Dockerfiles, you would have



ADD http://somepath.com/someJDBC-driver.jar /usr/share/java/kafka-connect-jdbc


Or curl rather than ADD, as shown in the Confluent docs (because it needs to extract that .tar.gz file).



FROM confluentinc/cp-kafka-connect

ENV MYSQL_DRIVER_VERSION 5.1.39

RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz"
| tar -xzf - -C /usr/share/java/kafka-connect-jdbc/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar


You can also use confluent-hub install to add other connectors that aren't JDBC JAR files






share|improve this answer























  • Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
    – user432024
    Nov 13 at 15:35










  • I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
    – cricket_007
    Nov 13 at 15:37










  • It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
    – user432024
    Nov 13 at 15:42










  • Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
    – cricket_007
    Nov 13 at 15:46










  • Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
    – user432024
    Nov 13 at 15:55















up vote
1
down vote










up vote
1
down vote









Update



Script borrowed from here (thanks to @rmoff)



It's an example of overriding the Docker CMD with a bash script to download and extract the REST API source connector.



bash -c 'echo Installing unzip… && 
curl -so unzip.deb http://ftp.br.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb &&
dpkg -i unzip.deb &&
echo Downloading connector… &&
curl -so kafka-connect-rest.zip https://storage.googleapis.com/rmoff-connectors/kafka-connect-rest.zip &&
mkdir -p /u01/connectors/ &&
unzip -j kafka-connect-rest.zip -d /u01/connectors/kafka-connect-rest &&
echo Launching Connect… &&
/etc/confluent/docker/run'




You'll need to build your own Docker images and publish them to a resolvable Docker Registry for your Mesos cluster, and then edit the Mesos Service to pull these images instead of the Confluent one.



For example, in your Dockerfiles, you would have



ADD http://somepath.com/someJDBC-driver.jar /usr/share/java/kafka-connect-jdbc


Or curl rather than ADD, as shown in the Confluent docs (because it needs to extract that .tar.gz file).



FROM confluentinc/cp-kafka-connect

ENV MYSQL_DRIVER_VERSION 5.1.39

RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz"
| tar -xzf - -C /usr/share/java/kafka-connect-jdbc/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar


You can also use confluent-hub install to add other connectors that aren't JDBC JAR files






share|improve this answer














Update



Script borrowed from here (thanks to @rmoff)



It's an example of overriding the Docker CMD with a bash script to download and extract the REST API source connector.



bash -c 'echo Installing unzip… && 
curl -so unzip.deb http://ftp.br.debian.org/debian/pool/main/u/unzip/unzip_6.0-16+deb8u3_amd64.deb &&
dpkg -i unzip.deb &&
echo Downloading connector… &&
curl -so kafka-connect-rest.zip https://storage.googleapis.com/rmoff-connectors/kafka-connect-rest.zip &&
mkdir -p /u01/connectors/ &&
unzip -j kafka-connect-rest.zip -d /u01/connectors/kafka-connect-rest &&
echo Launching Connect… &&
/etc/confluent/docker/run'




You'll need to build your own Docker images and publish them to a resolvable Docker Registry for your Mesos cluster, and then edit the Mesos Service to pull these images instead of the Confluent one.



For example, in your Dockerfiles, you would have



ADD http://somepath.com/someJDBC-driver.jar /usr/share/java/kafka-connect-jdbc


Or curl rather than ADD, as shown in the Confluent docs (because it needs to extract that .tar.gz file).



FROM confluentinc/cp-kafka-connect

ENV MYSQL_DRIVER_VERSION 5.1.39

RUN curl -k -SL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_DRIVER_VERSION}.tar.gz"
| tar -xzf - -C /usr/share/java/kafka-connect-jdbc/ --strip-components=1 mysql-connector-java-5.1.39/mysql-connector-java-${MYSQL_DRIVER_VERSION}-bin.jar


You can also use confluent-hub install to add other connectors that aren't JDBC JAR files







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 7 at 19:30

























answered Nov 12 at 23:48









cricket_007

78.6k1142109




78.6k1142109












  • Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
    – user432024
    Nov 13 at 15:35










  • I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
    – cricket_007
    Nov 13 at 15:37










  • It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
    – user432024
    Nov 13 at 15:42










  • Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
    – cricket_007
    Nov 13 at 15:46










  • Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
    – user432024
    Nov 13 at 15:55




















  • Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
    – user432024
    Nov 13 at 15:35










  • I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
    – cricket_007
    Nov 13 at 15:37










  • It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
    – user432024
    Nov 13 at 15:42










  • Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
    – cricket_007
    Nov 13 at 15:46










  • Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
    – user432024
    Nov 13 at 15:55


















Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
– user432024
Nov 13 at 15:35




Yeah that much I figured. The issue is how do I tell the mesos framework to use that that specific docker image. I'll have to dig around. I'll up-vote your answer for now.
– user432024
Nov 13 at 15:35












I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
– cricket_007
Nov 13 at 15:37




I'd guess the docker daemon settings on the machine, but DCOS might be able to setup a custom Docker registry, I'm not sure. Otherwise, you could just push to DockerHub
– cricket_007
Nov 13 at 15:37












It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
– user432024
Nov 13 at 15:42




It's more complicated then that. I need to rebuild the framework. 1- I need to find the src of it first lol. Worst case I will deploy my own service using marathon and standard docker images.
– user432024
Nov 13 at 15:42












Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
– cricket_007
Nov 13 at 15:46




Not sure what you mean by "rebuild", FROM confluentinc/cp-kafka-connect should be fine. Otherwise, you just download the OSS Confluent tarball
– cricket_007
Nov 13 at 15:46












Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
– user432024
Nov 13 at 15:55






Yes that's all understood, the mesos framework is a bunch of YAML (worst case compiled code) files using the DC/OS mesos SDK: mesosphere.github.io/dcos-commons/developer-guide. So I would have to download that framework and look for the docker image and change that. Technically the framework should have allowed to specify a "volume" to allow it to get the jars. Thats what happens when we wan't to use one click installs haha
– user432024
Nov 13 at 15:55




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253626%2fhow-to-add-jdbc-driver-to-kafka-connect-on-dc-os%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Lugert, Oklahoma