Skip to content

Commit

Permalink
v2023.2 initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
djccarew committed Sep 28, 2023
1 parent 12f3449 commit 32e2292
Show file tree
Hide file tree
Showing 49 changed files with 50 additions and 62 deletions.
32 changes: 15 additions & 17 deletions docs/exercise-api-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This lab is broken up into the following steps:
1. [Summary](#summary)

## Prerequisites
API Connect requires the [Firefox](https://www.mozilla.org/en-US/firefox/new/) browser (version > 78.9.0) in order to use the testing capabilities during API development (Step #4 of this lab) so it is recommended that you complete this entire lab using Firefox.
The labs have been tested with recent versions of **Firefox** and **Chrome** so it is recommended that you complete this entire lab using one of these browsers.

## Step 1: Download the OpenAPI definition file for the external Stock Quote service

Expand Down Expand Up @@ -69,7 +69,7 @@ API Connect requires the [Firefox](https://www.mozilla.org/en-US/firefox/new/) b

[![](images/api-manager.png)](images/api-manager.png)

2.6 Click **Add** and select **API (from REST,GraphQL or SOAP)** from the context menu
2.6 Click **Add** and select **API** from the context menu

[![](images/add-api.png)](images/add-api.png)

Expand Down Expand Up @@ -99,45 +99,43 @@ After importing the existing API, the first step is to configure basic security

3.3 In the Edit API screen click **Security Schemes(0)** in the left navigation

3.4 In the **Security** section, click the **Add** button on the right and then click on **Create a security scheme**.
3.4 Click the **Add** button on the right and then click on **Create a security scheme**.

[![](images/security-scheme.png)](images/security-scheme.png)

3.5 In the **Security Scheme Name(Key)** field, type `client-id`.
3.5 In the **Security Definition Name(Key)** field, type `client-id`.

3.6 Under **Security Definition Type**, choose **apiKey**.

3.6 Under **Key Type**, choose **client_id**.

3.7 For **Located In** choose **header**.

3.8 Enter `X-IBM-Client-Id` as the **Variable Name**. Your screen should now look like the image below.
3.7 For **Located In** choose **header**. Your screen should now look like the image below.

[![](images/edit-api-complete.png)](images/edit-api-complete.png)

3.9 Click the **Create** button and then click **Save**.
3.8 Click the **Create** button and then click **Save**.

3.10 Next you'll require use of the Client Id to access your API. In the left Navigation select **Security(0)** and then click on **Create a Security Requirement**
3.9 Next you'll require use of the Client Id to access your API. In the left Navigation select **Security(0)** and then click on **Create a Security Requirement**

[![](images/create-security-req.png)](images/create-security-req.png)

3.11 Select the Security Scheme you just created and the click **Create**.
3.10 Select the Security Scheme you just created and the click **Create**.

[![](images/security-req.png)](images/security-req.png)

3.12 Click **Save**
3.11 Click **Save**

3.13 Next you'll define the endpoint for the external API. Select the **Gateway** tab, expand **Properties** in the left navigation.
3.12 Next you'll define the endpoint for the external API. Select the **Gateway** tab, expand **Properties** in the left navigation.

3.14 Click on the **target-url** property.
3.13 Click on the **target-url** property.

3.15 Copy then paste the following URL into the **Property Value** field:
3.14 Copy then paste the following URL into the **Property Value** field:

https://stock-trader-quote.us-south.cf.appdomain.cloud
https://stocktrader.ibmc.buildlab.cloud

[![](images/target-url.png)](images/target-url.png)

3.16 Click **Save** to complete the configuration.
3.15 Click **Save** to complete the configuration.

## Step 4: Test the API

Expand Down Expand Up @@ -196,7 +194,7 @@ In the API designer, you have the ability to test the API immediately after crea
> **Note**: There is a link to your assigned cluster's console on your Workshop Information page. If you have closed it, you can access it following the instructions in the [FAQ](https://ibm.github.io/cloudpakforintegration-workshop/faq/).

5.2 Click on **Projects** in the left navigation and then click on your ***student001*** project in the list
5.2 Click on **Projects** in the left navigation and then click on your ***student1*** project in the list

[![](images/select-traderlite-project.png)](images/select-traderlite-project.png)

Expand Down
Binary file modified docs/exercise-api-connect/images/add-api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/nav-to-apic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/security-scheme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/select-traderlite-operator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/select-traderlite-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/traderlite-create-instance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/traderlite-create-values.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-api-connect/images/traderlite-pods-ready.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 23 additions & 35 deletions docs/exercise-app-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ App Connect Designer is a component of Cloud Pak for Integration that provides a

[![](images/newflow.png)](images/newflow.png)

4.3 Name the flow `sfpush001`. Name the model `Client`
4.3 Name the flow `sfpush1`. Name the model `Client`

[![](images/flowname.png)](images/flowname.png)

Expand Down Expand Up @@ -214,46 +214,34 @@ App Connect Designer is a component of Cloud Pak for Integration that provides a

[![](images/automatchfields.png)](images/automatchfields.png)

4.10 Click on **Response** to configure what will be returned by the flow. Click in the text box for the **Client Id** property and then click on the suggested mapping to **Contact ID**.
4.10 Click on **Response** to configure what will be returned by the flow. Click in the text box for the **Client Id** property and then click on icon to the right of the text field. Select **Contact ID** as the mapping.

[![](images/responsedata.png)](images/responsedata.png)

4.11 Next you'll test the flow to make sure it works. Click on Salesforce icon (the middle part of the flow) and then click on the edit icon.

[![](images/testparams.png)](images/testparams.png)

4.12 Click on **Request body parameters** and then edit the input parameters that will be used in the test.
4.12 Click on **Request body parameters** and then expand the Object below it

> **Note**: Salesforce does enforce formatting for telephone numbers and email addresses so use valid formatting for those.
[![](images/testparams2.png)](images/testparams2.png)

+ Set the **Client Id** to blank. This value will be generated by Salesforce and returned.

+ Enter a **FirstName** value.

+ Enter a **LastName** value.

+ Enter an **Email** in a valid email format

+ Enter a **MobileNumber** in a valid format
4.13 Click on **Regenerate sample data** and then set the **Client Id** to blank. This value will be generated by Salesforce and returned.

[![](images/edittestparams.png)](images/edittestparams.png)

4.13 Click the "Try It" icon shown in the above screenshot. Click **Continue** when prompted and then verify that the operation returns a 200 HTTP status code.
4.14 Click the "Try It" icon shown in the above screenshot. Click **Continue** when prompted and then verify that the operation returns a 200 HTTP status code.

[![](images/viewdetails.png)](images/viewdetails.png)

4.14 Click **View details** to see the raw data returned from the call to Salesforce.
4.15 Click **View details** to see the raw data returned from the call to Salesforce. Click **Done** (top of screen)

4.15 Click **Done** (top right of screen)
4.16 Next you'll build a reverse flow. One that will call an API in the TraderLite app whenever a Salesforce contact is updated. In your browser right click on the following link, right click and select **Save Link As ...** from the context menu. Save the file *sfsync.json* to your local system. This is an OpenAPI definition of the API in TraderLite that will update client data.

4.16 Next you'll build a reverse flow. One that will call an API in the TraderLite app whenever a Salesforce contact is updated Click on the **Catalog** icon and then click on **+** to add your API.
4.17 back in App Connect Desigber click on the **Catalog** icon and then click on **+** to add your API.

[![](images/catalogapis.png)](images/catalogapis.png)

4.17 In your browser right click on the following link, right click and select **Save Link As ...** from the context menu. Save the file *sfsync.json* to your local system. This is an OpenAPI definition of the API in TraderLite that will update client data.

[sfsync.json](https://raw.githubusercontent.com/IBMStockTraderLite/traderlite-cp4i/master/appconnect/sfsync.json)

4.18 Select **OpenAPI** as the **Document type** and drag or select the *sfsync.json* file you just downloaded

[![](images/add-api-icon.png)](images/add-api-icon.png)
Expand All @@ -272,7 +260,7 @@ App Connect Designer is a component of Cloud Pak for Integration that provides a

4.23 Click **New** and select **Event-driven flow**

4.24 Name the flow `sfevent001`,
4.24 Name the flow `sfevent1`,

4.25 Expand the Salesforce section and select your specific account (e.g. `Account 1`). Under **Contacts** select **Updated contact**

Expand All @@ -282,23 +270,23 @@ App Connect Designer is a component of Cloud Pak for Integration that provides a

[![](images/sfsyncapi.png)](images/sfsyncapi.png)

4.27 Click **Preview 4 mapping suggestions** to start the field mappings between the Salesforce contact and your API.
4.27 Click **Preview 4 mapping suggestions** to start the field mappings between the Salesforce contact and your API. Click **Apply suggestions**.

4.28 Place yur cursor in the **ClientId** field and select the Salesforce **Contact ID** field
4.28 Place your cursor in the **ClientId** field and then click the icon right next to the field. Select the Salesforce **Contact ID** field

[![](images/fieldsmapped.png)](images/fieldsmapped.png)

4.29 Click on the **Dashboard** icon at the left

4.30 Export your `sfevent001` flow by clicking on the 3 period icon and selecting **Export..** from the context menu.
4.30 Export your `sfevent1` flow by clicking on the 3 period icon and selecting **Export..** from the context menu.

[![](images/exportevt.png)](images/exportevt.png)

4.31 Select **Runtime flow asset (BAR)** and click **Export**

4.32 Click **Save**

4.33 Repeat for your `sfpush001` flow, also selecting **Runtime flow asset (BAR)** and saving to your local system.
4.33 Repeat for your `sfpush1` flow, also selecting **Runtime flow asset (BAR)** and saving to your local system.

## Section 5: Create an Integration Server instance and deploy your flows

Expand All @@ -308,15 +296,15 @@ In this step you'll create an Integration Server instance and deploy your flows

5.2 If prompted to login enter the credentials on the Workshop Information page.

5.3 Click **Create a server**
5.3 Click **Deploy integrations**

[![](images/dashboardui.png)](images/dashboardui.png)

5.4 Select the **Quick start integration** tile and click **Next**

[![](images/qsdesint.png)](images/qsdesint.png)

5.5 Upload your `sfevent001.bar` file and click **Next**
5.5 Upload your `sfevent1.bar` file and click **Next**

[![](images/sfeventsbar.png)](images/sfeventsbar.png)

Expand All @@ -326,25 +314,25 @@ In this step you'll create an Integration Server instance and deploy your flows

> **Note**: Without *Accounts* checked, your flow will not work when deployed . This allows the secret with your Salesforce credentials to be accessible to the deployed flow.
5.7 Name the server `sfevent001`.
5.7 Name the server `sfevent1`.

5.8 Ensure that the **Designer flows mode** is set to **local**, the **Designer flows type** is set to **event-driven-or-api-flows** and click **Create** .

[![](images/server-details.png)](images/server-details.png)

5.9 It will take a while for the server to provision so you can continue deploying the other flow. Click **Create server**
5.9 It will take a while for the server to provision so you can continue deploying the other flow. Click **Deploy integrations**

[![](images/create-server2.png)](images/create-server2.png)

5.10 Select the **Quick start integration** tile and click **Next**

5.11 Upload your `sfpush001.bar` file and click **Next**
5.11 Upload your `sfpush1.bar` file and click **Next**

5.12 Select the **Accounts** type and leave the others unchecked. Click **Next**

> **Note**: Without *Accounts* checked, your flow will not work when deployed . This allows the secret with your Salesforce credentials to be accessible to the deployed flow.
5.13 Name the server `sfpush001`.
5.13 Name the server `sfpush1`.

5.14 Ensure that the **Designer flows mode** is set to **local**, the **Designer flows type** is set to **api-flows** and click **Create** .

Expand All @@ -359,7 +347,7 @@ In this step you'll create an Integration Server instance and deploy your flows

## Section 6: Get the REST endpoint of your App Connect Flow

6.1 In the App Connect Dashboard click on the tile for your `sfpush001` server
6.1 In the App Connect Dashboard click on the tile for your `sfpush1` server

6.2 Click on the API tile to see the details of the flow's API

Expand All @@ -373,7 +361,7 @@ In this step you'll create an Integration Server instance and deploy your flows

## Section 7: Test your App Connect Flows with Trader Lite

7.1 Go to the OpenShift console of your assigned cluster. Select the **student001** project. In the navigation on the left select **Installed Operators** and select the **TraderLite Operator**
7.1 Go to the OpenShift console of your assigned cluster. Select the **student1** project. In the navigation on the left select **Installed Operators** and select the **TraderLite Operator**

[![](images/select-traderlite-operator.png)](images/select-traderlite-operator.png)

Expand All @@ -385,7 +373,7 @@ In this step you'll create an Integration Server instance and deploy your flows

[![](images/select-traderlite-crd.png)](images/select-traderlite-crd.png)

7.4 Scroll down to line 443 and change the **enabled** field value to *true* and paste the endpoint of your API flow that you saved earlier as the **url** value on line 447.
7.4 Scroll down to line 211 and change the **enabled** field value to *true* and paste the endpoint of your API flow that you saved earlier as the **url** value on line 215.

[![](images/enable-sf-integration.png)](images/enable-sf-integration.png)

Expand Down
Binary file modified docs/exercise-app-connect/images/apidetails.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/apitile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/appdesignercatalog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/automatchfields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/create-server2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/edittestparams.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/enable-sf-integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/exportevt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/fieldsmapped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/flowname.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/implementflow1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/modelproperties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/operation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/portfolio-restart1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/responsedata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/select-traderlite-crd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/select-traderlite-operator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/exercise-app-connect/images/server-details.png
Binary file modified docs/exercise-app-connect/images/server-details2.png
Binary file modified docs/exercise-app-connect/images/serversdeployed.png
Binary file modified docs/exercise-app-connect/images/sfconnectionform.png
Binary file modified docs/exercise-app-connect/images/testparams.png
Binary file modified docs/exercise-app-connect/images/traderlite-run-tradr.png
Binary file modified docs/exercise-app-connect/images/viewdetails.png
22 changes: 12 additions & 10 deletions docs/exercise-event-streaming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ This lab is broken up into the following steps:
## Step 1: Uninstall the TraderLite app
If you've completed the API Connect and/or the Salesforce integration labs then you will have the app running already. For this lab it's easier to install the app from scratch so you can use the OpenShift GUI environment (as opposed to editing the yaml file of an existing instance) to select all the options needed for this app. If the app is *NOT* installed skip to **Step 2**.

1.1 Go to the OpenShift console of your workshop cluster. Select your ***student001*** project. In the navigation on the left select **Installed Operators** in the **Operators** section and select the **TraderLite Operator**
1.1 Go to the OpenShift console of your workshop cluster. Select your ***student1*** project. In the navigation on the left select **Installed Operators** in the **Operators** section and select the **TraderLite Operator**

[![](images/traderlite-operator.png)](images/traderlite-operator.png)
[![](images/select-traderlite-operator.png)](images/select-traderlite-operator.png)

1.2 Click on the **TraderLite app** tab

Expand All @@ -69,9 +69,11 @@ If you've completed the API Connect and/or the Salesforce integration labs then

[![](images/create-topic.png)](images/create-topic.png)

2.4 Name the topic `student001`. Click **Next**.
2.4 Name the topic `student1`. Click **Next**.

2.5 Leave the default for partitions and click **Next**.

2.5 Leave the default for message retention and click **Next**.
2.6 Leave the default for message retention and click **Next**.

2.6 Leave the default for replicas and click **Create topic**.

Expand All @@ -83,7 +85,7 @@ If you've completed the API Connect and/or the Salesforce integration labs then

In this section you will install the TraderLite app to start storing transactions as MQ messages, without setting up the KafkaConnect part that will move the transactions out of MQ, into Event Streams and then into MongoDB. This demonstrates how MQ can serve as a reliable store and forward buffer especially during temporary network disruption.

3.1 Go to the OpenShift console of your workshop cluster. Select your ***student001*** project.
3.1 Go to the OpenShift console of your workshop cluster. Select your ***student1*** project.

3.2 Click on **Installed Operators** (in the **Operators** section) in the left navigation and then click on the **TraderLite Operator** in the list.

Expand All @@ -97,11 +99,11 @@ In this section you will install the TraderLite app to start storing transaction

3.5 Set the following values:

+ Under **Kafka Access** select the **student001** topic
+ Under **Kafka Access** select the **student1** topic

+ Enable **KafkaIntegration**

+ Under **Mqaccess** select the **STUDENT001.QUEUE** queue
+ Under **Mqaccess** select the **STUDENT1.QUEUE** queue

[![](images/traderlite-create-values.png)](images/traderlite-create-values.png)

Expand Down Expand Up @@ -150,7 +152,7 @@ In this section you will install the TraderLite app to start storing transaction

[![](images/manage-qmtrader-tile.png)](images/manager-qmtrader-tile.png)

5.4 Click on the **STUDENT001.QUEUE** queue.
5.4 Click on the **STUDENT1.QUEUE** queue.

[![](images/trader-queue.png)](images/trader-queue.png)

Expand All @@ -172,7 +174,7 @@ In this section you will configure the TraderLite app to start moving the transa

6.3 Click on the 3 periods to the right of the existing TraderLite CRD and select **Edit TraderLite** from the context menu.

6.4 Scroll down to line 432 and set **Kafka Connect enabled** to **true** (leave all the other values unchanged).
6.4 Scroll down to line 151 and set **Kafka Connect enabled** to **true** (leave all the other values unchanged).

[![](images/kafka-connect-enabled.png)](images/kafka-connect-enabled.png)

Expand Down Expand Up @@ -215,7 +217,7 @@ In this section you will configure the TraderLite app to start moving the transa

[![](images/topics-icon.png)](images/topics-icon.png)

8.3 Click on topic **student001**
8.3 Click on topic **student1**

[![](images/topic-name.png)](images/topic-name.png)

Expand Down
Binary file modified docs/exercise-event-streaming/images/es-operator.png
Binary file modified docs/exercise-event-streaming/images/kafka-connect-enabled.png
Binary file modified docs/exercise-event-streaming/images/kc-status.png
Binary file modified docs/exercise-event-streaming/images/message-details.png
Binary file modified docs/exercise-event-streaming/images/mq-empty.png
Binary file modified docs/exercise-event-streaming/images/mq-messages.png
Binary file modified docs/exercise-event-streaming/images/new-topic.png
Binary file modified docs/exercise-event-streaming/images/select-traderlite-crd2.png
Diff not rendered.
Binary file modified docs/exercise-event-streaming/images/topic-name.png
Binary file modified docs/exercise-event-streaming/images/traderlite-crd.png
Binary file modified docs/exercise-event-streaming/images/traderlite-run-tradr.png

0 comments on commit 32e2292

Please sign in to comment.