You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl -o- https://raw.githubusercontent.com/redhat-developer/app-services-cli/main/scripts/install.sh | bash
#make sure your $HOME/bin is included in your $PATH
#open a new terminal
rhoas --version
#add cli completion for zsh
rhoas completion zsh > "${fpath[1]}/_rhoas"
rhoas login
rhoas whoami
rhoas status
Connect your OpenShift instance to the Streams for Kafka instance you created previously.
#login into your Openshift Cluster (where your App is deployed)
oc login --token=<your dev user token> --server=https://api.cluster-<your openshift cluster domain>:6443
#make sure you are inside your app namespace
oc project globex-user1
Connect a Kafka instance to your cluster
#get your Openshit Cluster Manager Access Token from https://console.redhat.com/openshift/token/show#
rhoas cluster connect --service-type kafka --service-name globex
This command will link your cluster with Cloud Services by creating custom resources and secrets.
In case of problems please execute "rhoas cluster status" to check if your cluster is properly configured
Connection Details:
Service Type: kafka
Service Name: globex
? Provide an offline token to be used by the Operator (to get a token, visit https://console.redhat.com/openshift/token)
PASTE YOUR 'Openshit Cluster Manager Access Token' HERE
✔️ Token Secret "rh-cloud-services-accesstoken" created successfully
✔️ Service Account Secret "rh-cloud-services-service-account" created successfully
Client ID: 332f90f4-3fcc-4bec-baf7-f57bd4e3c236
Make a copy of the client ID to store in a safe place. Credentials won't appear again after closing the terminal.
You will need to assign permissions to service account in order to use it.
You need to separately grant service account access to Kafka by issuing following command
$ rhoas kafka acl grant-access --producer --consumer --service-account 332f90f4-3fcc-4bec-baf7-f57bd4e3c236 --topic all --group all
✔️ kafka resource "globex" has been created
Waiting for status from kafka resource.
Created kafka can be already injected to your application.
To bind you need to have Service Binding Operator installed:
https://github.com/redhat-developer/service-binding-operator
You can bind kafka to your application by executing "rhoas cluster bind"
or directly in the OpenShift Console topology view.
✔️ Connection to service successful.
verify a new KafkaConnection resource was created
oc get kafkaconnection
NAME AGE
globex 5m5s
Set Permissions for a the rh-cloud-services-service-account
rhoas kafka acl grant-access --producer --consumer --service-account 332f90f4-3fcc-4bec-baf7-f57bd4e3c236 --topic all --group all -y
Binds the Kafka Service to the apps though the Service Binding Operator