Skip to content

Commit

Permalink
Use templating for versions (strimzi#74)
Browse files Browse the repository at this point in the history
* Use templating for versions
  • Loading branch information
tombentley authored Jun 18, 2019
1 parent 380964c commit 29d3d49
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 55 deletions.
25 changes: 25 additions & 0 deletions _data/releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
operator:
- version: 0.12.0
defaultKafkaVersion: 2.2.1
- version: 0.11.4
defaultKafkaVersion: 2.1.1
- version: 0.11.3
- version: 0.11.2
- version: 0.11.1
- version: 0.11.0
- version: 0.10.0
- version: 0.9.0
- version: 0.8.2
- version: 0.8.1
- version: 0.8.0
- version: 0.7.0
- version: 0.6.0
- version: 0.5.0
- version: 0.4.0
- version: 0.3.1
- version: 0.3.0
- version: 0.2.0
- version: 0.1.0
bridge:
- version: 0.12.0

30 changes: 11 additions & 19 deletions documentation/archive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,18 @@ layout: default

## Strimzi Kafka operators

* [0.12.0](/docs/0.12.0/)
* [0.11.4](/docs/0.11.4/)
* [0.11.3](/docs/0.11.3/)
* [0.11.2](/docs/0.11.2/)
* [0.11.1](/docs/0.11.1/)
* [0.11.0](/docs/0.11.0/)
* [0.10.0](/docs/0.10.0/)
* [0.9.0](/docs/0.9.0/)
* [0.8.2](/docs/0.8.2/)
* [0.8.1](/docs/0.8.1/)
* [0.8.0](/docs/0.8.0/)
* [0.7.0](/docs/0.7.0/)
* [0.6.0](/docs/0.6.0/)
* [0.5.0](/docs/0.5.0/)
* [0.4.0](/docs/0.4.0/)
* [0.3.1](/docs/0.3.1/)
* [0.3.0](/docs/0.3.0/)
* [0.2.0](/docs/0.2.0/)
{% for item in site.data.releases.operator -%}
{% if item.version != "0.1.0" -%}
* [{{item.version}}](/docs/{{item.version}}/)
{% else -%}
* [0.1.0](/docs/0.1.0/README.md)
{% endif -%}
{% endfor -%}



## Strimzi Kafka bridge

* [0.12.0](/docs/bridge/0.12.0/)
{% for item in site.data.releases.bridge -%}
* [{{item.version}}](/docs/{{item.version}}/)
{% endfor -%}
4 changes: 2 additions & 2 deletions documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ layout: default

## Strimzi Kafka operators

* [0.12.0 - Latest stable release](/docs/latest/)
* [{{site.data.releases.operator[0].version}} - latest stable release](/docs/latest/)
* [Master](/docs/master/)

## Strimzi Kafka bridge

* [0.12.0 - Latest stable release](/docs/bridge/latest/)
* [{{site.data.releases.bridge[0].version}} - latest stable release](/docs/bridge/latest/)
* [Master](/docs/bridge/master/)

## Documentation Archive
Expand Down
26 changes: 6 additions & 20 deletions downloads/archive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,12 @@ layout: default

## Strimzi Kafka operators

* [0.12.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.12.0)
* [0.11.4](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.11.4)
* [0.11.3](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.11.3)
* [0.11.2](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.11.2)
* [0.11.1](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.11.1)
* [0.11.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.11.0)
* [0.10.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.10.0)
* [0.9.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.9.0)
* [0.8.2](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.8.2)
* [0.8.1](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.8.1)
* [0.8.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.8.0)
* [0.7.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.7.0)
* [0.6.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.6.0)
* [0.5.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.5.0)
* [0.4.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.4.0)
* [0.3.1](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.3.1)
* [0.3.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.3.0)
* [0.2.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.2.0)
* [0.1.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.1.0)
{% for item in site.data.releases.operator -%}
* [{{item.version}}](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/{{item.version}})
{% endfor -%}

## Strimzi Kafka bridge

* [0.12.0](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/0.12.0)
{% for item in site.data.releases.bridge -%}
* [{{item.version}}](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/{{item.version}})
{% endfor -%}
4 changes: 2 additions & 2 deletions downloads/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ available on [Docker Hub](https://hub.docker.com/u/strimzi/).

## Strimzi Kafka operators

* [Latest stable release - 0.12.0](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.12.0)
* [{{site.data.releases.operator[0].version}} – latest stable release](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/{{site.data.releases.operator[0].version}})

## Strimzi Kafka bridge

* [Latest stable release - 0.12.0](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/0.12.0)
* [{{site.data.releases.bridge[0].version}} – latest stable release](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/{{site.data.releases.bridge[0].version}})

## Downloads Archive

Expand Down
8 changes: 4 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Strimzi releases are available for download on our [GitHub](https://github.com/s
contain documentation and example YAML files for deployment on OpenShift and Kubernetes. The Docker images are
available on [Docker Hub](https://hub.docker.com/u/strimzi/).

* [Strimzi Kafka operators - latest stable version (0.12.0)](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/0.12.0)
* [Strimzi Kafka bridge - Latest stable release (0.12.0)](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/0.12.0)
* [Strimzi Kafka operators - latest stable version ({{site.data.releases.operator[0].version}})](https://github.com/strimzi/strimzi-kafka-operator/releases/tag/{{site.data.releases.operator[0].version}})
* [Strimzi Kafka bridge - latest stable release ({{site.data.releases.bridge[0].version}})](https://github.com/strimzi/strimzi-kafka-bridge/releases/tag/{{site.data.releases.bridge[0].version}})

All releases can be found in the [Downloads](/downloads) page.

# Documentation

* [Strimzi Kafka operators - latest stable version (0.12.0)](/docs/latest/)
* [Strimzi Kafka bridge - latest stable version (0.12.0)](/docs/bridge/latest/)
* [Strimzi Kafka operators - latest stable version ({{site.data.releases.operator[0].version}})](/docs/latest/)
* [Strimzi Kafka bridge - latest stable version ({{site.data.releases.bridge[0].version}})](/docs/bridge/latest/)

Documentation for all releases can be found in the [Documentation](/documentation) page.

Expand Down
8 changes: 4 additions & 4 deletions quickstarts/minikube/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ kubectl create namespace kafka
Next we apply the Strimzi install files, including `ClusterRoles`, `ClusterRoleBindings` and some **Custom Resource Definitions** (`CRDs`). The CRDs define the schemas used for declarative management of the Kafka cluster, Kafka topics and users.

```shell
curl -L https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.12.0/strimzi-cluster-operator-0.12.0.yaml \
curl -L https://github.com/strimzi/strimzi-kafka-operator/releases/download/{{site.data.releases.operator[0].version}}/strimzi-cluster-operator-{{site.data.releases.operator[0].version}}.yaml \
| sed 's/namespace: .*/namespace: kafka/' \
| kubectl -n kafka apply -f -
```
Expand All @@ -34,7 +34,7 @@ After that we feed Strimzi with a simple **Custom Resource**, which will than gi

```shell
# Apply the `Kafka` Cluster CR file
kubectl apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/0.12.0/examples/kafka/kafka-persistent-single.yaml -n kafka
kubectl apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/{{site.data.releases.operator[0].version}}/examples/kafka/kafka-persistent-single.yaml -n kafka
```

We can now watch the deployment on the `kafka` namespace, and see all required pods being created:
Expand All @@ -57,13 +57,13 @@ strimzi-cluster-operator-78f8bf857-kpmhb 1/1 Running 0 3m10s
Once the cluster is running, you can run a simple producer to send messages to Kafka topic (the topic will be automatically created):

```shell
kubectl -n kafka run kafka-producer -ti --image=strimzi/kafka:0.12.0-kafka-2.1.0 --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic
kubectl -n kafka run kafka-producer -ti --image=strimzi/kafka{{site.data.releases.operator[0].version}}-kafka-{{site.data.releases.operator[0].defaultKafkaVersion}} --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic
```

And to receive them:

```shell
kubectl -n kafka run kafka-consumer -ti --image=strimzi/kafka:0.12.0-kafka-2.1.0 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic my-topic --from-beginning
kubectl -n kafka run kafka-consumer -ti --image=strimzi/kafka:{{site.data.releases.operator[0].version}}-kafka-{{site.data.releases.operator[0].defaultKafkaVersion}} --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic my-topic --from-beginning
```

Enjoy your Apache Kafka cluster, running on Minikube!
8 changes: 4 additions & 4 deletions quickstarts/okd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ oc login -u system:admin
Next we apply the Strimzi install files, including `ClusterRoles`, `ClusterRoleBindings` and some **Custom Resource Definitions** (`CRDs`). The CRDs define the schemas used for declarative management of the Kafka cluster, Kafka topics and users.

```shell
oc apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.12.0/strimzi-cluster-operator-0.12.0.yaml -n myproject
oc apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/{{site.data.releases.operator[0].version}}/strimzi-cluster-operator-{{site.data.releases.operator[0].version}}.yaml -n myproject
```

# Provision the Apache Kafka cluster
Expand All @@ -31,7 +31,7 @@ After that we feed Strimzi with a simple **Custom Resource**, which will than gi

```shell
# Apply the `Kafka` Cluster CR file
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/0.12.0/examples/kafka/kafka-persistent-single.yaml -n myproject
oc apply -f https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/{{site.data.releases.operator[0].version}}/examples/kafka/kafka-persistent-single.yaml -n myproject
```

We can now watch the deployment on the `myproject` namesapce, and see all required pods being created:
Expand All @@ -54,13 +54,13 @@ strimzi-cluster-operator-78f8bf857-kpmhb 1/1 Running 0 3m10s
Once the cluster is running, you can run a simple producer to send messages to Kafka topic (the topic will be automatically created):

```shell
oc run kafka-producer -ti --image=strimzi/kafka:0.12.0-kafka-2.1.0 --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic
oc run kafka-producer -ti --image=strimzi/kafka:{{site.data.releases.operator[0].version}}-kafka-{{site.data.releases.operator[0].defaultKafkaVersion}} --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic
```

And to receive them:

```shell
oc run kafka-consumer -ti --image=strimzi/kafka:0.12.0-kafka-2.1.0 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic my-topic --from-beginning
oc run kafka-consumer -ti --image=strimzi/kafka:{{site.data.releases.operator[0].version}}-kafka-{{site.data.releases.operator[0].defaultKafkaVersion}} --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic my-topic --from-beginning
```

Enjoy your Apache Kafka cluster, running on OKD!

0 comments on commit 29d3d49

Please sign in to comment.