Thursday, May 2, 2019

#701 - OIC REST API for Connectivity Agent DR

A simple scenario here -

Customer has 2 data centers - Production and DR.
For argument sake, just imagine he has EBS running in both DCs.
Customer wants connectivity agent HA in both.

Currently OIC Agent Group supports up to 2 connectivity agents,
so I will need 2 groups














As you can see, I have only 1 agent in each group - just to save time.

So now to a simple example - I do not have access to EBS, so my integration
writes a file to this directory on my laptop -













Here is the Integration -

























Here is the connection definition -





















Note the Agent Group setting - CommiskeyAgentGroup

I test via Postman -



















I see the file has been created -











So now disaster strikes - the Production Data Center goes down.
We lose the Agent(s)








We failover to the DR Site.

CommiskeyDRAgentGroup is already running there.

But the connection is still configured to use the CommiskeyAgentGroup.

The following OIC REST API call sorts that out -

/ic/api/integration/v1/connections/AA_FILE

Payload -
{"agentGroupId":"COMMISKEYDRAGENTGROUP"}









Response -















I can validate this in OIC -

























I re-test in Postman - and see the following error message -

{
  ...
    "title" : "oracle.cloud.cpi.agent.transport.aq.CpiAQException: No response received within response time out window of 260 seconds. Agent may not be running, or temporarily facing connectivity issues to Oracle Integration Cloud Service. Please check the health of the Agent in Agent Monitoring page.",

So I need to bounce the integration - this I can also do via the OIC REST API

POST /ic/api/integration/v1/integrations/AA_WRITEFILE|01.00.0000

Request Payload -
{"status":"CONFIGURED"}

Note the id of the Integration - AA_WRITEFILE|01.00.0000 (name|version nr)

Note, I need to add the header -





I can also validate this action in OIC -

Yes, the Integration has been successfully deactivated -


 





I now activate - same request as above, but with the following payload -

{"status":"ACTIVATED"}

Integration has been activated -








Now back to Postman for the WriteFile test -





























No comments: