Skip to content

Commit

Permalink
Add support for APIM 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PasanT9 committed Mar 21, 2023
1 parent 9567b1a commit 25fec40
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 89 deletions.
7 changes: 3 additions & 4 deletions database/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# WSO2 API Manager deployment with WSO2 Micro Integrator - Database

This is the phase two of deploying WSO2 API Manager deployment with WSO2 Micro Integrator. Use the [database.yaml](database.yaml) to create the required Database. The following are the tested database versions at the moment.

```
- MySQL-5.7
- MySQL-8.0
- Postgres-11.15
- Postgres-12.10
- Postgres-14.6
- Postgres-15.2
- Oracle-SE2-19
- SQLServer-SE-13.00
- SQLServer-SE-14.00
- SQLServer-SE-15.00
```

If you already have a preconfigured database, please proceed to [Phase 3](../product/README.md).
Expand Down
19 changes: 10 additions & 9 deletions database/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,18 @@ Parameters:
- db.m3.2xlarge
- db.m4.large
- db.m4.xlarge
- db.m5.large
DB:
Type: String
Default: MySQL-5.7
AllowedValues:
- MySQL-5.7
- MySQL-8.0
- Postgres-11.15
- Postgres-12.10
- Postgres-14.6
- Postgres-15.2
- Oracle-SE2-19
- SQLServer-SE-13.00
- SQLServer-SE-14.00
- SQLServer-SE-15.00
EnvironmentName:
Type: String
Description: An environment name that is prefixed to resource names
Expand All @@ -182,14 +183,14 @@ Mappings:
DBEngine: "mysql_5.7"
MySQL-8.0:
DBEngine: "mysql_8.0"
Postgres-11.15:
DBEngine: "postgres_11.15"
Postgres-12.10:
DBEngine: "postgres_12.10"
SQLServer-SE-13.00:
DBEngine: "sqlserver-se_13.00"
Postgres-14.6:
DBEngine: "postgres_14.6"
Postgres-15.2:
DBEngine: "postgres_15.2"
SQLServer-SE-14.00:
DBEngine: "sqlserver-se_14.00"
SQLServer-SE-15.00:
DBEngine: "sqlserver-se_15.00"
Oracle-SE2-19:
DBEngine: "oracle-se2_19"
Conditions:
Expand Down
2 changes: 1 addition & 1 deletion pattern-1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository contains CloudFormation templates to deploy WSO2 API Manager Pat
1. Checkout this repository into your local machine using the following Git command.
```
git clone https://github.com/wso2/aws-apim.git
git checkout 4.1.x
git checkout 4.2.x
```

2. Go to [AWS console](https://console.aws.amazon.com/ec2/v2/home#KeyPairs:sort=keyName) and specify a key value pair for authentication in a preferred region. <br>
Expand Down
19 changes: 9 additions & 10 deletions pattern-1/nested-pattern-1-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,21 @@ Parameters:
AllowedValues:
- MySQL-5.7
- MySQL-8.0
- Postgres-11.15
- Postgres-12.10
- Postgres-14.6
- Postgres-15.2
- Oracle-SE2-19
- SQLServer-SE-13.00
- SQLServer-SE-14.00
- SQLServer-SE-15.00

JDK:
Description: Choose preffered JDK from the list
Type: String
Default: "ORACLE_JDK8"
Default: "TEMURIN_JDK17"
AllowedValues:
- "ORACLE_JDK8"
- "CORRETTO_JDK8"
- "TEMURIN_JDK8"
- "CORRETTO_JDK11"
- "TEMURIN_JDK11"
- "CORRETTO_JDK17"
- "TEMURIN_JDK17"

KeyPairName:
Description: The private key used to log in to instances through SSH
Expand All @@ -134,7 +133,7 @@ Resources:
WSO2Network:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/network.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/network.yaml
TimeoutInMinutes: '30'
Parameters:
KeyPairName: !Ref KeyPairName
Expand All @@ -145,7 +144,7 @@ Resources:
Database:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/database.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/database.yaml
TimeoutInMinutes: '30'
Parameters:
DBUsername: !Ref DBUsername
Expand All @@ -162,7 +161,7 @@ Resources:
WSO2APIManagerSetup:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/pattern-1.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/pattern-1.yaml
TimeoutInMinutes: '30'
Parameters:
AWSAccessKeyId: !Ref AWSAccessKeyId
Expand Down
20 changes: 10 additions & 10 deletions pattern-1/nested-pattern-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Parameters:
- db.m3.2xlarge
- db.m4.large
- db.m4.xlarge
- db.m5.large

DB:
Description: Choose preffered Database from the list
Expand All @@ -164,11 +165,11 @@ Parameters:
AllowedValues:
- MySQL-5.7
- MySQL-8.0
- Postgres-11.15
- Postgres-12.10
- Postgres-14.6
- Postgres-15.2
- Oracle-SE2-19
- SQLServer-SE-13.00
- SQLServer-SE-14.00
- SQLServer-SE-15.00

ElasticSearchEndpoint:
Description: If you have ElasticSearch endpoint to publish logs, else keep this empty
Expand All @@ -194,13 +195,12 @@ Parameters:
JDK:
Description: Choose preffered JDK from the list
Type: String
Default: "ORACLE_JDK8"
Default: "TEMURIN_JDK17"
AllowedValues:
- "ORACLE_JDK8"
- "CORRETTO_JDK8"
- "TEMURIN_JDK8"
- "CORRETTO_JDK11"
- "TEMURIN_JDK11"
- "CORRETTO_JDK17"
- "TEMURIN_JDK17"

VpcCIDR:
Description: Please enter the IP range (CIDR notation) for this VPC
Expand Down Expand Up @@ -277,7 +277,7 @@ Resources:
WSO2Network:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/network.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/network.yaml
TimeoutInMinutes: '60'
Parameters:
EnvironmentName: !Ref EnvironmentName
Expand All @@ -296,7 +296,7 @@ Resources:
Database:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/database.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/database.yaml
TimeoutInMinutes: '60'
Parameters:
DBUsername: !Ref DBUsername
Expand All @@ -315,7 +315,7 @@ Resources:
WSO2APIManagerSetup:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/apim-4.1.0-cfn/pattern-1.yaml
TemplateURL: https://s3.amazonaws.com/apim-4.2.0-cfn/pattern-1.yaml
TimeoutInMinutes: '60'
Parameters:
AWSAccessKeyId: !Ref AWSAccessKeyId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ config_endpoint = "<%= @analytics_config_endpoint %>"
auth_token = "<%= @analytics_auth_token %>"

[apim.key_manager]
enable_apikey_subscription_validation = true
service_url = "<%= @key_manager_server_url %>"
#username = "$ref{super_admin.username}"
#password = "$ref{super_admin.password}"
Expand Down Expand Up @@ -258,6 +259,7 @@ id = "token_revocation"
type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler"
name = "org.wso2.is.notification.ApimOauthEventInterceptor"
order = 1

[event_listener.properties]
notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify"
username = "${admin.username}"
Expand Down
35 changes: 16 additions & 19 deletions pattern-1/puppet/apim_common/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class apim_common::params {

$packages = ["unzip"]
$version = "4.1.0"
$version = "4.2.0"

# Set the location the product packages should reside in (eg: "local" in the /files directory, "remote" in a remote location)
$pack_location = "local"
Expand Down Expand Up @@ -49,21 +49,18 @@

# JDK Distributions
# WSO2 TestGrid specific configuration Params
if $jdk_version == 'ORACLE_JDK8' {
$jdk_file_name = "jdk-8u311-linux-x64.tar.gz"
$jdk_name = "jdk1.8.0_311"
} elsif $jdk_version == 'CORRETTO_JDK8' {
$jdk_file_name = "amazon-corretto-8.322.06.2-linux-x64.tar.gz"
$jdk_name = "amazon-corretto-8.322.06.2-linux-x64"
} elsif $jdk_version == 'TEMURIN_JDK8' {
$jdk_file_name = "OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz"
$jdk_name = "jdk8u322-b06"
} elsif $jdk_version == 'CORRETTO_JDK11' {
$jdk_file_name = "amazon-corretto-11.0.14.10.1-linux-x64.tar.gz"
$jdk_name = "amazon-corretto-11.0.14.10.1-linux-x64"
if $jdk_version == 'CORRETTO_JDK11' {
$jdk_file_name = "amazon-corretto-11.0.18.10.1-linux-x64.tar.gz"
$jdk_name = "amazon-corretto-11.0.18.10.1-linux-x64"
} elsif $jdk_version == 'TEMURIN_JDK11' {
$jdk_file_name = "OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz"
$jdk_name = "jdk-11.0.14_9"
$jdk_file_name = "OpenJDK11U-jdk_x64_linux_hotspot_11.0.18_10.tar.gz"
$jdk_name = "jdk-11.0.18_10"
} elsif $jdk_version == 'CORRETTO_JDK17' {
$jdk_file_name = "amazon-corretto-17.0.6.10.1-linux-x64.tar.gz"
$jdk_name = "amazon-corretto-17.0.6.10.1-linux-x64"
} elsif $jdk_version == 'TEMURIN_JDK17' {
$jdk_file_name = "OpenJDK17U-jdk_x64_linux_hotspot_17.0.6_10.tar.gz"
$jdk_name = "jdk-17.0.6_10"
}

$java_dir = "/opt"
Expand Down Expand Up @@ -125,7 +122,7 @@
name => 'Default',
provider => 'wso2',
description => 'This is a hybrid gateway that handles both production and sandbox token traffic.',
server_url => 'https://localhost:${mgt.transport.https.port}${carbon.context}services/',
server_url => 'https://localhost:${mgt.transport.https.port}/services/',
ws_endpoint => 'ws://CF_ELB_DNS_NAME:9099',
wss_endpoint => 'wss://CF_ELB_DNS_NAME:8099',
http_endpoint => 'http://CF_ELB_DNS_NAME:${http.nio.port}',
Expand All @@ -135,11 +132,11 @@
}
]

$key_manager_server_url = 'https://localhost:${mgt.transport.https.port}${carbon.context}services/'
$key_validator_thrift_server_host = 'localhost'
$key_manager_server_url = 'https://CF_ELB_DNS_NAME:${mgt.transport.https.port}/services/'
$key_validator_thrift_server_host = 'CF_ELB_DNS_NAME'

$api_devportal_url = 'https://CF_ELB_DNS_NAME:${mgt.transport.https.port}/devportal'
$api_devportal_server_url = 'https://CF_ELB_DNS_NAME:${mgt.transport.https.port}${carbon.context}services/'
$api_devportal_server_url = 'https://CF_ELB_DNS_NAME:${mgt.transport.https.port}/services/'

$traffic_manager_receiver_url = 'tcp://${carbon.local.ip}:${receiver.url.port}'
$traffic_manager_auth_url = 'ssl://${carbon.local.ip}:${auth.url.port}'
Expand Down
Loading

0 comments on commit 25fec40

Please sign in to comment.