Created
May 18, 2020 23:33
-
-
Save edrzmr/0c3f8a9b989bcefbddb02395629b6b73 to your computer and use it in GitHub Desktop.
Install confluent kafka-connect with replicator connector
This file contains hidden or 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
#!/bin/bash | |
set -euo pipefail | |
confluent_platform_version=${CONFLUENT_PLATFORM_VERSION:-"5.5"} | |
bash_major_version=${BASH_VERSINFO[0]} | |
debug=${DEBUG:-false} | |
function die { | |
>&2 echo "[die] ${@}" | |
exit 1 | |
} | |
function must_be_installed { | |
cmd=$(command -v "${1}") | |
[[ -n "${cmd}" ]] && [[ -f "${cmd}" ]] && return 0 || die "${1} must be present in your PATH" | |
} | |
[[ ${debug} != false ]] && set -x | |
[[ ${bash_major_version} -lt 4 ]] && die "bash >=4 required" | |
must_be_installed "wget" | |
must_be_installed "sudo" | |
must_be_installed "apt-key" | |
must_be_installed "add-apt-repository" | |
must_be_installed "apt-get" | |
wget -qO - https://packages.confluent.io/deb/${confluent_platform_version}/archive.key | sudo apt-key add - | |
sudo add-apt-repository --no-update --yes "deb [arch=amd64] https://packages.confluent.io/deb/${confluent_platform_version} stable main" | |
sudo apt-get -q update | |
sudo apt-get -q --yes install \ | |
"confluent-kafka-2.12" \ | |
"confluent-kafka-connect-replicator" \ | |
"confluent-schema-registry" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment