Wednesday, June 26, 2019

#712 Migrating ICS to OIC

First question -

Why migrate?

How about the following 3 compelling reasons -

1. OIC is your Swiss Army knife, when it comes to integration.
It contains not only integration, but also Process and Visual Builder.
So now you can also extend your apps and create net new apps on top of your SaaS apis.

2. New Features in OIC - new adapters (e.g. UI Path, Automation Anywhere etc.)
New JET based mapper - the list is exhaustive.

3. It will probably be cheaper.

So now to a simple example of moving your integrations from ICS to OIC.
Essentially what we do it export the repository of your integration artefacts from ICS to OIC.

Here is my ICS real estate -













btw. the relevant Oracle Migration documentation is here

and I strongly suggest you look at it.

We will essentially follow what the docs detail -

1. Create a Storage Cloud Bucket to hold the ICS artefacts
2. Export ICS artefacts to the Bucket
3. Import the artefacts into OIC from the Bucket

Create a Storage Cloud Bucket




Click Object Storage and go ahead and create a new Bucket -

























Edit Visibility to make it public -
















REST APIs for Migrating 

These are the apis discussed in the docs.

1. Export Repository /icsapsi/v2/clonepod/exportArtifacts
curl -k -v -H "Content-Type: application/json" -X POST -d '
{"storageInfo":{"storageUrl":" https://swiftobjectstorage.us-region-1.oraclecloud.com/v1/
paasdevoic/cloneRepo","storageUser":"myemail@company.com",
"storagePassword":"generated_token"}}' -u admin:password
https://host/icsapis/v2/clonepod/exportArtifacts
Please note: Export Repository exports everything.

2. Check the export status - /icsapis/v2/clonepod/exportStatus
curl -k -v  -X GET -u admin:password https://host/icsapis/v2/clonepod/exportStatus

3. Import to OIC - /ic/api/common/v1/importServiceInstanceArchive

curl -k -v -H "Content-Type: application/json" -X POST -d '{"archiveFile": 
"archive_Local_Suite_Instance-67e7358b-077b-420f-9e04-e9b9e8374b68.zip", 
"importActivateMode": "ImportOnly", "storageInfo": { "storageUrl":"https://
swiftobjectstorage.us-region-1.oraclecloud.com/v1/paasdevoic/cloneRepo","storageUser"
:"myemail@company.com", "storagePassword":"generated_token"}}' -u admin:password
https://host/ic/api/common/v1/importServiceInstanceArchive

Note the ability when importing to specify -

  • ImportOnly: Imports, but does not activate, integrations.
  • ActivateOnly: Activates previously imported integrations. This enables you to update connection parameters before activating integrations.
  • ImportActivate: Imports and activates integrations.

Now to my favourite tool - Postman - 
Essentially I execute the 4 operations discussed in the docs -
1. export
2. check export status
3. import
4. check import status

For the export - the payload is as follows -

{
"storageInfo": {
"storageUrl": "https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/yourTenancy/bucket-clone-ICS-NiallC",
"storageUser": "yourStorageUser",
"storagePassword": "yourStorageUserAuthKey"
}
}

All self-explanatory.

For the User Auth Key - you can retrieve this as follows -

Identity > Users > User Details > Auth Tokens > Generate Token

swiftobjectstorage.us-ashburn-1.oraclecloud.com is standard for the Ashburn datacenter.

Again, the REST API used -
https://yourICSPod/icsapis/v2/clonepod/exportArtifacts


The RESPONSE -

{
    "archiveFilename": "archive_Local_Suite_Instance-bc5c5fae-8ef4-4925-ab1d-44f5d10efb5b.zip",
    "jobID": "bc5c5fae-8ef4-4925-ab1d-44f5d10efb5b",
    "location": "https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/yourTenancy/bucket-clone-ICS-NiallC",
    "status": "Starting"

}

The REST api to check on export progress is as follows
https://yourICSPod/icsapis/v2/clonepod/exportStatus

This call does not have any parameters - so you get the result of the last export. i.e. you cannot check based on job id.


I can then look at the Bucket contents -

















Import to OIC 

https://yourOICEnv/ic/api/common/v1/importServiceInstanceArchive


Request -

{ "archiveFile": "yourArchive.zip", "importActivateMode": "ImportOnly", "storageInfo": { "storageUrl":"https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/yourOCITenancy/bucket-clone-ICS-NiallC", "storageUser":"storageuser", "storagePassword":"yourAuthKey"
}
}

Validate in OIC 


10 Integrations have been imported -




















Note: This exp/imp includes the connection security info -











Great stuff!

There are some minor deltas between ICS an OIC

1. ICS supports TLS 1.1 and TLS 1.2 for both invoke and trigger
OIC supports only TLS 1.2 as a trigger
Workaround: Client calling ICS/OIC should use JDK 1.7+ for TLS 1.2 support

2. ICS REST APIS - icsapis/v2/
OIC REST APIS - /ic/api/integration/v1/
Clients e.g. CI/CD scripts need to be amended accordingly.

Before we go... 


Naturally there is more to such a migration -

1. Certificates
2. Client endpoints need to be changed
3. CI/CD scripts will have to be updated
4. Are there any other IaaS or PaaS services that need to be migrated?
5. Also planning, side by side Migration etc.

Thanks to my colleague Harris Q. here for his input.

No comments:

Post a Comment