Showing posts with label Google Cloud. Show all posts
Showing posts with label Google Cloud. Show all posts

Sunday, August 16, 2020

Using GCP Source Repository, Cloud Build to configure automatic deployment of docker container on Google Cloud Run

Introduction 

In this article I will walk through the steps required to setup continuous integration environment and create build pipeline and automate deployment of a sample Angular App on Google Cloud Run. I will be using GCP stack end-end. Cloud Source Repositories for Git repository for version control, Cloud Build for creating docker containers which will be stored on Container Registry and then deploying the image on Cloud Run - serverless runtime environment. Finally, I will outline steps for configuring automated integration/deployment that will trigger builds and deployment of new version of application for any merge. 

Key Concepts and Services

Cloud Source Repositories - Fully managed free git repository from Google Cloud to storing and version control of source code. Tightly integrated with Cloud Build for triggering build for continuous integration. 

Docker - software that is most popularly used to build containers. Docker would combining the application code and set of instructions called DockerFile and produce a container that contains code all the required dependencies (listed as part of instructions in the docker file) to run the code. 

Containers - a self contained environment that can be run on many platforms 

Cloud Build - provide service similar to Docker and integrated with Cloud Source Repositories and can be triggered to produce container images and provides Continuous development and Continuous deployment. Cloud build can be configured to push the images to container registry and deployed to Cloud Run

Container Registry - Google Cloud Repository that can be used for hosting container images produced by Cloud Build

Cloud Run is fully managed serverless compute platform to deploy and running containerized application. Managed Serverless environment allows you to focus on your application and not worry about the underlying infrastructure or setting up and managing runtime environments. 

Saturday, August 08, 2020

Installing VNC Server on Google Cloud CentOS VM

Introduction

Recently I installed VNC on CentOS 6 on GCP for some development work. Sharing my notes. The steps are similar for Redhat Enterprise Linux.

Concepts

VNC - Virtual Private Networking, a Graphical User Interface platform that can be accessed remotely 

Steps

Create a VM

Create a CentOS instance in Micro VM Shape. To reduce latency choose a region close to you. Note that I'm using default VPC network that is automatically created. If you need more details on how to create VM pls refer my earlier blog

gcloud beta compute --project=oci-gcp-vpn-connectivity instances create centos-vnc-demo --zone=us-central1-a --machine-type=f1-micro --subnet=default --network-tier=PREMIUM --maintenance-policy=MIGRATE --service-account=71492557944-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --image=centos-6-v20200714 --image-project=centos-cloud --boot-disk-size=20GB --boot-disk-type=pd-standard --boot-disk-device-name=centos-vnc-demo --reservation-affinity=any

Tuesday, August 04, 2020

Hybrid Cloud - Setting up Site-to-Site IPSec VPN Connectivity between Oracle and Google Cloud

Introduction


As enterprises move to cloud there is a need to connect cloud-native applications with on-premise legacy systems. Multi-Cloud architectures allow you to build solutions spanning more than one public cloud by combining best of breed capabilities creating an increasing need for interconnecting these clouds. For example, you may want to use the Google App Engine to deploy your app but for your backend prefer Oracle ATP database hosted on Oracle Cloud. 

Each public cloud provides multiple connectivity options from dedicated high speed interconnect to using VPN based technologies to connect to on-premise using IPSec based connections that use public internet but provide secure connectivity.

Oracle OCI offers service called VPN Connect for site-to-site connectivity between an on-premise network with OCI VCN using VPN based on the IPSec protocol. 


In this blog, I will outline steps for configuring VPN between Oracle OCI Private Subnet with Google GCP VPC. VPN using IPSec is a cost-effective way of connecting these networks over public internet obviating no need for expensive lease lines and such. Steps outlined here also apply if you are trying to connect your on-premise network with either of these two cloud service providers. 

Note that I will focus on Site-to-Site connectivity based on IPSec protocol and use out-of-the-box functionality for VPN provided by these two cloud providers. You can also use other VPN implementations such as open-source Strongswan and Libreswan

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

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...