AWS Deployment Artefacts
Marketing Catalog Microservices for AWS deployment is available as single release bundle. For example, ms-marketingcatalog-package-aws-<release_number>.zip. It consists of the ms-marketingcatalog-package-aws-<release_number>.jar file and AWS script files.
- The install-aws.sh/install-aws-postgresql.sh/install-aws-ms.sh script is used to deploy the Marketing Catalog Microservices in AWS.
- Use the respective destroy-aws.sh/destroy-aws-postgresql.sh/destroy-aws-ms.sh script to undeploy and remove the resources.
The OAS Swagger json document is available in the location /ms-marketingcatalog-package-aws-<release_number>.jar/api/marketingcatalog.yaml path.
Deployment of Marketing Catalog Microservice in AWS:
AWS CLI and Python 2.7.x must be installed prior to the deployment.
DynamoDB
- Obtain the generated zip file (from target folder) in the installation directory. Unzip it.
- In order to enable deployments on multiple environments(dev,uat,prod etc) for same microservices within same account , set DEPLOYMENT_ENVIRONMENT variable with the respective value.
- To enable the in-house authentication in addition to API key, perform the JWT Authentication in the installation scripts.
- Perform the XACML configurations in the installation scripts to enable security policies and access rights to the APIs
- Perform Keycloak configuration in ingester container to enable third party authentication.
- Verify the below properties related to ingestion in the install script.
- In AWS command line, navigate to the installation directory
- Modify the region information in the install-aws.sh script specific to your installation
| Environment Variable | Description | Example |
|---|---|---|
|
temn_msf_schema_registry_url |
URL of the schema registry | http://localhost:8081 |
|
HTTP_BASE_PATH |
Base path of the IRF provider container | http://<IP>:<PORT>/irf-provider-container/api/v1.0.0/ |
|
HTTP_RESOURCE_PATH |
Resource path of IRIS API used by marketing catalog Microservice - "product/{productId}/productConditions" | product/{productId}/productConditions |
Examples:
- --region us-west-2
- --event-source-arn arn:aws:kinesis:us-west-2
- --uri arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2
9. To deploy the Microservice, execute shell script to create the resources
| Script | Description |
|---|---|
| install-aws-ms.sh | To deploy only the components necessary for Microservice. Data Event Streaming (DES) is presumed to deployed and running already. The streaming services will not be deployed. |
| install-aws.sh | To deploy all the necessary components for a Microservice including streaming services will be deployed, in order to run the Microservice independently. |
10. Post-deployment login into AWS portal and verify the lambda and API gateways are created properly.
Lambda Functions
API Gateways
11. To obtain the API key for all the endpoints in AWS, navigate to API Key section under the Amazon API gateway and select the corresponding API key, then click on show. The API key has to be a part of header (x-api-key) in all the requests.
12. After the successful deployment database, collections and the reference data(master data) are loaded into the dynamo database for marketing catalog Microservice.
13. The Base path of the API gateway URL follows the below structure
Base URI
https://<REST-API-ID>.execute-api.<LOCATION>.amazonaws.com/<DEPLOYMENT_ID>
For example, https://7061g8fb9d.execute-api.eu-west-2.amazonaws.com/ms-marketingcatalog-api
Resource path of the endpoint can be found in the swagger document.
A sample endpoint of marketing catalog can be https://7061g8fb9d.execute-api.eu-west-2.amazonaws.com/ms-marketingcatalog-api/v1.0.0/product/products/marketingCatalogue.
Rest API Id can be obtained from Amazon API Gateway
Location and deployment Id should be replaced with the appropriate values provided in the script during deployment.
PostgreSQL
- Obtain the generated zip file (from target folder) in the installation directory. Unzip it.
- Inorder to enable deployments on multiple environments(dev,uat,prod etc) for same microservices within same account , set DEPLOYMENT_ENVIRONMENT variable with respective value.
- To enable the in-house authentication in addition to API key, perform the JWT Authentication in the installation scripts.
- Perform the XACML configurations in the installation scripts to enable security policies and access rights to the APIs
- Perform Keycloak configuration in ingester container to enable third party authentication.
- Verify the below properties related to ingestion in the install script.
| Environment Variable | Description | Example |
|---|---|---|
|
HTTP_BASE_PATH |
Base path of the IRF provider container | http://<IP>:<PORT>/irf-provider-container/api/v1.0.0/ |
|
HTTP_RESOURCE_PATH |
Resource path of IRIS API used by marketing catalog Microservice - "product/{productId}/productConditions" | product/{productId}/productConditions |
|
temn_msf_schema_registry_url |
URL of the schema registry | http://localhost:8081 |
- In AWS command line, navigate to the installation directory
- Modify the region information in the install-aws-postgresql.sh script specific to your installation
Examples:
- --region us-west-2
- --event-source-arn arn:aws:kinesis:us-west-2
- --uri arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2
- To deploy the Microservice, execute shell script to create the resources
| Script | Description |
|---|---|
| install-aws-postgresql.sh | To deploy all the necessary components for a Microservice including streaming services will be deployed, in order to run the Microservice independently. |
| install-aws-postgresql-ms.sh | To deploy only the components necessary for Microservice. Data Event Streaming (DES) is presumed to deployed and running already. The streaming services will not be deployed |
- Post-deployment login into AWS portal and verify the lambda and API gateways are created properly.
Lambda functions
API Gateways
- To obtain the API key for all the endpoints in AWS, navigate to API Key section under the Amazon API gateway and select the corresponding API key, then click on show. The API key has to be a part of header (x-api-key) in all the requests.
- After the successful deployment database, collections and the reference data(master data) are loaded into the PostgreSQL database for marketing catalog Microservice.
13. The Base path of the API gateway URL follows the below structure
Base URI
https://<REST-API-ID>.execute-api.<LOCATION>.amazonaws.com/<DEPLOYMENT_ID>
For example, https://7061g8fb9d.execute-api.eu-west-2.amazonaws.com/ms-marketingcatalog-api
Resource path of the endpoint can be found in the swagger document.
A sample endpoint of marketing catalog can be https://7061g8fb9d.execute-api.eu-west-2.amazonaws.com/ms-marketingcatalog-api/v1.0.0/product/products/marketingCatalogue.
Rest API Id can be obtained from Amazon API Gateway
Location and deployment Id should be replaced with the appropriate values provided in the script during deployment.
In this topic