From 95235e79e66579d63af4f133f69b7e87292e4331 Mon Sep 17 00:00:00 2001 From: Mrinal Wadhwa Date: Wed, 22 May 2024 06:53:28 +0000 Subject: [PATCH] GITBOOK-1430: change request with no subject merged in GitBook --- portals/kafka/redpanda/self_hosted.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/portals/kafka/redpanda/self_hosted.md b/portals/kafka/redpanda/self_hosted.md index e59b43b8..f067962d 100644 --- a/portals/kafka/redpanda/self_hosted.md +++ b/portals/kafka/redpanda/self_hosted.md @@ -48,7 +48,7 @@ The [run.sh script](https://github.com/build-tr * The [run.sh script](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh) calls the [run function](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L15) which invokes the [enroll command](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L29) to create an new identity, sign in to Ockam Orchestrator, set up a new Ockam project, make you the administrator of this project, and get a project membership [credential](../../../reference/protocols/identities.md#credentials). * The run function then [generates three new enrollment tickets](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L31-L46), each valid for 10 minutes, and can be redeemed only once. The [first ticket](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L30-L39) is meant for the Ockam node that will run in Redpanda Operator’s network. The [second and third tickets](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L41-L48) are meant for the Consumer and Producer, in the Ockam node that will run in Application Team’s network. * In a typical production setup, an administrator or provisioning pipeline generates enrollment tickets and gives them to nodes that are being provisioned. In our example, the run function is acting on your behalf as the administrator of the Ockam project. It provisions Ockam nodes in [Redpanda Operator’s network](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L53C31-L53C73) and [Application Team’s network](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L60C33-L60C158), passing them their tickets using environment variables. -* The run function takes the enrollment tickets, sets them as the value of an [environment variable](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L53C36-L53C53), and [invokes docker-compose](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L48-L60) to create Redpanda Operator’s and Application Teams’s networks. +* The run function takes the enrollment tickets, sets them as the value of an [environment variable](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L53C36-L53C53), and [invokes docker-compose](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L48-L60) to create Redpanda Operator’s and Application Team’s networks. #### Redpanda Operator @@ -65,7 +65,7 @@ networks: * Once the Redpanda container [is ready](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/redpanda\_operator/docker-compose.yml#L12C5-L12C27), docker compose starts an [Ockam node in a container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/redpanda\_operator/docker-compose.yml#L11-L20) as a companion to the Redpanda container described by `ockam.yaml`, [embedded in the script](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/redpanda\_operator/run\_ockam.sh#L7-L17). The node will automatically create an identity, [enroll with your project](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh#L6-L15) using the ticket [passed to the container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/redpanda\_operator/docker-compose.yml#L17), and set up Kafka outlet. * The Ockam node then uses this identity and membership credential to authenticate and create a relay in the project, back to the node, at relay: redpanda. The run function [gave the enrollment ticket permission](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/run.sh#L38C86-L38C102) to use this relay address. -#### Application Teams +#### Application Team ```yaml # Create a dedicated and isolated virtual network for application_team. @@ -74,9 +74,9 @@ networks: driver: bridge ``` -* Application Teams’s [docker-compose configuration](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml) is used when run.sh invokes docker-compose. It creates an [isolated virtual network](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L3-L5) for Application Teams. In this network, docker compose starts a [Kafka Consumer container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L7-L38) and a [Kafka Producer container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L39-L69). +* Application Team’s [docker-compose configuration](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml) is used when run.sh invokes docker-compose. It creates an [isolated virtual network](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L3-L5) for the Application Team. In this network, docker compose starts a [Kafka Consumer container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L7-L38) and a [Kafka Producer container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L39-L69). * The Kafka consumer node container is created using [this dockerfile](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/kafka\_client.dockerfile) and this [entrypoint script](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh). The consumer enrollment ticket from run.sh is [passed to the container](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L16) via environment variable. -* When the Kafka consumer node container starts in the Application Teams network, it runs [its entrypoint](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh). The entrypoint creates the Ockam node described by `ockam.yaml`, [embedded in the script](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh#L7-L15). The node will automatically create an identity, [enroll with your project](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh#L6-L15), and setup Kafka inlet. +* When the Kafka consumer node container starts in the Application Team's network, it runs [its entrypoint](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh). The entrypoint creates the Ockam node described by `ockam.yaml`, [embedded in the script](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh#L7-L15). The node will automatically create an identity, [enroll with your project](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/run\_ockam.sh#L6-L15), and setup Kafka inlet. * Next, the entrypoint at the end executes the [command present in the docker-compose configuration](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L20-L38), which launches a Kafka consumer waiting for messages in the demo topic. Once the messages are received, they are printed out. * In the producer container, the process is analogous, once the Ockam node is set up the [command within docker-compose configuration](https://github.com/build-trust/ockam/blob/develop/examples/command/portals/kafka/redpanda/docker/application\_team/docker-compose.yml#L51-L69) launches a Kafka producer that sends messages. * You can view the Redpanda console available at http://127.0.0.1:8080 to see the encrypted messages