Skip to content

Instantly share code, notes, and snippets.

@matzew
Last active February 6, 2020 01:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matzew/bb113c5d2066219f774322c4c48ceb8a to your computer and use it in GitHub Desktop.
Save matzew/bb113c5d2066219f774322c4c48ceb8a to your computer and use it in GitHub Desktop.

Run Strimzi on Minishift

As a cluster-admin user, with a correctly running Minishift, perform the following steps:

#!/usr/bin/env bash

# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
# $ NO_COLOR=1 test.sh
NO_COLOR=${NO_COLOR:-""}
if [ -z "$NO_COLOR" ]; then
  header=$'\e[1;33m'
  reset=$'\e[0m'
else
  header=''
  reset=''
fi

function header_text {
  echo "$header$*$reset"
}

header_text "Starting Strimzi on OpenShift!"

oc project myproject

header_text "Setting up Strimzi for Openshift"
wget https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.7.0/strimzi-0.7.0.tar.gz
tar xfvz strimzi-0.7.0.tar.gz
cd strimzi-0.7.0

oc apply -f examples/install/cluster-operator -n myproject
oc apply -f examples/templates/cluster-operator -n myproject

header_text "Waiting for Strimzi Cluster Operator to become ready"
sleep 5; while echo && oc get pods -n myproject | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done

oc apply -f examples/kafka/kafka-ephemeral.yaml

This gives you an Apache Kafka 2.0 cluster on Openshift/Minishift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment