このコンテンツは選択した言語では利用できません。

Chapter 2. Installing Service Registry


This topic explains how to install and run the Service Registry container image with the following storage options:

2.1. Installing Service Registry with AMQ Streams storage on OpenShift

This topic explains how to install and run Service Registry with storage in Red Hat AMQ Streams on OpenShift from a container image. This storage option is suitable for production environments.

The following versions are supported:

  • Red Hat AMQ Streams 1.3

Prerequisites

  • You must have an OpenShift cluster with cluster administrator access. OpenShift 3.11 and 4.x are supported.
  • You must have already installed AMQ Streams on your cluster. For more details, see Getting Started with AMQ Streams on OpenShift.
  • Ensure that you can access the Service Registry image in the Container Catalog:

    • Create a service account and pull secret for the image. For details, see Container Service Accounts.
    • Download the pull secret and submit it to your OpenShift cluster. For example:

      $ oc create -f 11223344_service-registry-secret.yaml --namespace=my-project
      Copy to Clipboard Toggle word wrap

Procedure

  1. Get the Service Registry OpenShift template.
  2. Enter the following command to get the name of the Kafka bootstrap service running on your OpenShift cluster:

    $ oc get services | grep .*kafka-bootstrap
    Copy to Clipboard Toggle word wrap
  3. Create a new OpenShift application and specify the following parameters:

    • service-registry-template.yml: The OpenShift template file for Service Registry.
    • KAFKA_BOOTSTRAP_SERVERS: The name of the Kafka bootstrap service on your cluster, followed by the Kafka broker port (for example, my-cluster-kafka-bootstrap:9092).
    • REGISTRY_ROUTE: The name of the route that will expose Service Registry, which is based on your cluster environment (for example, my-cluster-service-registry-myproject.example.com).

      For example:

      $ oc new-app service-registry-template.yml -p KAFKA_BOOTSTRAP_SERVERS=my-cluster-kafka-bootstrap:9092 -p REGISTRY_ROUTE=my-cluster-service-registry-myproject.example.com
      Copy to Clipboard Toggle word wrap

      You should see output such as the following:

      Deploying template "myproject/service-registry" for "service-registry-template.yml" to project myproject
      
          service-registry
          ---------
          Congratulations on deploying Service Registry into OpenShift!
      
          All components have been deployed and configured.
      
          * With parameters:
             * Registry Route Name=my-cluster-service-registry-myproject.example.com
             * Registry Max Memory Limit=1300Mi
             * Registry Memory Requests=600Mi
             * Registry Max CPU Limit=1
             * Registry CPU Requests=100m
             * Kafka Bootstrap Servers=my-cluster-kafka-bootstrap:9092
      
      --> Creating resources ...
         imagestream.image.openshift.io "registry" created
         service "service-registry" created
         deploymentconfig.apps.openshift.io "service-registry" created
         route.route.openshift.io "service-registry" created
      --> Success
         Access your application via route 'my-cluster-service-registry-myproject.example.com'
         Run 'oc status' to view your app.
      Copy to Clipboard Toggle word wrap
  4. Send a test request using the Service Registry REST API. For example, enter the following curl command to create a simple Avro schema artifact for a share price application in the registry:

    $ curl -X POST -H "Content-type: application/json; artifactType=AVRO" -H "X-Registry-ArtifactId: prices-value" --data '{"type":"record","name":"price","namespace":"com.redhat","fields":[{"name":"symbol","type":"string"},{"name":"price","type":"string"}]}' my-cluster-service-registry-myproject.example.com/artifacts
    Copy to Clipboard Toggle word wrap
  5. Verify that the response includes the expected JSON body to confirm that the Avro schema artifact was created in the registry. For example:

    {"createdOn":1578310374517,"modifiedOn":1578310374517,"id":"prices-value","version":1,"type":"AVRO","globalId":8}
    Copy to Clipboard Toggle word wrap

Additional resources

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat