-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Deploying Strimzi on OpenShift | ||
|
||
This addon provides an easy way to install an Apache Kafka cluster, using [Strimzi](http://strimzi.io/) on [Minishift](https://github.com/minishift/minishift). | ||
|
||
Prerequisites: | ||
|
||
* [Installed and running](https://docs.okd.io/latest/minishift/getting-started/installing.html) Minishift | ||
* [Installed](https://docs.okd.io/latest/minishift/command-ref/minishift_oc-env.html) OpenShift CLI | ||
|
||
## Start Minishift | ||
The deployment works with Minishift default resources - 2 CPUs and 2 GB RAM. Nevertheless we prefer to allocate more memory (4 GB) available to Strimzi and associated infrastructure. Start Minishift using following command to provide more RAM. | ||
``` | ||
$ minishift start --memory=4GB | ||
``` | ||
|
||
## Add-on installation | ||
Clone this repository onto your local machine and then install the add-on via: | ||
``` | ||
$ minishift addons install <path_to_directory_containing_this_readme> | ||
``` | ||
|
||
## Strimzi start | ||
Deploy the Apache Kafka cluster: | ||
|
||
``` | ||
minishift addon apply strimzi -a STRIMZI_VERSION=0.7.0 -a PROJECT=myproject | ||
``` | ||
|
||
After a while all parts should be up and running, you can monitor the progress: | ||
|
||
``` | ||
oc get pods -w | ||
``` | ||
|
||
## Supported parameters | ||
* `STRIMZI_VERSION` - the verson of Strimzi to be used (only released versions are supported) | ||
* `PROJECT` - the name of the project to which Strimzi is deployed | ||
|
||
## Strimzi Documentation | ||
To learn more about Strimzi, read the [Strimzi documentation](http://strimzi.io/). |
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,46 @@ | ||
# Name: strimzi | ||
# Description: Deploys an Apache Kafka Cluster | ||
# Required-Vars: STRIMZI_VERSION | ||
# Var-Defaults: STRIMZI_VERSION=#{STRIMZI_VERSION},PROJECT=strimzi | ||
|
||
# Pull images | ||
echo Pulling images... | ||
docker pull docker.io/strimzi/topic-operator:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/entity-operator-stunnel:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/user-operator:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/cluster-operator:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/kafka:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/kafka-stunnel:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/kafka-init:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/zookeeper-stunnel:#{STRIMZI_VERSION} | ||
docker pull docker.io/strimzi/zookeeper:#{STRIMZI_VERSION} | ||
|
||
|
||
echo Applying Strimzi Templates | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/010-ServiceAccount-strimzi-cluster-operator.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/020-ClusterRole-strimzi-cluster-operator-role.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/020-RoleBinding-strimzi-cluster-operator.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/021-ClusterRoleBinding-strimzi-cluster-operator.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/021-ClusterRole-strimzi-cluster-operator-role.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/030-ClusterRoleBinding-strimzi-cluster-operator-kafka-broker-delegation.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/030-ClusterRole-strimzi-kafka-broker.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/031-ClusterRole-strimzi-entity-operator.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/031-RoleBinding-strimzi-cluster-operator-entity-operator-delegation.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/032-ClusterRole-strimzi-topic-operator.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/032-RoleBinding-strimzi-cluster-operator-topic-operator-delegation.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/040-Crd-kafka.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/041-Crd-kafkaconnect.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/042-Crd-kafkaconnects2i.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/043-Crd-kafkatopic.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/044-Crd-kafkauser.yaml -n #{PROJECT} | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/install/cluster-operator/050-Deployment-strimzi-cluster-operator.yaml -n #{PROJECT} | ||
|
||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/templates/cluster-operator/persistent-template.yaml -n #{PROJECT} | ||
|
||
echo Waiting for Strimzi Cluster Operator to become ready | ||
sleep 5; while echo && oc get pods -n #{PROJECT} | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done | ||
|
||
echo Creating persistent Strimzi broker | ||
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/#{STRIMZI_VERSION}/examples/kafka/kafka-persistent.yaml -n #{PROJECT} | ||
|
||
echo Completed, wait for Strimzi start! |