This repo is a small demo of how to deploy an AMQ Streams Kafka instance using OpenShift GitOps.
This demo requires that the OpenShift GitOps and AMQ Streams operator be deployed in the cluster
-
Create two namespaces as follows: a.
int-dev
. This is where we will install the Kafka cluster b.int-tools
. This is where we will install the OpenShift GitOps instance -
In the Openshift console, navigate to the Installed Operators while making sure that
int-tools
is selected -
In Installed Operators, select OpenShift GitOps and click the Argo CD tab. Click the create button and paste the contents from argocd-cr.yaml here. Select Save
-
Wait for the Argo CD instance to be running,
oc get pods
should show the following:
$ oc get pods -n int-tools
NAME READY STATUS RESTARTS AGE
argocd-application-controller-0 1/1 Running 0 6m19s
argocd-applicationset-controller-75797955d4-8krzn 1/1 Running 0 6m19s
argocd-dex-server-75698c4ffd-2db28 1/1 Running 0 6m19s
argocd-redis-6fb8d68fd5-2nn8m 1/1 Running 0 6m19s
argocd-repo-server-585d76876-wq655 1/1 Running 0 6m19s
argocd-server-d6ccff7c6-ztksg 1/1 Running 0 6m19s
- Prior to using the Argo CD we need enable it to manage the
int-dev
namespace, typically this involves creating a bunch of roles and rolebindings for the serviceaccounts inint-tools
but OpenShift GitOps can do this for you automatically. To do so, add the following label toint-dev
:
oc label namespace int-dev argocd.argoproj.io/managed-by=int-tools
- verify the new roles have been created in int-dev:
$ oc get roles -n int-dev
NAME CREATED AT
argocd-argocd-application-controller 2021-12-14T21:09:46Z
argocd-argocd-dex-server 2021-12-14T21:09:46Z
argocd-argocd-redis-ha 2021-12-14T21:09:46Z
argocd-argocd-server 2021-12-14T21:09:46Z
- Get the
admin
password:
oc get secret/argocd-cluster -n int-tools -o jsonpath='{.data.admin\.password}' | base64 -d
-
Login into Argo CD using
admin
as the user and the password -
Click on the Gear icon on the left bar and select
Cluster
and then selectin-cluster
, confirm that int-dev and int-tools are shown as the namespaces
- Create a new application as follows:
- Application Name - Kafka Dev
- Project - default
- Sync Policy - Automatic
- Self Heal - Checked
- Repository URL - https://github.com/gnunn-gitops/amq-streams-gitops
- Branch - Main
- Path - kafka/overlays/dev
- Wait for application to synchronize and then confirm that kafka is deployed in int-dev namespace