BLOG

Connect To An Instance In A Private Subnet on Cloud

If you ever worked with cloud and configured different subnet, there will be public and private subnet, both having a different number of servers, for the public or even private have you also wonder how to access the environment without associate the VM to Public IP, in this post I will show you how.

For the figure shows one of the simple example of that, In this post you will learn how to connect to an instance that is hosted in a private subnet

The first thing you need, install Pageant

After that, open the software and add the public key to this software , enter the password

Once you add the key, it will be appear inside the program you can close it

Now you can use putty and configure the software like the follwing, You are now connected to the instance in public subnet through agent forwarding.

From the public subnet you can simply SSH to to private subnet easily.

Cheers

Osama

Cloud Services Mapping For AWS, Azure, GCP ,OCI, IBM and Alibaba provider

This blog post is one of that kind that took much time and consume so much energy, to complete this post it took me around ten days to make sure that I will cover most of the available services and make it readable for people, Be sure the services can change while you are reading this post ; if you have any comments,or add something to this post, please send me an email – using contact us page or by comments below.

I am writing this post to share a different cloud providers services and the comparison between each one of them, this will show various naming services for each one of them.

Earlier we used to store our data to H.D.D or USB flash, Cloud Computing services have replaced such hard drive technology. Cloud Computing service is nothing but providing services like Storage, Databases, Servers, networking, and software through the Internet.

Cloud Computing is moving so fast, in 2020 the cloud now is more mature, going multi-cloud, and likely to become more focused on vertical and a sales ground war as the leading vendors battle for market share.

Notes :

  • GCP : Google Cloud Provider
  • OCI :- oracle cloud infrastructure
  • None : not meaning the services is not available necessarily by cloud provider but i didn’t look deeper into this or i didn’t use it before.

Marketplace

AWSAzureOCIGCPIBM CloudAliBaba Cloud
AWS MarketplaceAzure Marketplace Oracle Cloud MarketplaceGoogle Cloud Platform (GCP) MarketplaceIBM Marketplace Alibaba Cloud Marketplace 

AI and machine learning

AWSAzureOCIGCPIBM CloudAliBaba Cloud
SageMakerMachine LearningOCI Machine LearningGoogle Datalab Cloud AutoML (Alpha)
Cloud Machine Learning Services
Machine Learning Machine Learning Platform for AI 
Alexa Skills KitBot FrameworkOracle Digital AssistantGoogle AssistantNoneNone
Polly, TranscribeSpeech Services Bing Speech APINoneTranslation API
Speech API
NoneNone
LexSpeech ServicesOracle Chatbots Cloud Text-to-Speech DialogFlow Enterprise Edition (Beta) Natural Language APIWatson Assistant Intelligent Service Robot 
RekognitionCognitive ServicesNoneCloud Video Intelligence Vision APIVisual Recognition Image Search 
Skills KitVirtual AssistantNoneNoneNoneNone
Amazon ComprehendLanguage Understanding (LUIS)NoneCloud Text-to-Speech DialogFlow Enterprise Edition (Beta)
Natural Language API
Visual RecognitionImage Search

Big data and analytics

AWSAzureOCIGCPIBM CloudAliBaba Cloud
RedshiftSynapse Analyticsoracle autonomous data warehouseBigQueryDb2 Warehouse Alibaba MaxCompute ODPS 
Lake FormationData ShareNoneNoneNoneNone
Amazon EMRHDInsight Data Lake Storage
Oracle Big Data Service
Cloud DataProcAnalytics Engine E-MapReduce Service 

Data orchestration / ETL

AWSAzureOCIGCPIBM CloudAliBaba Cloud
Data Pipeline, GlueData Factory Data CatalogData IntegratorCloud DataPrep Cloud ComposerDataStage DataWorks  Data Integration 
Dynamo DBTable Storage, Cosmos DBNoSQL DatabaseCloud Datastore Cloud BigTableCloudant NoSQL DB  Compose for JanusGraph 
Databases for MongoDB 
Apsaradb for Mongodb  Table Store 

Analytics and visualization

AWSAzureOCIGCPIBM CloudAliBab Cloud
Kinesis AnalyticsStream Analytics
 Data Lake Analytics
Data Lake Store
Event Hub (Apache Kafka as a Service)Cloud DataflowStreaming AnalyticsNone
QuickSightPower BIData Visualization Business IntelligenceGoogle Data StudioWatson studio Data IDE 
CloudSearchCognitive SearchNoneNoneNoneNone
AthenaData Lake AnalyticsNoneBigQuerySQL QueryE-MapReduce Service

Compute

AWSAzureOCIGCPIBM CloudAliBaba Cloud
Elastic Compute Cloud (EC2) InstancesVirtual MachinesComputeCompute EngineClassic Virtual Server Alibaba ECS
BatchBatchNonePreemptible VMsIBM Cloud FunctionsBatch Compute 
Auto ScalingVirtual Machine Scale SetsAuto ScalingAuto ScalerAuto Scaling Auto Scaling 
VMware Cloud on AWSVMware by CloudSimpleNoneNoneNoneNone
Parallel ClusterCycleCloudCluster Networkingslurm gcpNoneNone
Amazon EC2 – I3.metalNoneCompute – Bare MetalNoneNoneNone
Amazon EC2 – P2, P3, G3 instancesAzure N-SeriesOracle Cloud Infrastructure Compute – GPUGoogle GPUNoneNone

Containers and container orchestrators

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Elastic Container Service (ECS)Container InstancesOracle Cloud Infrastructure RegistryContainer RegistryIBM Cloud Container Registry Container Registry 
Elastic Kubernetes Service (EKS)Kubernetes Service (AKS)Container Engine for Kubernetes (OKE) Kubernetes Engine IBM Cloud Kubernetes Service Container Service for Kubernetes 
App MeshService Fabric MeshNoneGoogle Istio Service MeshNoneNone

Serverless

AWSAzureOCIGCPIBM CloudAlibaba Cloud
LambdaFunctionsOracle FunctionsGoogle Cloud FunctionsIBM Cloud Functions Function Compute 

Database

AreaAWSAzureOCIGCPIBM CloudAlibaba Cloud
Relational databaseRDSSQL Database Database for MySQL
Database for PostgreSQL
Oracle Database Cloud Service
MySQL Service 
Cloud SQL  Cloud Spanner Db2 
Db2 Hosted  Informix  Databases for PostgreSQL  Compose for MySQL(Beta
ApsaraDB for RDS MYSQL  ApsaraDB for RDS SQL Server  ApsaraDB for RDS PostgreSQL  Distributed Relational Database Service (DRDS) 
NoSQL / Document DynamoDB
SimpleDB
Amazon DocumentDB
Cosmos DBNoSQL Database Cloud Datastore  Cloud BigTable Cloudant NoSQL DB  Compose for JanusGraph  Databases for MongoDB ApsaraDB for RDS MYSQL  ApsaraDB for RDS SQL Server  ApsaraDB for RDS PostgreSQL  Distributed Relational Database Service (DRDS) 
CachingElastiCacheCache for RedisIn-memory OptionCloud MemoryStore (Beta) Informix HiTSDB (High-Performance Time Series Database) 
Database migration Database Migration ServiceDatabase Migration ServiceMigrate to the Cloud NoneLift CLI Data Transmission Service 
Relational Database Management ServiceAuroraAzure SQL Database; Azure Cosmos DB  Oracle Autonomous Transaction ProcessingCloud SQL ; Cloud SpannerCloudant NoSQL DB  Compose for JanusGraph  Databases for MongoDB Apsaradb for Mongodb  Table Store 

DevOps and application monitoring

AWSAzureOCIGCPIBM CloudAlibaba Cloud
CloudWatch,
X-Ray
AWS Cloud9  AWS Code Star 
AWS CodeBuild  CodeDeploy CodeCommit CodePipeline
Monitor Azure Boards  Azure Pipelines  Azure Repos  Azure Test Plans  Azure Artifacts  DevOpsDeveloper Cloud Service Cloud Source Repositories  Cloud Build Continuous Delivery  DevOps Insights  Globalization Pipeline None
Developer ToolsDeveloper ToolsDeveloper Cloud Service Cloud Source Repositories  Cloud Build Continuous Delivery  DevOps Insights  Globalization Pipeline None
Command Line InterfaceCLI PowerShellOCI CLICloud Shell  Cloud Console NoneAlibaba Cloud CLI 
OpsWorks (Chef-based)AutomationOracle Orchestration Cloud Service NoneNoneResource Orchestration Service 
CloudFormationResource Manager
VM extensions
Azure Automation Azure Building Blocks
Stack Manager Cloud Resource Manager  Cloud Deployment ManagerSchematics Resource Orchestration Service 

Internet of things (IoT)

AWS AzureOCIGCPIBM CloudAlibaba Cloud
IoTIoT HubInternet of Things Cloud Service Cloud IoT Core (Beta)  Google Cloud IoT Internet of Things Platform IoT Platform 
GreengrassIoT Edge Azure IoT SDKNoneNoneNoneNone
Kinesis Firehose
Kinesis Streams
Event Hubs Azure Stream Analytics Event Hub (Apache Kafka as a Service) Cloud Dataflow Streaming Analytics None
IoT Things GraphDigital TwinsNoneNoneDigital TranscodingApsaraVideo Live 
AWS IoT ButtonAzure SphereNoneNoneNoneNone

Management

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Trusted AdvisorAdvisorNoneGoogle Cloud Platform Security NoneNone
Usage and Billing ReportBilling APIOracle Management ConsoleBilling API NoneAlibaba Cloud CLI 
Management ConsolePortalConsolePortal/ConsoleConsoleConsole
Application Discovery ServiceMigrate Azure Active Directory NoneNoneNoneNone
EC2 Systems ManagerMonitorOracle Management Cloud NoneNoneNone
Personal Health DashboardResource Health Azure Monitor Oracle Management Cloud NoneNoneCloud monitoring, Notification and Alerts 
CloudTrailMonitorApplication Performance Monitoring Google StackDriver  Monitoring  Logging Error Reporting  Trace  Debugger Application Performance Monitoring CloudMonitor 
Cost ExplorerCost ManagementOracle Management Cloud NoneNoneNone
CloudWatchApplication InsightsApplication Performance MonitoringGoogle StackDriver 
Monitoring 
Logging
Error Reporting 
Trace 
Debugger 
IBM Cloud Log Analysis with LogDNA CloudMonitor

Messaging and eventing

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Simple Queue Service (SQS) Amazon MQ Queue Storage Service Bus Service Bus topics Service Bus relayIntegration Messaging Cloud Pub/SubEvent Steams Message Queue 
Simple Notification ServiceEvent Grid Azure Notification ServicesMessaging Firebase Cloud MessagingPush Notifications Short Message Service (SMS) 
Amazon SESMarketplace – EmailOracle Cloud Infrastructure Email DeliveryPartnersSendgrid Direct Mail 

Mobile services

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Mobile HubApp Center Xamarin AppsMobile & ChatbotsCloud Mobile AppMobile FoundationNone
Mobile SDKApp Center
Azure Mobile SDK,Offline/Sync Azure DevTest Labs (Back End) Hockey App
Mobile Cloud ServiceCloud Tools for Android StudioNone
Amazon PinpointAzure Mobile EngagementNoneNoneMobile FoundationNone
CognitoApp CenterMobile Cloud Service Cloud Tools for Android StudioApp ID None
Mobile AnalyticsHockey App Mobile Cloud Service Firebase Analytics Mobile Foundation None

Networking

AreaAWSAzureOCIGCPIBM CloudAlibaba cloud
Cloud virtual networkingVirtual Private Cloud (VPC)Virtual NetworkOracle Virtual Cloud Network Virtual Private CloudIBM Cloud VPC on Classic Virtual Private Cloud 
Cross-premises connectivityAmazon VPN VPN Gateway VPN Connect Cloud VPN Classic IPSEC-VPN VPN Gateway 
DNS Managment Route 53DNSOracle DNS Cloud DNS Internet Services Alibaba Cloud DNS 
Global Traffic ManagmentAmazon Route 53 Traffic Flow Azure Traffic Manager OCI Traffic Management NoneInternet Services None
Dedicated networkDirect ConnectExpressRouteFast Connect Cloud InterConnect Direct Link Express Connect 
Load balancingElastic Load BalancingLoad BalancerOracle Load Balancer Cloud Load Balancing IBM Cloud Load Balancing Server Load Balancer 

Security, identity, and access

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Identity and Access Management (IAM)Azure Active Directory
Role Based Access Control
Identity Cloud IAM Identity & Access Management Resource Access Management 
OrganizationsSubscription Management + RBAC
Policy
Management Groups
Audit NoneResource Group None
Multi-Factor AuthenticationMulti-Factor AuthenticationMulti-factor authenticationMulti-factor authenticationMulti-factor authenticationMulti-factor authentication
Directory ServiceAzure Active Directory Domain ServicesNoneNoneNoneNone
CognitoAzure Active Directory B2CMobile Cloud Service Firebase Authentication

App ID None

Encryption

AWSAzureOCIGCPIBM cloudAlibaba Cloud
Server-side encryption with Amazon S3 Key Management ServiceAzure Storage Service EncryptionNonenoneNoneNone
Key Management Service (KMS)
CloudHSM
Key VaultKey ManagementCloud Key Management Service Key Protect Key Management Service 

Firewall

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Web Application FirewallWeb Application Firewall
Firewall
Web Application Firewall NoneInternet Services Web Application Firewall 

Security

AWSAzureOCIGCPIBM CloudAlibaba Cloud
InspectorSecurity CenterConfiguration and Compliance Service NoneInfrastructure Vulnerability Scan None
Certificate ManagerApp Service Certificates available on the PortalNoneCloud Key Management Service Key Protect Key Management Service 
GuardDutyAdvanced Threat ProtectionNoneNoneNoneNone
ArtifactService Trust PortalComplianceCloud Security Command Center (Alpha) NoneAlibaba Truster Center 
ShieldDDos Protection ServiceOracle Cloud Infrastructure DDoS ProtectionCloud Armor (Beta) Internet Services DDOS Pro and Basic 

Storage

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Simple Storage Services (S3)Blob storageObject Storage Cloud Storage Cloud Object Storage Object Storage Service 
Elastic Block Store (EBS)managed disksBlock Storage Persistent Disk Block Storage Block Storage

Elastic File SystemFilesOCI File Storage File Store File Storage NAS File Storage 
S3 Infrequent Access (IA)Storage cool tierNoneNoneNoneNone
S3 GlacierStorage archive access tierArchive Storage Cloud Storage Object Storage-ColdVault Object Storage Archive 
BackupBackupNoneNoneNoneNone
Storage GatewayStorSimple
Storage Software Appliance NoneNoneHybrid Cloud Storage Array 
DataSyncFile SyncNoneNoneNoneNone

Bulk data transfer

AWS AzureOCIGCPIBM CloudAlibaba Cloud
Import/Export DiskImport/Export
Data Transfer Services – Hard Disk Import NoneData Transfer Service None
Import/Export c
Snowball Edge
Snowmobile
Data BoxData Transfer Services – Storage applicance import Transfer Appliance (Beta) Mass Data Migration Service Data Transport 

Web applications

AWSAzureOCIGCPIBM CloudAlibaba Cloud
Elastic BeanstalkApp ServiceApplication Container Cloud 
Java Cloud Service 
Google App engine Cloud Foundry Apps Enterprise Distributed Application Service 
API GatewayAPI ManagementAPI Platform Cloud EndpointsAPI Connect API Gateway 
CloudFrontContent Delivery NetworkNoneCloud CDN Content Delivery Network Alibaba Content Delivery Network 
Global AcceleratorFront DoorNoneNoneNoneNone
LightSailApp ServiceNoneNoneClassic Virtual Server 
Virtual Server for VPC 
Simple Application Server 

Miscellaneous

AreaAWSAzureOCIGCPIBM CloudAlibaba Cloud
Backend process logicStep FunctionsLogic AppsFunctions
App Engine IBM Cloud Functions None
Enterprise application servicesWorkMailWorkDocsOffice 365NoneG Suite
NoneNone
GamingGameLiftGameSparksPlayFabNoneNoneNoneNone
Media transcoding
Elastic TranscoderMedia ServicesNoneNoneDigital TranscodingApsaraVideo Live 
WorkflowSimple Workflow Service (SWF)Logic AppsData Integrator Cloud DataPrep (Private Beta) 
Cloud Composer (Beta) 
DataStage 
Watson Knowledge Catalog 
DataWorks
Data Integration  
HybridOutposts
Stack
Cloud At Customer Anthos NoneNone
MediaElemental MediaConvertMedia ServicesNoneNoneDigital Transcoding
ApsaraVideo Live 
Region Availability Zone (AZ)Availability Zone (AZ)Availability Domain (AD)Zonesavailability zonesZones

Disaster Recovery Services

AWSAzureOCIGCPIBM CloudAlibaba Cloud
AWS Disaster Recovery Azure Site Recovery Oracle Database Backup 
DR Site
NoneNoneAlibaba Disaster Recovery 
Hybrid Backup Recovery 

Enjoy

Cheers

Osama

OCI, AWS and Azure services in One pictures

Just quick post to show and share what services for each cloud provider, be notice that the services can be change while we are talking now, and this is not a complete list of services but it’s only shows the basic one.

OCI Services

Oracle Cloud Iinfrastructure Services

Amazon AWS

Amazon AWS services

Microsoft Azure

Cheers

Osama

integrate jenkins with github “Method POST required” Error

This post for error trying to integrate Jenkins with github, i will post about that for sure as video and Blog post, but for this error i will like the following :-

This is when you try to to do any changes from the github side, it’s not reflecting on Jenkins side, this is simple because of the webhook (payload) not including the “/” at the end

it should be like the below :-

Add “/” at the end of your Payload URL

Cheers

Osama

Azure Resource quick guide

In gernal,

load balancer distributes traffic evenly among each system in a pool. A load balancer can help you achieve both high availability and resiliency.

Say you start by adding additional VMs, each configured identically, to each tier. The idea is to have additional systems ready, in case one goes down, or is serving too many users at the same time.

Azure Load Balancer is a load balancer service that Microsoft provides that helps take care of the maintenance for you. Load Balancer supports inbound and outbound scenarios, provides low latency and high throughput, and scales up to millions of flows for all Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) applications. You can use Load Balancer with incoming internet traffic, internal traffic across Azure services, port forwarding for specific traffic, or outbound connectivity for VMs in your virtual network.

When you manually configure typical load balancer software on a virtual machine, there’s a downside: you now have an additional system that you need to maintain. If your load balancer goes down or needs routine maintenance, you’re back to your original problem.

Azure Application Gateway

If all your traffic is HTTP, a potentially better option is to use Azure Application Gateway. Application Gateway is a load balancer designed for web applications. It uses Azure Load Balancer at the transport level (TCP) and applies sophisticated URL-based routing rules to support several advanced scenarios.

Benefits

  • Cookie affinity. Useful when you want to keep a user session on the same backend server.
  • SSL termination. Application Gateway can manage your SSL certificates and pass unencrypted traffic to the backend servers to avoid encryption/decryption overhead. It also supports full end-to-end encryption for applications that require that.
  • Web application firewall. Application gateway supports a sophisticated firewall (WAF) with detailed monitoring and logging to detect malicious attacks against your network infrastructure.
  • URL rule-based routes. Application Gateway allows you to route traffic based on URL patterns, source IP address and port to destination IP address and port. This is helpful when setting up a content delivery network.
  • Rewrite HTTP headers. You can add or remove information from the inbound and outbound HTTP headers of each request to enable important security scenarios, or scrub sensitive information such as server names.

What is a Content Delivery Network (CDN)?

A content delivery network (CDN) is a distributed network of servers that can efficiently deliver web content to users. It is a way to get content to users in their local region to minimize latency. CDN can be hosted in Azure or any other location. You can cache content at strategically placed physical nodes across the world and provide better performance to end users. Typical usage scenarios include web applications containing multimedia content, a product launch event in a particular region, or any event where you expect a high-bandwidth requirement in a region.

DNS

DNS, or Domain Name System, is a way to map user-friendly names to their IP addresses. You can think of DNS as the phonebook of the internet.

How can you make your site, which is located in the United States, load faster for users located in Europe or Asia?

network latency in azure

Latency refers to the time it takes for data to travel over the network. Latency is typically measured in milliseconds.

Compare latency to bandwidth. Bandwidth refers to the amount of data that can fit on the connection. Latency refers to the time it takes for that data to reach its destination.

One way to reduce latency is to provide exact copies of your service in more than one region, or Use Traffic Manager to route users to the closest endpoint, One answer is Azure Traffic Manager. Traffic Manager uses the DNS server that’s closest to the user to direct user traffic to a globally distributed endpoint, Traffic Manager doesn’t see the traffic that’s passed between the client and server. Rather, it directs the client web browser to a preferred endpoint. Traffic Manager can route traffic in a few different ways, such as to the endpoint with the lowest latency.

Cheers

Osama

Migrating from MongoDB to Azure cosmos db, Using Mongorestore and mongodump manual/offline

In this post, i will discuss how to migrate from mongoDB (in my case the database was hosted on AWS) to Azure CosmosDB, i searched online about different articles how to do that, the problem i faced most of them were discussing the same way which is Online and using 3rd party software which is not applicable for me due to security reason, thefore i decided to post about it maybe it will useful for someone else.

Usually the easiet way which is use Azure Database Migration Service to perform an offline/online migration of databases from an on-premises or cloud instance of MongoDB to Azure Cosmos DB’s API for MongoDB.

There are some prerequisite before start the migration to know more about it read here, the same link explained different ways for migrations, however before you start you should create an instance for Azure Cosmos DB.

Preparation of target Cosmos DB account

Create an Azure Cosmos DB account and select MongoDB as the API. Pre-create your databases through the Azure portal

The home page for azure Cloud

from the search bar just search for “Azure Cosmos DB”

Azure Cosomo DB

You have add new account for the new migration Since we are migrating from MongoDB then The API should be “Azure CosmosDB for MongoDB API”

Create cosmos db

The target is ready for migration but we have to check the connection string so we can use them in our migration from AWS to Azure.

Get the MongoDB connection string to customize

  • the Azure Cosmos DB blade, select the API.
  •  the left pane of the account blade, click Connection String.
  • The Connection String blade opens. It has all the information necessary to connect to the account by using a driver for MongoDB, including a preconstructed connection string.
Connection string

From MongoDB (Source server) you have to take backup for the database, now after the backup is completed, no need to move the backup for another server , mongo providing two way of backup either mongodump (dump) or mongoexport and will generate JSON file.

For example using monogdump

mongodump --host <hostname:port> --db <Databasename that you want to backup > --collection <collectionname> --gzip --out /u01/user/

For mongoexport

mongoexport --host<hostname:port> --db <Databasename that you want to backup > --collection <collectionname> --out=<Location for JSON file>

After the the above command will be finished, in my advice run them in the background specially if the database size is big and generate a log for the background process so you can check it frequently.

Run the restore/import command from the source server , do you remember the connection string, now we will use them to connect to Azure Cosmos DB using the following, if you used mongodump then to restore you have to use mongorestore like the below :-

mongorestore --host testserver.mongo.cosmos.azure.com --port 10255 -u testserver -p  w3KQ5ZtJbjPwTmxa8nDzWhVYRuSe0BEOF8dROH6IUXq7rJgiinM3DCDeSWeEdcOIgyDuo4EQbrSngFS7kzVWlg== --db test --collection test /u01/user/notifications_service/user_notifications.bson.gz  --gzip --ssl --sslAllowInvalidCertificates

notice the follwing :-

  • host : From Azure portal/connection string.
  • Port : From Azure portal/connection string.
  • Password : From Azure portal/connection string.
  • DB : The name of the database you want to be created in azure cosmo,this name will be created during the migration to azure.
  • Collection : The name of the collection you want to be created in azure cosmo,this name will be created during the migration to azure.
  • Location for the backup.
  • gzip because i compressed the backup
  • Migration required to use ssl authication otherwise it will fail.

using mongoimport.

mongoimport --host testserver.mongo.cosmos.azure.com:10255 -u testserver -p w3KQ5ZtJbjPwTmxa8nDzWhVYRuSe0BEOF8dROH6IUXq7rJgiinM3DCDeSWeEdcOIgyDuo4EQbrSngFS7kzVWlg== --db test --collection test --ssl --sslAllowInvalidCertificates --type json --file /u01/dump/users_notifications/service_notifications.json

Once you run the command

Note: if you migrating huge or big databases you need to increase the cosmosdb throughout and database level after the migration will be finished return everything to the normal situation because of the cost.

Cheers

Osama

Terraform for Oracle Cloud infrastructure

This post provide steps for downloading and installing both Terraform and the Oracle Cloud Infrastructure Terraform provider.

Terraform Overview

Terraform is “infrastructure-as-code” software that allows you to define your infrastructure resources in files that you can persist, version, and share. These files describe the steps required to provision your infrastructure and maintain its desired state; it then executes these steps and builds out the described infrastructure.

Infrastructure as Code is becoming very popular. It allows you to describe a complete blueprint of a datacentre using a high-level configuration syntax, that can be versioned and script-automated, Terraform can seamlessly work with major cloud vendors, including Oracle, AWS, MS Azure, Google, etc

Download and Install Terraform

In this section, i will show and explain how to download and install Terraform on  your laptop/PC Host Operating System, you can download using the below link :-

Terraform Download
  • After you download the terraform, Unzip the Terraform to whatever location you want to run it from. Then, add that location to your OS PATH.
    • Windows : By adding to Path –> environment variables
    • Linux : Profile –> export Path

You can check by run the CMD and check the version:-

Check Terraform commands

Download the OCI  Terraform Provider

Prerequisites:-

  • OCI User credentials that has  sufficient permission to  execute a Terraform plan.
  • Required keys and Oracle Cloud Infrastructure IDs (OCIDs).
  • The correct Terraform binary file for your operating system

Installing and Configuring the Terraform Provider

In my personal opioion about this section (The title of the section same as Oracle Documentation) I found it wrong, i worked with Terraform in different cloud vendor, AWS, Azure and OCI so Terraform will recognize it and automatically install the provider for you.

to do that, all of you have to do is create folder , then create file “variables.tf” that only contains

provider "oci" {<br>}

and run terraform command

terraform init

Now Let’s Talk small examples about OCI and Terraform, First you have to read “Creating Module” to understand the rest of this post here.

I will upload to my Github here Small Sample for OCI Terraform to allow you underatand how we can use it instead of the GUI and make it easy for you.

I upload to my github example of Terraform for OCI Proiver, In the this example i will create autonomous database but not using the GUI,

to work with Terraform, you have to understand what is the OCI Provider and the parameters of it.

The Terraform configuration resides in two files: variables.tf (which defines the provider oci) and main.tf (which defines the resource).

For more terraform examples here

Configuration File Requirements

Terraform configuration (.tf) files have specific requirements, depending on the components that are defined in the file. For example, you might have your Terraform provider defined in one file (provider.tf), your variables defined in another (variables.tf), your data sources defined in yet another.

Some of the examples for Terraform files here

Provider Definitions

The provider definition relies on variables so that the configuration file itself does not contain sensitive data. Including sensitive data creates a security risk when exchanging or sharing configuration files.

To understand more about provider read here

provider "oci" {
   tenancy_ocid = "${var.tenancy_ocid}"
   user_ocid = "${var.user_ocid}"
   fingerprint = "${var.fingerprint}"
   private_key_path = "${var.private_key_path}"
   region = "${var.region}"
}

Variable Definitions

Variables in Terraform represent parameters for Terraform modules. In variable definitions, each block configures a single input variable, and each definition can take any or all of three optional arguments:

  • Type (Optional): Defines the variable type as one of three allowed values: string, list, and map. If this argument is not used, the variable type is inferred based on default. If no default is provided, the type is assumed to be string
  • Default (Optional) : Sets the default value for the variable. If no default value is provided, the caller must provide a value or Terraform throws an error.
  • Description (Optional) : A human-readable description of the variable.

More information here

For example

variable "AD" {
    default     = "1"
    description = "Availability Domain"
}

Output Configuration

Output variables provide a means to support Terraform end-user queries. This allows users to extract meaningful data from among the potentially massive amount of data associated with a complex infrastructure.

More information here

Example

output "InstancePublicIPs" {
value = ["${oci_core_instance.TFInstance.*.public_ip}"]
}

Resource Configuration

Resources are components of your Oracle Cloud Infrastructure. These resources include everything from low-level components such as physical and virtual servers, to higher-level components such as email and database providers, your DNS record.

For more information here

One of the example :-

resource "oci_core_virtual_network" "vcn1" {
   cidr_block = "10.0.0.0/16"
   dns_label = "vcn1"
   compartment_id = "${var.compartment_ocid}"
   display_name = "vcn1"
}

Data Source Configuration

Data sources represent read-only views of existing infrastructure intended for semantic use in Terraform configurations, for example Get DB node list

data "oci_database_db_nodes" "DBNodeList" {
  compartment_id = "${var.compartment_ocid}"
  db_system_id = "${oci_database_db_system.TFDBNode.id}"
}

Another example, Gets the OCID of the first (default) vNIC


data "oci_core_vnic" "DBNodeVnic" {
  vnic_id = "${data.oci_database_db_node.DBNodeDetails.vnic_id}"
}

Follow me on GitHub here

Cheers

Osama

How to be Azure Solutions Architect Expert

Many of you knows that i have been working on different cloud vendor, oracle cloud infrastructure , Amazon AWS, and MS Azure, and I had chance to work on many of them with hands-on experience and implement projects on all of them.

Now i am working on 2nd book that will include different topics about the 3 of them, DevOps, and comparison between all the three cloud vendor and more.

During the Lockdown, i was working to sharp my skills and test them in the cloud, therefore i decided to go for azure first and trust me when i say “it’s on of the hardest exam i ever did”.

The exam itself it’s totally different from what i used to, real case scenario that you should be aware of azure features, all of them, and configure them.

To be “Azure Solutions Architect Expert”, there are some of the conditions you should go thru, first you need to apply for two exams, AZ-301 & AZ-300

  • AZ-301 Microsoft Azure Architect Design
  • AZ-300 Microsoft Azure Architect Technologies

Both are Part of the requirements for: Microsoft Certified: Azure Solutions Architect Expert, the first exam which AZ-301, disccused the following secure, scalable, and reliable solutions. Candidates should have advanced experience and knowledge across various aspects of IT operations, including networking, virtualization, identity, security, business continuity, disaster recovery, data management, budgeting, and governance. This role requires managing how decisions in each area affects an overall solution. Candidates must be proficient in Azure administration, Azure development, and DevOps, and have expert-level skills in at least one of those domains.

Learning Objectives

  • Determine workload requirements
  • Design for identity and security
  • Design a data platform solution
  • Design a business continuity strategy
  • Design for deployment, migration, and integration
  • Design an infrastructure strategy

For the AZ-300

Learning Objectives

  • Deploy and configure Azure infrastructure
  • Implement workloads and security on Azure
  • Create and deploy apps on Azure
  • Implement Azure authentication and secure data
  • Develop for the cloud

After you completed the both exams successfully you will receive your badge for the three exams, durtation for the exams around 3 hours and trust me you will need it.

Enjoy

Osama

Apply for Oracle exam extension

As we already know oracle has been providing free exam and materials for siz track like the following till 15 May 2020: –

and because of the high demand since there are not available slot anymore, Oracle now providing extension BUT you have to apply for this

Follow this Video :-

How to ask for extension

Enjoy

Osama