Skip to content

Commit 3062796

Browse files
committed
ADding Strimzi addon
1 parent 9094ba7 commit 3062796

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

add-ons/strimzi/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Deploying Strimzi on OpenShift
2+
3+
This addon provides an easy way to install an Apache Kafka cluster, using [Strimzi](http://strimzi.io/) on [Minishift](https://github.com/minishift/minishift).
4+
5+
Prerequisites:
6+
7+
* [Installed and running](https://docs.okd.io/latest/minishift/getting-started/installing.html) Minishift
8+
* [Installed](https://docs.okd.io/latest/minishift/command-ref/minishift_oc-env.html) OpenShift CLI
9+
10+
## Start Minishift
11+
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.
12+
```
13+
$ minishift start --memory=4GB
14+
```
15+
16+
## Add-on installation
17+
Clone this repository onto your local machine and then install the add-on via:
18+
```
19+
$ minishift addons install <path_to_directory_containing_this_readme>
20+
```
21+
22+
## Strimzi start
23+
Deploy the Apache Kafka cluster:
24+
25+
```
26+
minishift addon apply -a STRIMZI_VERSION=0.7.0 -a PROJECT=myproject
27+
```
28+
29+
After a while all parts should be up and running, you can monitor the progress:
30+
31+
```
32+
oc get pods -w
33+
```
34+
35+
## Supported parameters
36+
* `STRIMZI_VERSION` - the verson of Strimzi to be used (only released versions are supported)
37+
* `PROJECT` - the name of the project to which Strimzi is deployed
38+
39+
## Strimzi Documentation
40+
To learn more about Strimzi, read the [Strimzi documentation](http://strimzi.io/).

add-ons/strimzi/strimzi.addon

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Name: strimzi
2+
# Description: Deploys an Apache Kafka Cluster
3+
# Required-Vars: STRIMZI_VERSION
4+
# Var-Defaults: STRIMZI_VERSION=0.7.0,PROJECT=strimzi
5+
6+
# Pull images
7+
echo Pulling images...
8+
docker pull docker.io/strimzi/topic-operator:#{STRIMZI_VERSION}
9+
docker pull docker.io/strimzi/entity-operator-stunnel:#{STRIMZI_VERSION}
10+
docker pull docker.io/strimzi/user-operator:#{STRIMZI_VERSION}
11+
docker pull docker.io/strimzi/cluster-operator:#{STRIMZI_VERSION}
12+
docker pull docker.io/strimzi/kafka:#{STRIMZI_VERSION}
13+
docker pull docker.io/strimzi/kafka-stunnel:#{STRIMZI_VERSION}
14+
docker pull docker.io/strimzi/kafka-init:#{STRIMZI_VERSION}
15+
docker pull docker.io/strimzi/zookeeper-stunnel:#{STRIMZI_VERSION}
16+
docker pull docker.io/strimzi/zookeeper:#{STRIMZI_VERSION}
17+
18+
19+
# Downloading Strimzi files
20+
wget https://github.com/strimzi/strimzi-kafka-operator/releases/download/#{STRIMZI_VERSION}/strimzi-#{STRIMZI_VERSION}.tar.gz
21+
22+
echo Applying Strimzi Templates
23+
oc apply -f strimzi-#{STRIMZI_VERSION}/examples/install/cluster-operator -n #{PROJECT}
24+
oc apply -f strimzi-#{STRIMZI_VERSION}/examples/templates/cluster-operator -n #{PROJECT}
25+
26+
echo Waiting for Strimzi Cluster Operator to become ready
27+
sleep 5; while echo && oc get pods -n myproject | grep -v -E "(Running|Completed|STATUS)"; do sleep 5; done
28+
29+
echo Creating persistent Strimzi broker
30+
oc apply -f strimzi-#{STRIMZI_VERSION}/examples/kafka/kafka-persistent.yaml -n #{PROJECT}
31+
32+
echo Completed, wait for Strimzi start!

0 commit comments

Comments
 (0)