Skip to content

Commit 49dde40

Browse files
author
cfsdocs
committed
Build 1912
1 parent 13b6dcb commit 49dde40

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

environment-vars.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ subcollection: codeengine
1515
# Working with environment variables
1616
{: #envvar}
1717

18-
Learn how to work with environment variables (`env variables`) in {{site.data.keyword.codeengineshort}}. You can set environment variables as key-value pairs that can be used by your application, job, or function.
18+
Learn how to work with environment variables (`env variables`) in {{site.data.keyword.codeengineshort}}. You can set environment variables as key-value pairs that can be used by your application, job, or function.
1919
{: shortdesc}
2020

2121
## Creating and updating environment variables
@@ -74,7 +74,7 @@ The following table describes information about your environment variables.
7474

7575
For example, let's create an app and set environment variables for the app.
7676

77-
1. [Create an app](/docs/codeengine?topic=codeengine-deploy-app#deploy-app-console) that is named `myapp`, which uses the `icr.io/codeengine/codeengine` image. This `hello-world` app includes the `TARGET` environment variable, and the app prints `Hello ${TARGET} from {{site.data.keyword.codeengineshort}}` and prints a listing of environment variables. If the `TARGET`environment variable is empty, `Hello World from {{site.data.keyword.codeengineshort}}` is returned.
77+
1. [Create an app](/docs/codeengine?topic=codeengine-deploy-app&interface=ui#deploy-app-console) that is named `myapp`, which uses the `icr.io/codeengine/codeengine` image. This `hello-world` app includes the `TARGET` environment variable, and the app prints `Hello ${TARGET} from {{site.data.keyword.codeengineshort}}` and prints a listing of environment variables. If the `TARGET`environment variable is empty, `Hello World from {{site.data.keyword.codeengineshort}}` is returned.
7878
2. Go to this app in the console.
7979
3. When the app is in `Ready` state, you can test your app. Click **Test application** and then click **Send request** in the Test application pane. To open the application in a web page, click **Application URL**. The `myapp` app returns a `Hello World from {{site.data.keyword.codeengineshort}}` response and prints the environment variables that are included in this app.
8080
4. Click the **Environment variables** tab.

subscription-kafka.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Create a {{site.data.keyword.codeengineshort}} app for connecting to your {{site
181181
182182
To create the `kafka-sender-app` application from the console, complete the following steps.
183183
184-
1. [Create a {{site.data.keyword.codeengineshort}} application](/docs/codeengine?topic=codeengine-deploy-app#deploy-app-console) that is called `kafka-sender-app` with the following information.
184+
1. [Create a {{site.data.keyword.codeengineshort}} application](/docs/codeengine?topic=codeengine-deploy-app&interface=ui#deploy-app-console) that is called `kafka-sender-app` with the following information.
185185
1. Reference the `icr.io/codeengine/kafka-sender` container image for this app. This image is built from `sender.go`, which is available from the [Samples for {{site.data.keyword.codeenginefull_notm}} GitHub repo](https://github.com/IBM/CodeEngine/tree/main/kafka){: external}. This sample sender app requires values for `password` and `BROKERS`.
186186
2. In the **Environment variables (optional)** section, add the following environment variables.
187187
1. Add a literal environment variable, `BROKERS`. For the value of this key, specify one or more of the broker hosts that are listed in the details of the service credentials in the {{site.data.keyword.messagehub}} service instance.
@@ -259,7 +259,7 @@ Complete the following steps to create a Kafka event subscription for an applica
259259
3. Specify the name of existing topics for the message queues. For example, `kafka-topic1`. To obtain information about existing topics for your service instance, go to your service instance in the {{site.data.keyword.messagehub}} console and view **Topics**.
260260
4. (Optional) Specify a consumer group. Consumers of Kafka messages can be grouped into [consumer groups](/docs/EventStreams?topic=EventStreams-consuming_messages#consumer_groups). If you are using consumer groups, the topic configuration controls the message flow to consumers in the consumer group. Whenever a consumer is added to or removed from a consumer group, the message flow from that topic might change. This action can cause existing consumers to no longer receive messages from that topic.
261261
5. Click **Next** to proceed.
262-
7. For **Event consumer**, specify the {{site.data.keyword.codeengineshort}} application to receive events. Notice that you can choose from a list of defined applications and jobs, or you can provide a name for an app (or job) that is not yet created. It is not necessary that the app or job exist when you create the event subscription with the console. However, when the subscription is created, the status of the subscription reflects that the consumer does not exist. You must create the app or job before the subscription is in a ready state and can receive events through this subscription. For this example, use the `kafka-receiver-app` application that references the `icr.io/codeengine/kafka-receiver` image. If your app does not exist, provide the name of your application and [create your application](/docs/codeengine?topic=codeengine-deploy-app#deploy-app-console) after you create the Kafka subscription. For applications only, you can optionally specify a path. By default, events are routed to the root URL of the destination application. You can send events to a different destination within the app by specifying a path. For example, if your subscription path specifies `/events`, the events are sent to `https://<base application URL>/events`. Click **Next** to proceed.
262+
7. For **Event consumer**, specify the {{site.data.keyword.codeengineshort}} application to receive events. Notice that you can choose from a list of defined applications and jobs, or you can provide a name for an app (or job) that is not yet created. It is not necessary that the app or job exist when you create the event subscription with the console. However, when the subscription is created, the status of the subscription reflects that the consumer does not exist. You must create the app or job before the subscription is in a ready state and can receive events through this subscription. For this example, use the `kafka-receiver-app` application that references the `icr.io/codeengine/kafka-receiver` image. If your app does not exist, provide the name of your application and [create your application](/docs/codeengine?topic=codeengine-deploy-app&interface=ui#deploy-app-console) after you create the Kafka subscription. For applications only, you can optionally specify a path. By default, events are routed to the root URL of the destination application. You can send events to a different destination within the app by specifying a path. For example, if your subscription path specifies `/events`, the events are sent to `https://<base application URL>/events`. Click **Next** to proceed.
263263
8. For **Summary**, review the settings for your Kafka event subscription and make changes, if needed. When ready, click **Create** to create the Kafka subscription.
264264
265265
#### Sending events to the receiving app from the console
@@ -303,7 +303,7 @@ Before you begin
303303
304304
* [Create and work with a project](/docs/codeengine?topic=codeengine-manage-project).
305305
306-
1. [Create an {{site.data.keyword.codeengineshort}} application](/docs/codeengine?topic=codeengine-deploy-app#deploy-app-cli) to act as an event consumer of Kafka messages and receive the Kafka events. For example, create an application that is called `kafka-receiver-app2` that uses the `icr.io/codeengine/kafka-receiver` image. This image is built from `receiver.go`, which is available from the [Samples for {{site.data.keyword.codeenginefull_notm}} GitHub repo](https://github.com/IBM/CodeEngine/tree/main/kafka){: external}. This sample does not require any environment variables. You can optionally specify the `--min-scale=1` option, such that the app always has an instance that is running and does not scale to zero. Configuring the app to always have a running instance is useful when you view logs. If you are running in a production environment, consider the cost of keeping a running instance of your app or whether you want {{site.data.keyword.codeengineshort}} to autoscale to zero. By default, the app scales to zero when not in use.
306+
1. [Create an {{site.data.keyword.codeengineshort}} application](/docs/codeengine?topic=codeengine-deploy-app&interface=cli#deploy-app-cli) to act as an event consumer of Kafka messages and receive the Kafka events. For example, create an application that is called `kafka-receiver-app2` that uses the `icr.io/codeengine/kafka-receiver` image. This image is built from `receiver.go`, which is available from the [Samples for {{site.data.keyword.codeenginefull_notm}} GitHub repo](https://github.com/IBM/CodeEngine/tree/main/kafka){: external}. This sample does not require any environment variables. You can optionally specify the `--min-scale=1` option, such that the app always has an instance that is running and does not scale to zero. Configuring the app to always have a running instance is useful when you view logs. If you are running in a production environment, consider the cost of keeping a running instance of your app or whether you want {{site.data.keyword.codeengineshort}} to autoscale to zero. By default, the app scales to zero when not in use.
307307
308308
```txt
309309
ibmcloud ce app create -n kafka-receiver-app2 --image icr.io/codeengine/kafka-receiver --min-scale 1

0 commit comments

Comments
 (0)