Integration, Control, Security and Monitoring
A real implementation often has different aspects which need to be addressed. Some of them are:
- A tool to be used for building the integration among applications and technologies, possibly leveraging a low code environment
- A tool to expose the APIs enabling the integration with third party applications applying in addition security policies, caching capabilities, routing, etc
- A tool to monitor from IT Operation perspective the entire solution as just one application skipping the need to manage several silos or frameworks
Oracle Cloud can provide the right answer to your developer needs using the best Cloud native services and here identified by OCI API Gateway (API GTW), Oracle Integration (OIC) and OCI Logging and Analytics (LA)
If you are already using Oracle Integration for your development purposes probably you have already noticed the chance you have to configure the API Management solution that you prefer, exposing what you have already built.
From OIC console, you can access the “Setting” section and configure properly what you need
Clicking on the “API Management” link you can configure the connection to your OCI API Gateway instance
How and where can you find the required information?
Tenancy OCID can be found navigating the OCI Console and clicking on “Tenancy” details
Copy and paste this value on the previous screen into the Oracle Integration console
User OCID can be found from OCI Console under the link “My Profile”.
Also in this case, copy and paste the “OCID Id” into the Oracle Integration console
Finger Print: from OCI Console, after having selected “User Profile”, click on “API Keys” and from here you can add a new API Key
Download the “private key” than click “add”
A new key will appear among those eventually already generated previously
Private Key: this one, in pem format, comes from the activities previously done during the API Key creation. Before uploading the key in the API Management setting, you need to convert this one. The key that you have downloaded is in PKCS8 format and this one must be converted to RSA (PKCS1) before using it for the API Management connection, using the following command from your shell
openssl rsa -in private_key_in_pkcs8_format.pem -out new_converted_file.pem
Once converted the file, you can upload your new key to complete the configuration with your API Management connection.
Click “Save” and that’s all
Now from your Oracle Integration console, you can work with your integration flows and after having completed your implementation you are now ready to publish your asset to you OCI API Gateway instance. I’m using the “ECHO” integration flow as an example
Clicking on API Management you can publish the integration flow providing all the required information and details as below presented
selecting the Compartment where your OCI API Gateway is running and the right API GTW instance (for example that one for the TEST environment)
Clicking on the “Deploy” button and wait for few seconds before seeing your service exposed into you OCI API Gateway instance (in my case “MyAPIGateway”)
Clicking on the active gateway instance, you can access to the deployed APIs
as below shown
Clicking on your service, it’s possible to configure the policy you want to apply. In the case below shown, a “Rate Limiting” policy has been applied to control and filter the use of this service
So, jumping again into the previous webpage, where your REST service is detailed, you can copy the URL of the API endpoint to use it for invocation
Open your REST client (or simply a browser) to test your service
The invocation has been successfully tested.
Now, you can monitor the metrics from the OCI API Gateway console in the “Metrics” section to get more details about the behavior; you can select the right time interval to check and get visibility of the API execution
At the same time, you can also have a look at your Oracle Integration console to see how the calls have been managed by the integration platform and if needed you can submit again manually the requests in case of error if, of course, they are involving back-end systems which ahd some problems (networking issues, maintenance, …).
and getting further info about the execution and all details about the business message
In this case, I have used 2 different consoles to monitor OCI API Gateway and Oracle Integration respectevely.
Keep in mind that Oracle Cloud Infrastructure can help you in case you want to consolidate in just one console several information coming from different and disparate OCI Services.
This is the right case for using OCI Logging & Analytics; it allows you to build your own dashboard collecting all info you need from IT Operations perspective and just if needed you can use the dedicated console of each service to leverage deeper and specific management capabilities (errors management, resubmitting faulted instances, changing scheduling parameters, modifying security policies, tuning caching options, etc).
How to use OCI Logging & Analytics?
Using OCI Console and clicking on “Observability and Management” as below described
and select “Logging Analytics” link
From here you can create your own dashboard to include all information you need. In my case I have built a dashboard (“My OCI Dashboard”) collecting info from OCI API Gateway, Oracle Integration and Logging & Analytics itself, as below described:
The screenshot upper represented, includes 6 different widgets which are collecting metrics from different sources so including in just one console all information you want about latency, inbound requests, bytes ingested, bytes sent, etc
How to create a Logging & Analytics dashboard?
Not really hard… on the contrary very straightforward procedure and you can get more details looking at the following blog post:
This is a very simple implementation to show capabilities and synergies of the Oracle Cloud Infrastructure services and resources
OCI API Gateway
OCI Logging & Analytics