You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -18,25 +25,27 @@ This repository holds an agent implementation Java project for connecting Amazon
18
25
5. Retrieving metrics from Amazon API Gateway to API Control Plane.
19
26
20
27
This project is developed using **Java 17** and **Gradle 7.4.2**<br>
21
-
If you plan to upgrade *Gradle*, ensure that you also upgrade the supported *Java version* accordingly. For details about the compatibility between *Java* and *Gradle* versions, see [Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html).
28
+
If you use different versions of *Java* or *Gradle*, ensure they are compatible with each other. For details about the compatibility between Java and Gradle versions, see [Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html).
The implementation utilizes the **Manual** approach of Agent SDK and provides options for deploying the AWS agent as a stand-alone application. For details about the approaches and deployment modes, see [Agent SDK](https://docs.webmethods.io/apicontrolplane/agent_sdk/chapter2wco/#gsc.tab=0) documentation.
48
+
The implementation utilizes the **Manual** approach of Agent SDK and provides options for deploying the AWS agent as a stand-alone application. For details about the approaches and deployment modes, see **Agent** section in [API Control Plane](https://docs.webmethods.io/#api-management-saas) documentation.
40
49
The implementation leverages the following Amazon services:
41
50
-**AWS SDK** for connection management and authentication.
42
51
-**Amazon CloudWatch** service for retrieving API metrics.
@@ -49,6 +58,8 @@ The AWS agent can be deployed in the following ways:
49
58
-**Spring Boot application**
50
59
-**AWS Lambda**<br>
51
60
61
+
To understand the differences between Spring Boot application and AWS Lambda deployment modes, see [Differences](docs/differences.md).
62
+
52
63
For a detailed understanding of how the agent for Amazon API Gateway is implemented, see [Core Implementation Logic](docs/core-logic.md).
53
64
54
65
The AWS agent developer can utilize this repository in the following ways:
Copy file name to clipboardexpand all lines: devops/readme.md
+14-5
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,17 @@ Let’s look at a sample scenario through which you can build a Gradle project u
5
5
6
6
**Pre-requisites**
7
7
8
-
Ensure that you have:
8
+
Ensure that you have
9
9
10
10
- Cloned **webmethods-api-control-plane-agent-aws** Git Hub repository using any GIT client.
11
-
- Downloaded the **IBM webMethods API Control Plane 3rd Party Runtime Agent SDK** zip file from [IBM Integration Community](https://community.ibm.com/community/user/integration/communities/community-home/all-news?communitykey=82b75916-ed06-4a13-8eb6-0190da9f1bfa&LibraryFolderKey=&DefaultView=&8e5b3238-cf51-4036-aa29-601a6cd3e1b3=eyJsaWJyYXJ5ZW50cnkiOiJhMDAxMzc2Ni0wMWNiLTQ3ZDUtYmQ3Yi0wMTkyNDllNDZjYzIifQ==).
12
-
- Copy and pasted the Agent SDK (api, core, and model) Jars from the extracted folder into the [Libs](../libs) directory in the cloned (api-controlplane-agent-aws) repository.
11
+
- Empower portal login credentials to download the Agent SDK Jars. For details, see [How to access Agent SDK Jars](https://docs.webmethods.io/apicontrolplane/agent_sdk/chapter2wco#ta-implementing_agentsdk).
12
+
- Installed **Java 17** and Gradle **7.4.2**<br>
13
+
If you use different versions of *Java* or *Gradle*, ensure they are compatible with each other. For details about the compatibility between Java and Gradle versions, see [Compatibility Matrix](https://docs.gradle.org/current/userguide/compatibility.html).
13
14
14
15
15
16
**To build the Gradle project**
16
17
17
-
1. Unzip Agent SDK folder downloaded from IBM Integration Community and place the (api, core, and model) Jars under *lib* folder in the cloned repository.
18
+
1. Unzip Agent SDK folder downloaded from the Empower portal and place the (api, core, and model) Jars under *lib* folder in the cloned repository.
18
19
19
20
2. Open Visual Studio Code editor.
20
21
@@ -28,11 +29,19 @@ Ensure that you have:
28
29
29
30
*Build Successful* message appears, and the following Jars are created for the application and Lambda functions:
30
31
31
-
**Spring Boot application**: **application-<version>-SNAPSHOT** is created at *application / build / libs* <br>
32
+
**Spring Boot application**: **application-version-SNAPSHOT** is created at *application / build / libs* <br>
32
33
33
34
**AWS Lambda**: <br>
34
35
- **lambda-layer.zip** is created at *functions / build / libs*, which includes all dependencies to run lambda function.<br>
35
36
- **send-asset.jar** is created at *functions / send–asset / build / libs* <br>
36
37
- **send-heartbeat.jar** is created at *functions / send-heartbeat / build / libs* <br>
37
38
- **send-metrics.jar** is created at *functions / send-metrics / build / libs*
39
+
40
+
**Troubleshooting Tips**: For permission denied issues: <br>
41
+
1. Verify if the Gradle has execution permissions. <br>
Copy file name to clipboardexpand all lines: docs/core-logic.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,7 @@ Let’s understand the logic of how the agent for Amazon API Gateway is implemen
9
9
2.**Retrieving Amazon API Gateway’s health status and sending it to API Control Plane**.
10
10
11
11
1. The agent retrieves all REST APIs from the Amazon API Gateway.
12
-
2. For each API, the agent verifies if the API is associated with the specified stage (from the properties).
13
-
3. If the API is associated with the stage, the agent sends the health status (heartbeat) of the runtime (stage) as *active* to API Control Plane.<br><br>
12
+
2. The agent verifies if at least one API is deployed to the specified stage in the given region (as per the properties). If an API is deployed, the agent sends the runtime (stage) health status as *active* to the API Control Plane.<br><br>
14
13
15
14
3.**Publishing Amazon API Gateway’s assets to API Control Plane**.
| Stage |Runtime | A stage in Amazon API Gateway is considered as a runtime in API Control Plane. |
7
-
| Deployment | API Versions | A deployment in Amazon API Gateway is a snapshot that tracks an API's version. An API in Amazon API Gateway can have multiple deployments, but only one can be active per stage at a time. <br><br> In the API Control Plane, each deployment is called an API version. For example, if an API has two deployments published to two different stages, it is treated as two different versions of the same API in API Control Plane. |
8
-
9
-
## How to identify a unique stage in Amazon Gateway?
10
-
11
-
Every unique *stage* within each region in AWS API Gateway is considered as a separate runtime in the API Control Plane. Hence, you must deploy an agent for each unique stage.
12
-
13
-
For example: Assume that you have two accounts in **AWS** and each account has **AWS API Gateway** with APIs in the following regions and stages:
14
-
15
-
**Account 1**:
16
-
-*Region 1*: us-east-1
17
-
-*Stage*: dev (In APICP, this stage appears as **dev-account1-ue1** runtime from account 1 in region us-east-1)
18
-
-*API*s: API1, API2
19
-
-*Stage*: qa (In APICP, this stage appears as **qa-account1-ue1** runtime from account 1 in region us-east-1)
20
-
-*APIs*: API1, API2
21
-
-*Region 2*: us-east-2
22
-
-*Stage*: dev (In APICP, this stage appears as **dev-account1-uw2** runtime from account 1 in region us-east-2)
23
-
- APIs: API3
24
-
-*Stage*: preprod (In APICP, this stage appears as **preprod-account1-uw2** runtime from account 1 in region us-east-2)
25
-
-*APIs*: API3
26
-
-*Stage*: prod (In APICP, this stage appears as **prod-account1-uw2** runtime from account 1 in region us-east-2)
27
-
-*APIs*: API3
28
-
29
-
**Account 2**:
30
-
-*Region 1*: us-east-1
31
-
-*Stage*: dev (In APICP, this stage appears as **dev-account2-ue1** runtime from account 2 in region us-east-1)
32
-
-*APIs*: API4
33
-
-*Stage*: prod (In APICP, this stage appears as **prod-account2-ue1** runtime from account 2 in region us-east-1)
34
-
-*APIs*: API4
35
-
36
-
37
-
Please see the following diagram to understand how the stages are treated as different runtimes in the API Control Plane.
38
-
39
-

40
-
41
-
7
+
| Deployment | API Versions | A deployment in Amazon API Gateway is a snapshot that tracks an API's version. An API in Amazon API Gateway can have multiple deployments, but only one can be active per stage at a time. <br><br> In the API Control Plane, each deployment is called an API version. For example, if an API has two deployments published to two different stages, it is treated as two different versions of the same API in API Control Plane.<br>When there are multiple deployments of an API to a stage, only the active deployment is synchronized with API Control Plane. |
42
8
9
+
A *Stage* in Amazon API Gateway created within a *region* and belonging to an *AWS account* is treated as an *individual runtime* in API Control Plane. As per the current implementation of the AWS agent, it requires one agent to be deployed for every stage-runtime mapping.
|**Deployment**| Deployed like a regular server. | Deployed as Function as a Service (FaaS) on AWS Lambda|
9
+
|**Maintenance and Availability**|**High maintenance**<br> User must manage deployment for full availability. |**Low maintenance**<br> For FaaS flavours, cloud hosting service providers such as *AWS* handles availability once deployed. |
10
+
|**Resource Consumption and Cost**| Server runs 24x7, even with sparse utilization. | AWS provider manages and runs the code only when invoked. Charges are incurred only based on number of invocations and runtime. <br> More **cost effective** compared to regular hosted solutions.|
11
+
|**Implementation**| A *single implementation* of spring boot application handles all three use cases of an agent: *assets synchronization*, *heartbeats synchronization*, and *metrics synchronization*. | Each Lambda function handles one use case of an agent. To achieve *assets synchronization*, *heartbeats synchronization*, and *metrics synchronization*, deploy three separate Lambda functions. |
12
+
|**Schedule**| The frequency of the synchronization of heartbeats, assets, and metrics from the runtime to API Control Plane is maintained by the agent application code. Each activity gets triggered based on the *configured synchronization intervals*. | The schedule of the Lambda function is maintained in AWS component, **Amazon EventBridge**. The Lambda function gets triggered based on the intervals configured in EventBridge.<br> The schedule configured in EventBridge should match with with the synchronization intervals configured in the Lambda environment properties for smooth functioning. |
13
+
|**Suitability**| Ideal for on-prem deployment flavour. | Suitable for hosted solutions. <br>Best in terms of maintenance and cost compared to other hosted flavours. |
0 commit comments