diff --git a/labs/Connectors/Gemini/README.md b/labs/Connectors/Gemini/README.md index eb23d40..0594e58 100644 --- a/labs/Connectors/Gemini/README.md +++ b/labs/Connectors/Gemini/README.md @@ -36,13 +36,16 @@ To configure the Vertex AI connection, perform the following steps ![alt text](images/ConnectorCreation1.png) 2. Create the connection according to the information in the following screenshots: + ![alt text](images/ConnectorCreation2.png) + +BaseURL will be: `https://-aiplatform.googleapis.com/` ![alt text](images/ConnectorCreation3.png) Note: The hostname is https://yourregion-aiplatform.googleapis.com/ ![alt text](images/ConnectorCreation4.png) ![alt text](images/ConnectorCreation5.png) -3. With the Connection created, let's create our integration flow +1. With the Connection created, let's create our integration flow Go back to the integration, and click "Configure Connector" again. @@ -50,9 +53,11 @@ Choose the newly created Vertex connection ![alt text](images/ConnectorCreation6.png) Configure the connection as per the follwoing screenshot: + ![alt text](images/ConnectorCreation7.png) Back in the integration canvas, drag and drop an API trigger and a "Data Mapping" task into the canvas, and connect them, and change the connector taskname to "InvokeGemini" + ![alt text](images/IntegrationCreation1.png) 4. Configure the Data Mapper @@ -95,7 +100,11 @@ Exit the data mapper In the integration flow canvas, create a variable called "Output". It will hold the output from Gemini and return the output back to the caller of the integration ![alt text](images/CreateIntegration6.png) -To parse Gemini's response, we will use the "Data Transformer" task. Drag and drop a "Data Transformer" task and connect it at the end. +To parse Gemini's response, we will use the "Data Transformer" task. + +Drag and drop a "Data Transformer" task and connect it at the end. + +![alt text](images/CreateIntegration6a.png) Open the "Data Transformer" task, click "Script" at the top-right corner, delete the existing script, and paste the following: diff --git a/labs/Connectors/Gemini/images/ConnectorCreation2.png b/labs/Connectors/Gemini/images/ConnectorCreation2.png index abd04ed..c5f9218 100644 Binary files a/labs/Connectors/Gemini/images/ConnectorCreation2.png and b/labs/Connectors/Gemini/images/ConnectorCreation2.png differ diff --git a/labs/Connectors/Gemini/images/ConnectorCreation7.png b/labs/Connectors/Gemini/images/ConnectorCreation7.png index 199a5fe..705535d 100644 Binary files a/labs/Connectors/Gemini/images/ConnectorCreation7.png and b/labs/Connectors/Gemini/images/ConnectorCreation7.png differ diff --git a/labs/Connectors/Gemini/images/CreateIntegration6a.png b/labs/Connectors/Gemini/images/CreateIntegration6a.png new file mode 100644 index 0000000..d6442f9 Binary files /dev/null and b/labs/Connectors/Gemini/images/CreateIntegration6a.png differ diff --git a/labs/Connectors/Gemini/images/FinalIntegration.png b/labs/Connectors/Gemini/images/FinalIntegration.png index bcc3646..cc41475 100644 Binary files a/labs/Connectors/Gemini/images/FinalIntegration.png and b/labs/Connectors/Gemini/images/FinalIntegration.png differ diff --git a/labs/Connectors/Gemini/images/IntegrationCreation1.png b/labs/Connectors/Gemini/images/IntegrationCreation1.png index f9f2235..2e2355b 100644 Binary files a/labs/Connectors/Gemini/images/IntegrationCreation1.png and b/labs/Connectors/Gemini/images/IntegrationCreation1.png differ diff --git a/labs/Connectors/webhook-trigger/README.md b/labs/Connectors/webhook-trigger/README.md index 79103d5..6547feb 100644 --- a/labs/Connectors/webhook-trigger/README.md +++ b/labs/Connectors/webhook-trigger/README.md @@ -8,7 +8,7 @@ In this demo, we will use the Webhook Connector to trigger an integration. 2. In the navigation menu, click Integrations. The Integrations List page appears listing all the integrations available in the Google Cloud project. 3. Select an existing integration or click Create integration to create a new one. If you are creating a new integration: 1. Enter a name `-webhook-trigger` and description in the Create Integration pane - 2. Select a region for the integration + 2. Select a region for the integration, if asked. 3. Click Create 4. This opens the integration in the integration editor 5. In the integration editor navigation bar, click Triggers to view the list of available triggers @@ -50,7 +50,7 @@ To configure the Webhook trigger using a new Webhook connection, perform the fol 6. With the Connection created, let's provide the following configuration details in the Connector Event Trigger Editor page: 1. **Region:** Select the region of your Webhook connection. 2. **Connection:** Select the Webhook connection that you want to use. Application Integration only displays those Webhook connections that are active and have an event [subscription](https://cloud.google.com/integration-connectors/docs/eventsubscription) enabled. - 3. **Event subscription type:** Enter the type of event that you want to use to trigger the integration. Type `issues` + 3. **Custom Event type ID:** Enter the type of event that you want to use to trigger the integration. Type `issues` 4. **Service Account:** Select a service account with the [required IAM roles](https://cloud.google.com/application-integration/docs/configure-webhook-trigger#iam) for the Webhook trigger. 5. Press Done. @@ -71,9 +71,11 @@ To configure the Webhook trigger using a new Webhook connection, perform the fol 8. Publish the Integration. Use curl to test it ```sh + export URL=https:// + curl -X POST \ -H "X-GitHub-Event: issues" \ - https://YOUR_EVENT_LISTENER_URL \ + "$URL" \ -d '{"event_type" : "issue created"}' ``` diff --git a/labs/IntegrationCore/data-manipulation/README.md b/labs/IntegrationCore/data-manipulation/README.md index 4286591..4aa9fc0 100644 --- a/labs/IntegrationCore/data-manipulation/README.md +++ b/labs/IntegrationCore/data-manipulation/README.md @@ -10,7 +10,7 @@ In this lab, we will explore different ways of handling the response and mashing 1. Login to your GCP console, select your GCP project 2. Enable the Google Maps API. Set the PROJECT_ID env variable ```sh - export PROJECT_ID= + export PROJECT_ID=$(gcloud config get-value project) gcloud services enable \ --project "$PROJECT_ID" \ "elevation-backend.googleapis.com" \ @@ -174,11 +174,16 @@ Now let’s try using the Cloud Functions Task **NOTE:** DO NOT update the TriggerURL Parameter - | Parameter 1 | Parameter 2 | - |-------------|-------------| - | Key: **elevation** | Key: **geocode** | - | Type: **String** | Type: **String** | - | Value: **responseBody (Elevation API)** | Value: **responseBody (Geocoding API)** | + | Parameter 1 | Parameter 2 | + | -------------------------------- | -------------------------------- | + | Key: **elevation** | Key: **geocode** | + | Type: **String** | Type: **String** | + | Value: Click variable and choose | Value: Click Variable and choose | + | ![alt text](images/image.png) | ![alt text](images/image-1.png) | + | ![alt text](images/image-3.png) | ![alt text](images/image-2.png) | + + + Result should look like this: ![alt text](images/CloudFunctions.png) @@ -214,4 +219,6 @@ Now let’s try using the Cloud Functions Task ![alt text](images/CloudFunctions2.png) -10. Click Publish and Test the integration +10. Delete the Data Transfomer Task +11. Click Publish and Test the integration + diff --git a/labs/IntegrationCore/data-manipulation/images/image-1.png b/labs/IntegrationCore/data-manipulation/images/image-1.png new file mode 100644 index 0000000..e2b6ca6 Binary files /dev/null and b/labs/IntegrationCore/data-manipulation/images/image-1.png differ diff --git a/labs/IntegrationCore/data-manipulation/images/image-2.png b/labs/IntegrationCore/data-manipulation/images/image-2.png new file mode 100644 index 0000000..eac69e6 Binary files /dev/null and b/labs/IntegrationCore/data-manipulation/images/image-2.png differ diff --git a/labs/IntegrationCore/data-manipulation/images/image-3.png b/labs/IntegrationCore/data-manipulation/images/image-3.png new file mode 100644 index 0000000..8ce42ac Binary files /dev/null and b/labs/IntegrationCore/data-manipulation/images/image-3.png differ diff --git a/labs/IntegrationCore/data-manipulation/images/image.png b/labs/IntegrationCore/data-manipulation/images/image.png new file mode 100644 index 0000000..534bcfb Binary files /dev/null and b/labs/IntegrationCore/data-manipulation/images/image.png differ diff --git a/labs/IntegrationCore/error-catcher/README.md b/labs/IntegrationCore/error-catcher/README.md index 5e33b29..2871838 100644 --- a/labs/IntegrationCore/error-catcher/README.md +++ b/labs/IntegrationCore/error-catcher/README.md @@ -35,7 +35,7 @@ For this lab, we will create a Pub/Sub topic ```sh export PREFIX= - export PROJECT_ID= + export PROJECT_ID=$(gcloud config get-value project) export REGION= ``` diff --git a/labs/IntegrationCore/pub-sub-trigger-mapping-logs/README.md b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/README.md index 714ddd2..cc135fe 100644 --- a/labs/IntegrationCore/pub-sub-trigger-mapping-logs/README.md +++ b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/README.md @@ -36,9 +36,10 @@ Create a new integration by performing the following steps: 2. In the navigation menu, click Integrations. The Integrations List page appears. 3. Click **Create** integration. 4. Enter a name and description in the Create Integration dialog. For example, `-integration`. Replace the prefix with an appropriate value similar to the prefix you used in the above step while creating the Topic -5. Select a region for the integration +5. Select a region for the integration, if asked. 6. Click Create to open the integration editor -7. Enable logs to be sent to cloud logging by clicking on the gear icon ![alt text](images/gear_icon.png) at the top-right of the integration and a menu with integration details should appear as in the below screenshot +7. Enable logs to be sent to cloud logging by clicking on the gear icon ![alt text](images/gear_icon.png) at the top-right of the integration and a menu with integration details should appear as in the below screenshot. + ![alt text](images/enable-cloud-logging.png) 8. Drag the slider to the right to Enable Cloud Logging (to send Execution Logs to Cloud Logging) ## Create and Configure a Cloud Pub/Sub trigger @@ -78,11 +79,14 @@ To add a Cloud Pub/Sub trigger to the integration, follow the steps below: - Click TO_STRING() to transform the data type of the variable from double to string - Click the second row in the Output column to create a new variable to hold the value of the transformed data. Complete the following fields: - Name: `prefix-TempinCelsiusString` - - Blank default value means: Select : ”Empty String” - Within the Variable Type drop-down select the “Output from Integration” option + - Blank default value means: Select : ”Empty String” - Click Create to create the variable and close the pane. The new variable will appear in the Variables list on the left side of the data mapping editor - Confirm your data mapping is as below and exit by clicking the `<-` button on the top left ![alt text](images/datamapping2.png) +2. Click the back button to go back to the integration editor + + ![alt text](images/back-to-int-editor.png) ## Creating a Send Email task @@ -94,6 +98,9 @@ To configure the Send Email task: 1. To Recipient(s): Enter your email address. You will use this email to confirm the successful completion of the integration. 2. Subject: Enter Temperature in Celsius. 3. Body in Plain Text: Select the prefix-TempInCelsiusString variable created earlier in the Data Mapping task. + + ![alt text](images/TempInCelsiusString-var.png) + 4. The remaining options can be left in the default configuration. Add the required edge connections diff --git a/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/TempInCelsiusString-var.png b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/TempInCelsiusString-var.png new file mode 100644 index 0000000..5134f8c Binary files /dev/null and b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/TempInCelsiusString-var.png differ diff --git a/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/back-to-int-editor.png b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/back-to-int-editor.png new file mode 100644 index 0000000..622a35d Binary files /dev/null and b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/back-to-int-editor.png differ diff --git a/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/enable-cloud-logging.png b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/enable-cloud-logging.png new file mode 100644 index 0000000..0102a05 Binary files /dev/null and b/labs/IntegrationCore/pub-sub-trigger-mapping-logs/images/enable-cloud-logging.png differ diff --git a/labs/ProductionReadiness/IntegrationCLI/README.md b/labs/ProductionReadiness/IntegrationCLI/README.md index 7301a67..8a92a71 100644 --- a/labs/ProductionReadiness/IntegrationCLI/README.md +++ b/labs/ProductionReadiness/IntegrationCLI/README.md @@ -62,21 +62,21 @@ Click on "Cloud Shell" on the top right corner of the browser tab, which opens c Run the following commands in Cloud Shell: -``` - -curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh - +```sh + curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh - -export PATH=$PATH:$HOME/.integrationcli/bin + export PROJECT_ID=$(gcloud config get-value project) + export PATH=$PATH:$HOME/.integrationcli/bin -integrationcli --version + integrationcli --version -token=$(gcloud auth print-access-token) + token=$(gcloud auth print-access-token) -project= + project=$PROJECT_ID -region= + region= -integrationcli prefs set -p $project -r $region -t $token + integrationcli prefs set -p $project -r $region -t $token ``` Your outputs should be as seen in the screenshot below: