- Go to https://console.redhat.com/openshift/token and press "Load token".
- Copy token from clipboard to
rhoas_tokenfile - Set env variable containing token
export OFFLINE_TOKEN=$(cat rhoas_token)
To run examples execute go run
go run ./examples/kafkamgmt/kafka_mgmt.gogo run ./examples/connectormgmt/connector_mgmt.gogo run ./examples/srsmgmt/srs_mgmt.goInstance SDKS like registryinstance and kafkainstance requre extra API_URL environment variable that is used to point to the root of the API.
This can be found using the "describe" commands.
rhoas service-registry describeor
rhoas kafka describeand the intended URL can be found under: "registryURL"
API_URL="yourUrl" ACCESS_TOKEN=`rhoas authtoken` go run ./examples/registryinstance/registryinstance.goAPI_URL="yourUrl" ACCESS_TOKEN=`rhoas authtoken` go run ./examples/kafkainstance/kafka_instance.goOne of the common issues one can encounter during use is incomplete commands due to lack of resources (eg: Service Registry artifacts)
This can be resolved by following the steps mentioned in the following file which explains RHOAS "how-to's" as well as a good documentation for first-time users.
Red Hat OpenShift Service Registry documentation: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_registry/1/guide/1630486d-c8d0-45d0-b2de-7fdb52c78499#proc-creating-service-registry-account_getting-started-rhoas-service-registry