Terraform Jenkins pipeline setup

Terraform Jenkins pipeline setup

Assume Jenkins server is already setup

Dowload and install terraform cli.
Note the path of terraform binary downloaded

Install Terraform plugin from Jenkins plugin Manager.

Navigate to Global tool configuration in jenkins.
in terraform section, map the terraform binary folder path

create pipeline jenkins job

write pipeline script, utilize pipeline script
generator’s option ‘Declarative Directive Generator’ for terraform scripting

utilize pipeline script generator, create different CI/CDstages like git checkout, sonar, image publish

OpenShift Container Platform

What is Openshift Container Platform?

Openshift Container platform is Red Hat’s PaaS for Applocation development and deployment.

OCP supports various deployment strategy with help of Docker(Pods) and Jenkins under the hood.

Openshift Container platform (OCP) Build
Deployment pipeline:

After login to OCP

  1. Follow YAML build strategy, git connections etc
  2. Add Jenkins deployment startegy in YAML

“Creat Deployment” option in console will change to “Start pipeline” as YAML build config is created

Click “Start Pipeline”, wait for build to create
pods. A link for Jenkins dashboard will be disaplyed in OCP console

Enable Webhook integration with OCP endpoint
for triggering jobs on git commits

here after on every Git code commits would
build and deploys using OCP

AZ-900 Azure Fundamentals notes

AZ 900 notes 📝 helps for exam preparations:

  1. Network Security group (NSG) to allow/deny traffic with in Subnet
  2. Azure monitor shows the health of entire Azure Infrastructure but Vinrtual Machine Blade shows health of Virtual Machine(VM) level.
  3. Azure advanced threat protection prevents attacks and threats
  4. Azure advanced Identity protection and Azure privileged Identity management helps Identity protection
  5. Azure public preview does not guarantee any SLA.
  6. Powershell and command prompt used for launching Azure commandline interface
  7. Azure DevOps pipeline is used for build, deploy and test code
  8. Disk attached to VM incur costs apart from VM cost
  9. Azure AD Identity protection uses policies to enforce Multi factor Authentication (MFA)
  10. Azure Identity Management provides access to resources or uses to have to have additional verification or authentication
  11. Azure scale set creates/deploys VMs
  12. Azure load balancer to route traffic to backend/OS level.
  13. Azure web apps to host web apps.
  14. Azure Traffic Manager for DNS based traffic routing
  15. Azure data lake or SQL Datawarehouse is to store large data and for infrequent access needs. PowerBI used to visualize data
  16. Azure AD Basic comes with 99.9% SLA.
  17. Subnet is part of network security
  18. Azure region in middle east is UAE
  19. Germany and China Azure region requires special contracts.
  20. Azure trust center lists the Azure certified standards
  21. Azure service health alerts service issues or region wide down issues.
  22. Azure firewall and threat intelligence block to and from traffic to malicious IP or domains.
  23. DDoS attacks slow down, exhausts or stop app resources
  24. Azure AD connect helps to sync On premises AD and Azure AD
  25. Azure App Service and Azure SQL databases would be supported by PaaS solutions.
  26. To minimize capital and operational expenditure, a private cloud is recommended for an existing on premises infrastructure looking for additional resources
  27. Make sure deploying VMs into two or more AZs to avoid downtime.
  28. Deploying our data centers are Capital expenditure
  29. Azure Resource Manager helps to setup common platform for object deployment to cloud infra and also make sure consistency across Azure infra.
  30. Azure functions supports serverless computing capabilities
  31. Azure firewall controls the traffic to Azure virtual networks
  32. Files service storage solution in Azure is meant for mapped drive.
  33. Azure advisor provides guidance and recommendation on VM costing , improve Azure environment
  34. It is not an option to use Azure cloud shell for Chrome OS for running PowerShell scripts
  35. Fault tolerance is the ability to remain operational without any failure.
  36. Same Azure DDoS protection plan supports Virtual network from multiple subscribers

AZ-900 Microsoft Azure Fundamentals

Overview : In the following article, I will try to explore the different types of Cloud computing, especially Cloud provider Azure and some of the important features packed with Azure.

What are the different types of Cloud computing?

SaaS(Software as a Service) – Provider takes care of services and consumer/customer does not need to worry about any maintenance. E.g. Yahoo email, Salesforce, or similar ERP solutions.

PaaS(Platform as a Service) – Hardware provisioning , configurations, OS maintenance, networking, virtualization etc all been taken care by provider, but the development and management of apps needs to be taken care by customer. Examples are Heroku, Google app engine platform, etc

IaaS(Infrastructure as a Service)- Harware , Data centers, networking, virtualization etc are taken care here by Vendors and consumer can maintain SaaS, PaaS in it. Examples are AWS, Azure, Oracle cloud.

How do I deploy different cloud models?

The options are following,

Public cloud/Cloud-native : here the public cloud of Azure will be used and is most economic compared to other models. This means data centers, storage, networking all done by cloud provider.

Private cloud: Certain organization insists of using their own data centers and make the cloud in their data centers. This is expensive and cloud providers support this.

Hybrid: Orginization picks the options and this is the combination of the above two on how organizations selection.

On premises development are expensive as it comes with complete responsibility starting from procuring servers, networking , virtualization etc. Another note cloud computing side , there can be combination of multiple cloud providers like AWS business application development and Azure for all Microsoft OS related app and dependencies.

What are the different terminologies on cloud computing side?

Scalability vs Elasticity:

  • Scalability is the ability to scale based on demand. Example Kubernetes pods can be scaled for higer user demand and similarly server capacity can be scaled quickly.
  • Elasticity is the ability to shrink and grow as per low/high demands.

Availability and Disaster recovery(DR)/Higly Durable:

  • Availability is the ability to remain services available all the time.
  • DR is the ability to recover after a disaster.

What is Hypervisor vs Docker Daemon?

Hypervisor is a software layer that helps to build Virtual machines on top of host machine. VM comes with guest Operating system so the memory consumption from host machine is more.

Docker daemon is software that support Docker containers to run on any host machine or even VMs. The containers are light weight as compared to VMs as it does not need a guest Operating system. Containers can be spun up easily based on Dockerfile is written and build as images.

What is Serverless compute and Functions?

Serverless compute feature is available with cloud providers and is done via managed Servers/VMs and managed containers. So the customer does not need to worry about these aspects and focus on peice of code or Functions that they are responsible for. Costing is minimal and based on computing memory.

How does the Global infrastructure (Regions, Geography) works for cloud computing ?

A Region is ‘group of Datacenters’ or Availabiltiy Zone(AZ). An AZ is one or more datacenter. A region usually conatins 3 AZ.

Azure has 58 regions (1 region = 3 AZ) spreader across 140 countries when I learned about Azure in 2020.

There are paired region Concepts to avoid outage.

Geography is a specific market containing 2 or more Regions. Example US, Canada Geography(group of regions) where companies from respective countries will choose respective Geography as Geography provides a databoundary and specific compliances.

Other Notes:

  1. We learned a Recommeded Region typically has 3 AZs. However there are regions who does not support AZs which are called as Alternative or other.
  2. Examples for Regions having AZs are East, West, Central US, West, North EU, France Central, Southeast Asia. But SouthAmerica Brazil South (described as Single AZ) but on console does not show selection for AZ is an example for no AZ.
  3. An AZ is a combination of Fault Domain(group of VMs share same power and network switch so part failure will not impact other groups) and Update Domain(not all Update domains will be updated same time, so there is no chance for downtime due to updates)
  4. Availability set makes sure with right combination/grouping of Fault and Update domain so there is no chance for downtime. Each VM in an Availability set is assigned to combination Fault Domain and Update Domain and are Organized using rack design (e.g. 2FD+2UD) to avoid downtime. So each FD/UD goes to different rack.
  5. VMs can be Windows/Linux(running on windows or Linux OS)

General Availabiltiy: Service is available in General and there are 3,

  • Foundational
  • Mainstream
  • Specialized

Azure Storage services:

  • Azure Blob storage – store large amount of data.
  • Azure Disk storage – SSD/HDD storage and is encrypted.
  • Azure file storage – an SMB file server and shared data vloume.
  • Azure queueing storage – to store messages send between apps.
  • Azure Table storage – NoSQL db and no schema needed.
  • Azure Databox heavy – to store terabytes or petabytes of data.
  • Azure archive storage – for long term cold storage, low cost VMs used.volume.
  • Azure data lake storage – e.g. is big data storage for larger amount of structured/unstructured data.

Azure database services are the following:

  • Azure cosmos database – NoSQL db with 99.99% availability.
  • Azure SQL database
  • Azure database for MySQL, PostgreSQL, MariaDB
  • SQL server on VMs
  • Azure Synapse Analytics (previously named as Azure SQL Datawarehouse)
  • Azure database migration services – for cloud migration of db
  • Azure cache for Redis – caches used for static data to reduce data/app latency.
  • Azure table storage – NoAQL database and no schema based.

Azure computing Sevices include following:

  1. VM based
  2. Container based
  3. Kubernetes based
  4. Azure service Fabric – Tier 1 enterprise containers as service and distributed systems platform.
  5. Azure functions – event driven and Serverless compute(code runs without specifically provisioning servers – behind the screen it is containers manages apps, depedencies and environments). Serverless functions are charged for the duration of code run.
  6. Azure batch – to run programs in batch mode and low cost VMs are typically used.

Azure Integration Services:

  • Azure notification hub – Pub/sub send push notifications to other platforms.
  • Azure API Apps – API Gateway will build, route and consume APIs in cloud
  • Azure Service Bus – it is Cloud messaging as a service (MaaS)
  • Azure Stream Analytics – it is Serverless real-time analytics
  • Azure Logic Apps – this is for scheduling and orchestrating tasks.
  • Azure API Manangement – cloud management platform for API across environments.
  • Azure Queue Storage – it is a data storage for Messaging queueing and delivering purposes between applications

Azure Mobile and Developer tools

  • Azure SingnalR Service – it is real time messaging services for Azure.
  • Azure App Service – for deploying and scaling web apps using programming languages like Java, Python, .NET, PHP and Node.js etc
  • Visual Studio Code Editor – IDE for app development.
  • Xamarin – is for mobile applications development in .Net.

Azure DevOps Services :

  • Azure Board – you can compare like Jira Agile Kanban board
  • Azure pipeline – to support CI/CD
  • Azure repo – you can compare like Git repos.
  • Azure Test Plan – for manual and exploratory testing.
  • AzureDevTest Labs – it is for development and test environment setup.
  • Azure Artifacts – you can compare like JFrog artifactory , and is meant to store all test, development artifactories.

Azure Resource Manager(ARM):

  • Infrastructure as Code (IaC) – scripted way of building VMs provisioning, DB, App , Web sever setups. ARM is leveraged via JSON templates(pre-made ARM templates)

Azure Virtual Network(vNet) and Subnet:

  • vNet is the logical network boarders/sections where Azure resources are residing. This is done by using CIDR range of IPs. Lower the CIDR range higher the count of IPs.
  • Further divisioning/sub setting of IPs done via Subnet.
  • Public subnet is used for internet exposing web apps
  • Private subnet is used for intranet internal app resources like databases.

Azure Cloud Native Networking Services:

  • Azure DNS – for domain setups
  • Azure vNet – already discussed in above section about Virtual Network.
  • Azure load balancer – for OS level load balancing.
  • Azure application gateway – for HTTP Load balancing and web applications firewall setups.
  • Network Security Group – for subnet level firewall setups.

Azure Networking

  • Azure Front Door –
  • Azure Express Route – connects On premises to Azure cloud with speed range 50 mbps to 10 Gbps
  • Azure WANN
  • Azure Virtual Network

Azure IoT

  • IoT Central – helps to connect IoT devices to the cloud
  • IoT Hub – helps to connect IoT app and devices.
  • IoT Edge – services that is built on top of IoT Hub for data processing and analysis.

Azure DNS

  • Azure web hosting service from Microsoft for providing DNS name resolution

Azure Scale Set

  • For Scale up and down of VMs based on traffic, memory consumption or sche dule needs.

Azure Loadbalancer

  • To distribute traffic to different availabiltiy zones and make it 100% available all the time.

Azure Traffic Manager:

  • It is DNS based load balancer to controll traffic to Azure global regions.

Azure BigData(unstructured/structured data):

  • Azure synapse Analytics(SQL Datawarehouse)- runs sql on dbs for reporting
  • HDInsight – runs analytics software Hadoop, Spark, and Kafka.
  • Azure Databricks – platform to run spark analytics.
  • Data lakes analytics- large amount of data storage.

AI, ML and DL:

  • AI , computer tries to mimic human behavior.
  • ML, computer autolearn taks and perform.
  • DL, computer can have artificial nueral network and does complex work.
  • Azure ML service – uses ML/AI to run programs/pipelines and automate workflow. Programming languages like R, Python are used.
  • Azure ML studio/service – to manage AI/ML workloads.
  • Translator – multi language text translator
  • personalizer – to provide personalized user experiences.
  • Anomaly detector – detects and troubleshoots issues.
  • Azure bot services – serverless , intelligent bot service.
  • Form Recognizer – to extract text, tables, key value pairs from documents.
  • Computer vision – customize and build computer vision models out of use cases.
  • Language understanding – build natural language understanding for apps, Iot Devices
  • Ink recognizer – recognizes hand writing, shapes etc.

Serverless services:

Cloud provider takes care of the infrastructure and OS.

Serverless services are economical and faster to implement.

Event driven scale – serverless functions can be triggered and build complex and scalable apps.

Abstraction of servers – here servers are abstracted and code is described as functions

Micro billing – serverless functions run for shorter time and cost is based on run time only.

Blob storage – for Serverless object storage

Azure functions – helps to run small amount of code.

Logic apps – helps to build app workflow

Event grid – helps to react to events using pub/sub messaging and also trigger other serverless services such as functions

Azure CLI:

  • CLI is command line interface and can be installed on windows, Mac and Linux.

Interview Questions

What is Kernel in Operating system?

Kernel is the center core of operating system that controls all the low level activities. Kernel coordinate the software and hardware integration.

What is BIOS?

BIOS is the basic input output system to initiate the booting process and kicked off prior OS takes care of user interactions via software interfaces.

What is Cybersecurity?

Cybersecurity is the practice and processes meant to protect computer systems, programs and networks from malware attacks, data theft etc.

What is penetration testing?

Penetration testing is a planned and controlled ethical hacking on computer system to make sure system is stable against the hackers and malware programs.

What is port scanning ?

Port scanning is a method of identifying which server or network port are open and listening. This is the first step usually hackers do when they target a system.

What is DDoS ?

Distributed denial of service (DDoS) is cyber attack where the hacker tried to bring down the system or network or servers by loading the system with heavy transactions. These attacks make the system temporarily or indefinitely unavailable to users.

What is Botnet ?

Botnet is a group of compromised computers/servers often referred as ‘zombies’ in the control of hackers which may cause DDoS , data theft , unauthorized attack on host systems/network/servers.

What is web reconnaissance ?

Web reconnaissance is the hacking process where the intruder makes the compromised system to gather the nerwork vulnerabilities to make use of further hacking.

What is PyTorch ?

PyTorch is a machine learning library written in python and C++. PyTorch is used for Machine learning projects like computer Vision, Natural language processing. Facebook had developed PyTorch.

What is Computer Vision?

Computer Vision (CV) is an Artificial Intelligence on Machines to be able to identify and categorize real world object using machine learning models, images and videos.