Thursday, July 30, 2020

Creating a Utility VM on Google Cloud (GCP)

Introduction


This blog is in continuation of my previous article - Oracle OCI Cloud - Connecting a Private VM from a Public Bastion Host and walk through steps for creating a VM instance on Google Cloud GCP which we will use to establish VPN connectivity with Oracle Cloud - the steps for which will be outlined in next article in this series. 


Here's a quick reference of configurations for this VM that we will be using in the next article while configuring VPN connectivity


VPC: gcp-oci-vpn-demo

VCN CIDR: 192.168.0.0/16


Subnet: subnet1

Region:  europe-west1

Subnet CIDR: 192.168.0.0/16


VM: instance-1

Public IP: 35.210.10.232

Private IP: 192.168.0.2

Thursday, June 04, 2020

Oracle OCI Cloud - Connecting a Private VM from a Public Bastion Host

Introduction


The following outlines the configuration for connecting a backend private instance though a public instance in the same VCN but different subnets. 

This post talks about the necessary configurations of Router, Firewall, and builds a complete end-end example. 

High-Level Steps

  • Create VCN and two subnets (one public, one private)
  • Create VMs - one in each subnet
  • Configure Router
  • Configure Firewall
  • Test and Verify
  • Access to OCI Instance

Note this is part one of the multi-part series wherein we extend this example and do necessary configuration on OCI and try to establish Hybrid Connectivity to a private instance on Google Cloud (GCP) using VPN.

Pre-requisites

  • User with necessary privileges to create VCN, VM and configure networking
  • SSH key (public and private key pair) - Basic knowledge of networking - CIDR, Routers, Firewall, etc..

Monday, November 18, 2019

OIC: Monitoring REST APIs examples using curl

Continuing the series of my previous posts on examples of OIC rest apis in this blog I will provide some additional examples of using curl to retrieve monitoring data.  

Getting logs

curl -X GET -H 'Authorization: Bearer access_token' -o <ics_log>.zip https://instance-name.us.oraclecloud.com/ic/api/integration/v1/monitoring/logs/{id}

 curl -u username@email.com:password -X GET  -H "Content-Type:application/json" -o flow_logs.zip https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/logs/icsflowlog

Valid values for log id: icsflowlog, icsdiagnosticlog, icsauditlog

You can provide additional parameter for filtering the result - for example following will return data for last one day. 

 curl -u username@email.com:password  -X GET  -H "Content-Type:application/json" -o flow_logs.log https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/logs/icsflowlog "q={timewindow: '1d'}"

For the next set of apis you can filter the result by time period, time window and also by the integration by adding following additional parameters

You can use time window as well - must be entered in - 'yyyy-MM-dd HH:mm:ss' UTC format

"q={startdate : '2016-09-23 07:07:07', enddate : '2016-09-23 08:17:07’}"

And filter the results for a given flow…

"q={timewindow: '3d', code: HELLO_WORLD, version: '01.02.0000'}” 


Friday, October 18, 2019

OIC: REST APIs Examples for managing Integrations

Expanding upon the last article I'm providing additional details and examples for using Oracle Integration Cloud REST APIs for managing your integrations. 

Note that for the examples below I will be using one of the pre-packaged integration named Hello World (version 1.2.000)

To limit the size of this posting I'm just providing examples only and limiting to common use-cases (small subset of the options). For additional details and completeness pls refer the official doc - REST API documentation. 


To get list of Integrations

curl -u username@email.password  -v -H "Content-Type:application/json" -H "Accept:application/json" -X GET https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations


Export one integration 

 curl -u username@email.password -X GET  -H "Content-Type:application/json" -o ./HELLO_WORLD_01.02.0000.iar_BAK https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations/HELLO_WORLD%7C01.02.0000/archive 


Friday, October 11, 2019

OIC: List of Integrations by Creator

Oracle Integration Cloud provides rich set of REST APIs to manage your connections/integration and life-cycle events. See details here for complete set.

There the APIs to get list of integration in JSON format but at this point there is no out of box API support for filtering out the results by creator or author of the artifact. One can use common programming language to parse the filter out the results but that require additional effort.

In this blog, I will provide simple command line means of achieving that. We will use curl and one command line library to parse JSON data - https://stedolan.github.io/jq/ 

The following was developed and tested on Mac OS (Mojave 10.14.6 ) and OIC version 19.3.1.0.0 (190624.1100.29533)

Install jq
brew install jq

Get list of integrations

Replace the highlighted (in blue) for your environment...

curl -u username@email.com:password -H "Content-Type:application/json" -H "Accept:application/json" -X GET https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations | jq '. |  {code: [.items[].code]}'


Friday, October 30, 2015

3 days in Amsterdam & around

After my short visit to London, I flew to Amsterdam and spent 3 days exploring the place. It was an awesome experience - quite a contrast from London on many levels. Sharing some highlights.

Amsterdam is unique in many ways - historical buildings, more canals than Venice, more density of Museums than anywhere else in the world, more bikes than population, friendly and relaxed environment, and perhaps most liberal city you will visit with legalized recreational drugs, same-sex marriage, and euthanasia! 

For my stay, I picked a hotel near Schipol Airport. Amsterdam city is about 15 - 20 mins train ride from the airport. You can buy 3-day Amsterdam Travel Ticket (25 euros) that allows you unlimited train, tram, and bus rides. 


Thursday, October 29, 2015

3 days in London

London is a travelers paradise - it has everything - famous buildings and landmarks, world-class museums, outstanding restaurants, fabulous retail, and plenty of green space and all of history to go along with that. 

Earlier this month I was traveling back from India to Los Angeles and took a break journey to spend 3 days in this beautiful metropolis (also spent some time in Holland - but that's for another post). Having born and brought up in India with centuries of colonial rule, Britain has a profound influence on India's history and culture. So, it was an even greater interest that I was looking forward to my visit to London.

I had some luggage so picked a hotel near Heathrow airport in Hounslow City - in the hindsight not a good idea to stay far from central London since wasted so much time every day traveling to the city.

London is very well connected by train/bus and oyster travel-card that allows to travel on any train/tube or bus is perhaps the best way to move around - great value and saves you a lot of time - I bought a 3-day pass for around 20 pounds. I also bought London Pass (approx 80 pounds) separately that cover entry ticket for most attractions (note you can purchase Oyster Travelcard with London Pass also)


Understanding JavaScript Prototypal Inheritance for Java developers

Inheritance is a fundamental concept in programming languages. However, it is implemented differently in Object-Oriented Languages such as J...