mirror of
https://github.com/hoshikawa2/oic_migration_api.git
synced 2026-03-03 16:19:38 +00:00
Including files
This commit is contained in:
17
.idea/aws.xml
generated
Normal file
17
.idea/aws.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="accountSettings">
|
||||
<option name="activeProfile" value="profile:default" />
|
||||
<option name="activeRegion" value="us-east-2" />
|
||||
<option name="recentlyUsedProfiles">
|
||||
<list>
|
||||
<option value="profile:default" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="recentlyUsedRegions">
|
||||
<list>
|
||||
<option value="us-east-2" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/markdown.xml
generated
Normal file
9
.idea/markdown.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MarkdownSettings">
|
||||
<enabledExtensions>
|
||||
<entry key="MermaidLanguageExtension" value="true" />
|
||||
<entry key="PlantUMLLanguageExtension" value="true" />
|
||||
</enabledExtensions>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/oic_migration_api.iml" filepath="$PROJECT_DIR$/.idea/oic_migration_api.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/oic_migration_api.iml
generated
Normal file
9
.idea/oic_migration_api.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 212 KiB |
66
index.md
66
index.md
@@ -1,4 +1,4 @@
|
||||
# Migrate your APIs to Oracle Cloud API Gateway
|
||||
# Migrate your APIs to Oracle Cloud API Gateway with Oracle Integration
|
||||
|
||||
## Introduction
|
||||
|
||||
@@ -227,66 +227,124 @@
|
||||
|
||||
## Task 2: Create Connections
|
||||
|
||||

|
||||

|
||||

|
||||
There are 2 connections we need to create. First connection is the Trigger REST Connection. This connection will be used to expose an endpoint in Oracle Integration. With this endpoint, you can call the migration process as a REST service, passing the source data of your APIs.
|
||||
|
||||
The second connection will be used to call the OCI API Gateway REST service to create your APIs deployments.
|
||||
The OCI API Gateway REST documentation can be read here: [Deploying APIs via REST](https://docs.oracle.com/en-us/iaas/api/#/en/api-gateway/20190501/Deployment/CreateDeployment)
|
||||
|
||||
If you don't know how to create an Oracle Integration Connection, you can view here: [Create a REST Connection](https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-adapter/create-connection.html#GUID-07B2A588-6DB8-47A9-A206-51B4132B0DA1)
|
||||
|
||||
1. Search the REST Adapter:
|
||||

|
||||
2. Give a name and identifier, for example, give the name "REST_EXPOSE". This is the first connection. Select the Trigger Role. Trigger Role means you will expose the connection as a REST endpoint.
|
||||

|
||||
3. For your Trigger Endpoint, you can execute a request with the Oracle Integration Basic Authentication. So, you can use an username and password.
|
||||

|
||||
4. In the second connection, as you did in the first connection, give a name and identifier (for example, "APIGW_REST_API"). Select the proper OCI API Gateway REST for your region (in the example, the region is Ashburn). See here to view the proper endpoint for your region [OCI API Gateway endpoints](https://docs.oracle.com/en-us/iaas/api/#/en/api-gateway/20190501/). Obtain your OCI Credentials to provide access to the OCI API gateway services.
|
||||

|
||||
|
||||
## Task 3: Create the Integration
|
||||
|
||||
The process of migrate your APIs source metadata to the OCI API Gateway is:
|
||||
|
||||
- Expose the Trigger as a REST Service in Oracle Integration
|
||||
- Initialize the Targets OCI API Gateways (environments like QA and DEV)
|
||||
- Initialize the Compartments for the targets
|
||||
- Execute a Loop to process all APIs in the source metadata
|
||||
- Translate the source metadata to the OCI API Gateway metadata
|
||||
- Execute a Request REST Service to the OCI API Gateway
|
||||
|
||||

|
||||
|
||||
1. Expose your Integration with your Trigger REST Connection created previously
|
||||
|
||||

|
||||
|
||||
2. Give a name to your request endpoint
|
||||

|
||||
|
||||
3. Give a path (for example, /convert) and select the POST method. Remember to stablish a request payload.
|
||||

|
||||
|
||||
4. Now you can select the "JSON Sample" and paste your JSON source structure
|
||||

|
||||
|
||||
5. Paste the JSON here
|
||||

|
||||
|
||||
6. Now let's initialize the variables for your API Gateways instance (each environment is a new API Gateway instance). Create a variable for the METHOD. Remember you can use several methods in REST (GET, POST, PUT, DELETE, ANY) and need to use POST in SOAP Services.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
7. Create a FOR EACH Loop. This will process the source JSON list
|
||||
|
||||

|
||||
|
||||
8. Edit the For Each Action and drag and drop your Loop Level Array to the "Repeating Element" Attribute
|
||||

|
||||
|
||||
9. Now let's configure the environment redirection. Create a Switch Action and put the IFs and the assignments for each condition.
|
||||
|
||||

|
||||
|
||||
10. Create the first condition for the QA environment
|
||||
|
||||

|
||||
|
||||
11. Verify in the source metadata ENVIRONMENT attribute and test if has "QA" value.
|
||||

|
||||
|
||||
12. If the condition is true, you need to assign the correct environment. A GatewayID and CompartmentID is an OCID value. You need to assign the correct IDs to the variables.
|
||||

|
||||
|
||||
13. Do the same for the other environments
|
||||
|
||||

|
||||
|
||||
14. Now let's view if your API is a REST or SOAP service. If your API is a SOAP service, you must configure the Method as POST.
|
||||
|
||||

|
||||
|
||||
15. Create an IF condition to test the service type
|
||||

|
||||
|
||||
16. Assign the POST value to the method variable
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
17. In other situations, the source attribute gives the correct method
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
18. Let's map the source metadata attributes to the OCI API Gateway parameters. Before the mapping action, you need to configure the OCI API Gateway REST Adapter.
|
||||
|
||||

|
||||
|
||||
19. Configure first the connection
|
||||
|
||||

|
||||
|
||||
20. Give a name for this service. The path must be /deployments and the method must be POST. Remember to configure the request payload.
|
||||
|
||||

|
||||
|
||||
21. You can't paste the JSON OCI API Gateway structure because of the large size of it. So you need to upload a file with the content. The complete JSON Structure is here [apigw_structure.json](files%2Fapigw_structure.json)
|
||||
|
||||

|
||||
|
||||
22. And finally, map the target metadata
|
||||
|
||||

|
||||
|
||||
You can see the Oracle Integration artifact here [OIC Migrate you Source API to OCI API Gateway](files%2FMIGRATE_TO_APIGW_01.00.0001.iar). This example of artifact does not intend to be used as a final process to your migration and has only the objective to illustrate the process. Use this artifact to guide your real implementation.
|
||||
|
||||
|
||||
## Task : Test the migration
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user