Installing Strimzi Kafka

The cluster in which you install Kafka depends on how your clusters are set up and whether you are using the Sterling Order Management System Software or external systems. If you are using the Sterling Order Management System Software or external systems, you must install an external Kafka instance.

About this task

The Kafka instance that is installed by the Sterling Intelligent Promising Operator cannot interact with any application that is installed outside of the cluster where Sterling Intelligent Promising is installed. So, if the Sterling Order Management System Software, which ingests data to Sterling Intelligent Promising, or external systems that consume events from Sterling Intelligent Promising are not in the same cluster where Sterling Intelligent Promising is installed, then the only way for these applications to integrate with Sterling Intelligent Promising is through an external Kafka, which is a Kafka instance that is not installed by the Sterling Intelligent Promising operator. This Kafka instance must be installed in the same cluster where Sterling Intelligent Promising is installed.

Procedure

  1. Install Strimzi Kafka.
    1. Install Strimzi Kafka by using the Strimzi operator. For more information, see Strimzi deployment.
    2. Create a Kafka custom resource and add auto.create.topics.enable: true in the config attribute, as shown in the following sample YAML.
      • For Red Hat® OpenShift® Container Platform:
        kind: Kafka
        apiVersion: kafka.strimzi.io/v1beta2
        metadata:
          name: my-cluster
          namespace: kafka
        spec:
          kafka:
            version: 3.4.0
            replicas: 1
            listeners:
              - name: plain
                port: 9092
                type: internal
                tls: false
              - name: tls
                port: 9093
                type: internal
                tls: true
              - name: external
                port: 9094
                type: route
                tls: true  
            config:
              auto.create.topics.enable: true
              offsets.topic.replication.factor: 1
              transaction.state.log.replication.factor: 1
              transaction.state.log.min.isr: 1
              default.replication.factor: 1
              min.insync.replicas: 1
              inter.broker.protocol.version: '3.4'
            storage:
              type: ephemeral
          zookeeper:
            replicas: 1
            storage:
              type: ephemeral
          entityOperator:
            topicOperator: {}
            userOperator: {}
        For more information, see Accessing Kafka: OpenShift routes.
      • For Kubernetes:
        apiVersion: kafka.strimzi.io/v1beta2
        kind: Kafka
        metadata:
          name: my-cluster
          namespace: kafka
        spec:
          kafka:
            version: 3.4.0
            replicas: 1
            listeners:
              - name: plain
                port: 9092
                type: internal
                tls: false
              - name: tls
                port: 9093
                type: internal
                tls: true
              - name: external
                port: 9094
                type: ingress
                tls: true
                configuration:
                  bootstrap:
                    host: bootstrap.mycluster-wdc04-b-710294-f6afd368faf21a236febf87265241561-0000.us-east.containers.appdomain.cloud
                  brokers:
                  - broker: 0
                    host: broker-0.mycluster-wdc04-b-710294-f6afd368faf21a236febf87265241561-0000.us-east.containers.appdomain.cloud
            config:
              auto.create.topics.enable: true
              offsets.topic.replication.factor: 1
              transaction.state.log.replication.factor: 1
              transaction.state.log.min.isr: 1
              default.replication.factor: 1
              min.insync.replicas: 1
              inter.broker.protocol.version: "3.4"
            storage:
              type: ephemeral
          zookeeper:
            replicas: 1
            storage:
              type: ephemeral
          entityOperator:
            topicOperator: {}
            userOperator: {}
        For more information, see Accessing Kafka: Kubernetes Ingress.
  2. Configure Kafka in the IBM® Sterling Intelligent Promising environment.
    1. Configure Kafka in your SIPEnvironment custom resource by adding the following properties:
       kafka:
        contactPoints: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9092
        zookeeperContactPoints: my-cluster-kafka-zookeeper-client.kafka.svc.cluster.local:2181  
      Note: Ensure that you use the 9092 non-SSL port in contactPoints as shown in the example snippet.
    2. Add following property to your secret YAML file.
      kafka_security_protocol: PLAINTEXT   
  3. Configure Kafka in the IBM Sterling Order Management System Software environment by adding the following properties in the customer_overrides.properties file.
    kafka.cluster.names.ext=sip_kafka
    kafka.cluster.sip_kafka.producer.bootstrap.servers=<bootstrap_server_address_for_kafka>
    kafka.cluster.sip_kafka.producer.ssl.truststore.location=truststore.jks
    kafka.cluster.sip_kafka.producer.ssl.truststore.password=password
    kafka.cluster.sip_kafka.producer.security.protocol=SSL
    Note: Ensure that you use an SSL port in the security protocol as shown in the example snippet.

    For more information about extracting the trustore.jks for the Red Hat OpenShift cluster, see Accessing Kafka: OpenShift Routes.

    For more information about extracting the trustore.jks for the Kubernetes cluster, see Accessing Kafka: Ingress.

    For more information about the Kafka properties, see Kafka properties.