Skip to content

Commit

Permalink
DBZ-7025 Fixed link rendering in sources
Browse files Browse the repository at this point in the history
  • Loading branch information
jcechace committed Oct 24, 2023
1 parent 30cf200 commit bfdc07d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions _posts/2023-10-19-Debezium-Operator-Takes-off-to-the-Clouds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ In this article we will be using Kind to create a local single node cluster.

Once you have both `kubectl` and `kind` installed, create a local Kubernetes cluster by executing the following:

[source, bash]
[source, bash, subs=-macros]
----
kind create cluster --name debezium
----

We can now configure the cluster context for `kubectl` and check the status of our new k8s environment by running the following command:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl cluster-info --context kind-debezium
Expand All @@ -59,7 +59,7 @@ CoreDNS is running at https://127.0.0.1:64815/api/v1/namespaces/kube-system/serv

As the last step of our cluster deployment, we will create a new namespace for the required infrastructure:

[source, bash]
[source, bash, subs=-macros]
----
kubectl create namespace debezium
----
Expand All @@ -75,15 +75,15 @@ Let's start with deploying the PostgreSQL database by executing the command belo
[CAUTION]
For simplicity, we are using an ephemeral volume mounts which means that any modification done to our database instance will not persist when the pod is recreated.

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-examples/main/operator/tutorial-postgresql-kafka/infra/001_postgresql.yml -n debezium
----

The yaml file fed to `kubectl` contains several Kubernetes manifests:

.001_postgresql.yml
[source, yaml]
[source, yaml, subs=-macros]
----
apiVersion: v1 <1>
kind: Secret
Expand Down Expand Up @@ -167,7 +167,7 @@ The secret is not only attached as environment variables to the database pod, bu

You can check that your PostgreSQL database was deployed correctly by running:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl get deployments -n debezium
Expand All @@ -182,14 +182,14 @@ To deploy the Kafka broker instance we will take an advantage of the https://str
First we will deploy the Strimzi operator itself by running the command below.
Please note the `namespace` parameter in the URL -- it's important as it ensures that Kubernetes objects required by Strimzi are created in the correct namespace.

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://strimzi.io/install/latest?namespace=debezium
----

After some time you can check that your Strimzi operator is running with:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl get deployments -n debezium
Expand All @@ -199,15 +199,15 @@ strimzi-cluster-operator 1/1 1 1

With the Strimzi operator installed we can deploy an instance of the Kafka broker.

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-examples/main/operator/tutorial-postgresql-kafka/infra/002_kafka-ephemeral.yml -n debezium
----

This command deploys a minimal working configuration of the Kafka broker as described in the used yaml file.

.002_kafka-ephemeral.yml
[source, yaml]
[source, yaml, subs=-macros]
----
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
Expand Down Expand Up @@ -249,7 +249,7 @@ Once again this configuration uses an ephemeral storage and only a single replic

To check your Kafka deployment execute the following:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl get pods -n debezium
Expand Down Expand Up @@ -280,7 +280,7 @@ First we need to install OLM itself by running the following shell commands -- s
[Note]
This is a one-time process and any production k8s cluster which provides access to operator catalogs would already have OLM installed.

[source, bash]
[source, bash, subs=-macros]
----
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/install.sh -o install.sh
chmod +x install.sh
Expand All @@ -289,14 +289,14 @@ chmod +x install.sh

Once OLM is up and running in your cluster you can subscribe to Debezium Operator.

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-examples/main/operator/tutorial-postgresql-kafka/infra/010_debezium-subscription.yml
----

Once again, we will examine the contents of the `subscription.yml` file in order to get a better understanding of what we have just done.

[source, bash]
[source, bash, subs=-macros]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription <1>
Expand All @@ -320,7 +320,7 @@ You can learn more about installing operators through OLM subscription in the ht

You should now have Debezium Operator ready to manage Debezium Server deployments across your entire Kubernetes cluster. You can check that the operator is indeed up and running with the following command:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl get deployments -n operators
Expand All @@ -341,7 +341,7 @@ Debezium Operator deployed this way will be limited to managing the Debezium Ser

To deploy Debezium Operator we need to execute the following commands:

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-operator/2.4/k8/debeziumservers.debezium.io-v1.yml
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-operator/2.4/k8/kubernetes.yml -n debezium
Expand All @@ -356,7 +356,7 @@ With the operator deployed, you can now move to deploying the Debezium Server in

With Debezium Operator deployed one way or the other, we can now deploy Debezium Server itself!

[source, bash]
[source, bash, subs=-macros]
----
kubectl create -f https://raw.githubusercontent.com/debezium/debezium-examples/main/operator/tutorial-postgresql-kafka/infra/011_debezium-server-ephemeral.yml -n debezium
----
Expand All @@ -365,7 +365,7 @@ Once again, let's look closely at the Kubernetes manifest we just deployed.


.011_debezium-server-ephemeral.yml
[source, yaml]
[source, yaml, subs=-macros]
----
apiVersion: debezium.io/v1alpha1
kind: DebeziumServer <1>
Expand Down Expand Up @@ -424,7 +424,7 @@ Debezium Operator will take care of creating everything required to run Debezium
=== Verifying the Deployment
You can check that the deployed Debezium Server instance in running with the following command:

[source, bash]
[source, bash, subs=-macros]
----
$ kubectl get deployments -n debezium
Expand All @@ -434,7 +434,7 @@ my-debezium 1/1 1 1

With Debezium Server running, we can verify that it consumed all initial data from the database with the following command.

[source, bash]
[source, bash, subs=-macros]
----
kubectl exec dbz-kafka-kafka-0 -n debezium -- /opt/kafka/bin/kafka-console-consumer.sh \
--bootstrap-server localhost:9092 \
Expand Down

0 comments on commit bfdc07d

Please sign in to comment.