Sunday, November 19, 2023

Dockers -1

 Please read the part 1, part 2, part 3  

https://dotnetbyudayrajakonda.blogspot.com/2023/11/introduction-to-azure-dev-ops.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-2.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-3.html

Docker Installation

Note: You can install Docker in VM or cloud server. So i would like to go with Cloud Server.

I want to install the Docker in cloud server, so i am going to create a free AWS Account.

Please follow the below url steps to create that



After creating an account, Login into the AWS account , and search for EC2, then the below screen gets opened. 

Here you can see in the below image, Instance Running as 0.














Click on Click on the Instance Running. Here, you can see that no instance are created. So let us create an instance now.

















Click on Launch Instance

























Select the operating System now(Note Please select Free Tier Eligible only.)













Network settings, let it be default



On Clicking on the launch Instance













.












Here i means instance on Cloud.












Here, in the above image you can see that connect button is grayed out. so to enable that you need to select the docker checkbox, and then you need to click on Connect.
























Here, in the above you can see

Instance Id
Public Ip Add
Private Ip Add


On clicking on Connect the below screen gets displayed
























Click on the SSH Client Tab

With this, I will be connecting my laptop to the AWS Cloud Server.















First Step is 

Open a SSL Client


So , to open SSL Client, we need to install a software MobaXTerm

MobaXterm free Xserver and tabbed SSH client for Windows


So, we need to download and Install MobaXterm in your Laptop or Desktop

We have got others softwares as well in the market. You can download any one of them to Connect.

After you install the Software you should be able to see this in the start .


























After clicking on that you should be able to see the below screen




Now click on Start local terminal





Next step is at the time of creating instance in aws, one file will be downloaded automatically. So we need to paste and keep that file in one folder.

I am pasting that file in C://Desktop/





Now, Run the below command





The above chmod 400 uday.pem value has been taken from SSH Client from aws cloud server from the above step





Make sure, you always get a tick mark when running command


Next step is copy the above command in the Example that is 
ssh -i "uday.pem" ubuntu@ec2-65-0-21-27.ap-south-1.compute.amazonaws.com


Run that 






From the above screen shot, you can see the user name and ip address and compare the same in the aws cloud site 


ubuntu@ip-172-31-15-245:~$







Now, everything is ready. Now we need to install Docker in the AWS Cloud Server.

 

MS Azure Part 3

 Please read the part 1 and part 2 of MS Azure before reading this.

https://dotnetbyudayrajakonda.blogspot.com/2023/11/introduction-to-azure-dev-ops.html

https://dotnetbyudayrajakonda.blogspot.com/2023/11/ms-azure-part-2.html

Docker 









Prerequisites to learn Dockers


The prerequisite is that the readers should be familiar with the basic concepts of Windows and the various programs that are already available on the Windows operating system. In addition, it would help if the readers have some exposure to Linux.

Docker is a container management service. The keywords of Docker are develop, ship and run anywhere. The whole idea of Docker is for developers to easily develop applications, ship them into containers which can then be deployed anywhere.

Features of Docker

With containers, it becomes easier for teams across different units, such as development, QA and Operations to work seamlessly across applications.

You can deploy Docker containers anywhere, on any physical and virtual machines and even on the cloud.
Since Docker containers are pretty lightweight, they are very easily scalable.

Now, what we will be doing is we will keep all the software's in one container










The above images says that we have three containers one with 7.0 version and the other with 6.0 version and other assume as 5.0 version. 

We also need to have Docker Engine and operating system need to be installed inside that server.


Virtualization vs Container








Assume that i have created Three VMS. in that  i have the below memory


1 VM (6 GB )--> 4 GB of memory I am using, and remaining 2 GB I am not using.

2 VM (4 GB)--->3 GB of memory I am using, and remaining 1 GB I am not using.

3 VM(6 GB) ----2 GB of memory I am using, and remaining 4 GB I am not using.











In virtualization   / Docker









Docker is an application which is used to create container on top of physical server or Virtual Machine.

We can also install container in Cloud Server also.


Docker Architecture

Before learning the Docker architecture, first, you should know about the Docker Daemon.

The Docker daemon

It manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.

Docker Architecture

Docker follows Client-Server architecture, which includes the three main components that are Docker ClientDocker Host, and Docker Registry.












1. Docker Client

Docker client uses commands and REST APIs to communicate with the Docker Daemon (Server). When a client runs any docker command on the docker client terminal, the client terminal sends these docker commands to the Docker daemon. Docker daemon receives these commands from the docker client in the form of command and REST API's request.

Docker Client uses Command Line Interface (CLI) to run the following commands -

docker build

docker pull

docker run


2. Docker Host

Docker Host is used to provide an environment to execute and run applications. It contains the docker daemon, images, containers, networks, and storage.


Docker Registry

Docker Registry manages and stores the Docker images.

There are two types of registries in the Docker -

Pubic Registry - Public Registry is also called as Docker hub.

Private Registry - It is used to share images within the

A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.


Docker Objects

Docker Images

Docker images are the read-only binary templates used to create Docker Containers. It uses a private container registry to share container images within the enterprise and also uses public container registry to share container images within the whole world


Docker Architecture



Docker Containers

Containers are the structural units of Docker, which is used to hold the entire package that is needed to run the application. The advantage of containers is that it requires very less resources.

In other words, we can say that the image is a template, and the container is a copy of that template.


Docker Networking

Using Docker Networking, an isolated package can be communicated. Docker contains the following network drivers -

  • Bridge - Bridge is a default network driver for the container. It is used when multiple docker communicates with the same docker host.
  • Host - It is used when we don't need for network isolation between the container and the host.
  • None - It disables all the networking.
  • Overlay - Overlay offers Swarm services to communicate with each other. It enables containers to run on the different docker host.
  • Macvlan - Macvlan is used when we want to assign MAC addresses to the containers.

Docker Storage

Docker Storage is used to store data on the container. Docker offers the following options for the Storage -

  • Data Volume - Data Volume provides the ability to create persistence storage. It also allows us to name volumes, list volumes, and containers associates with the volumes.
  • Directory Mounts - It is one of the best options for docker storage. It mounts a host's directory into a container.
  • Storage Plugins - It provides an ability to connect to external storage platforms.

Saturday, November 18, 2023

MS Azure -Part 2

 Read Part 1 

https://dotnetbyudayrajakonda.blogspot.com/2023/11/introduction-to-azure-dev-ops.html#more

Before Going to Dev Ops, let us go through the History.

What is Software Development.

Software development refers to a set of computer science activities dedicated to the process of creating, designing, deploying and supporting software.











In any language we develop we , need to follow these steps that is Requirements, Design, Implementation, Testing(Verification), Maintance 


To follow the above steps earlier we use to go with WaterFall Model











Once we are done with the requirements ,then only we used to go with the Design Phase

Once Design Phase is done, then only we used to develop the code.

Once Development is Completed, then only we used to go for Testing.

Once Testing  is Completed, then only we used to go for Maintance.

Finally Deliver the Product.


So success rate of the Water Fall Model was only 14%

Drawbacks:

When delivering the product to the Client, Client was not happy . So lot of time and money spent got wasted.

So, to over come with this then people started with Agile Model

This is a sprint based process, Which will be of only two weeks. 



















The Agile model is a type of incremental model where software is developed in a rapid incremental cycle. The most notable feature of the Agile model is the establishment of the project scope, requirements, number, and duration of iteration at the beginning of the development process.


WaterFall vs Agile


All the project development phases such as designing, development, testing, etc., are completed once in the Waterfall model while as part of the Agile methodology, they follow an iterative development approach. Consequentially, phases like planning, development, prototyping, etc., have the flexibility to appear multiple times during the entire SDLC.


If you want to use the Waterfall model for software development, then you have to confirm all the development requirements before the start as changing the requirements is not an option once the project development starts. The Agile methodology, on the other hand, is quite flexible, and allows for changes to be made in the project development requirements irrespective of the set plans.


One of the major differences between Agile and Waterfall development methodologies is their unique approaches towards quality and testing. In the Waterfall model, the “testing” phase comes after the “build” phase, but in the Agile methodology, testing is typically performed along with programming or at least in the same iteration as programming.


Imagine : You are the developer, You have developed an application, and which need to be deployed in the deployment server. 

















The above image says that you have developed the code, with the help of all the software's libraries .















Now, the above images says that the developer has develop the code and he has check in the code in the git repro, and he has informed the Dev Ops team saying that my code is been checked in the git repro, and asking him to deploy into Prod/QA/UAT/DEV Server

Now, the dev ops started seeing some bugs in the code, so he has informed the developer saying that code is not working. so Developer answered saying that it is working fine in my system. Now there was a communication gap between these two teams. (Dev Ops  & Dev). 

Note: The thing here is dev was using the latest version and dev ops is using the older version. So that is the reason it was not working with the dev ops team.

















Now , every time this was causing problem, and lot of time was getting wasted. Some what the problems with software's, libraries.

In Big MNC, to install software we need lot of mail approval from higher end to installed that particular software.


To overcome this kind of situations Docker came into picture.
























Wednesday, November 15, 2023

Introduction to Azure Dev Ops- PART 1

I am going to explain the Contents first, which  you need to learn before going to Azure Dev Ops.

Note: To learn Azure Dev Ops, you need not have any background.

Course Content For Non IT Back Ground which , I  am going to cover in part wise.

First Phase 1 - You need to Learn

 Introduction To IT
 Linux
 Storage
 Networking
 On Premise Deployment
 Docker
 Kubernetes.

















If you are very much comfortable , with the first phase then that would be easier for you to learn Azure Dev Ops.

Second Phase --You need to Learn About Azure

Introduction to Azure
Azure Storage
Azure Compute
Back up & Monitoring
Networking





















Third Phase  -- Azure DevOps













Why MS Azure Why not AWS  ?--At the last you will know this answer


Introduction to IT

What is Client:


Somebody who receives a service from anything.







Different Types of Client

  • Thin Client
  • Thick Client

Thin  Client:
It is nothing but from the browser we are browsing the  sites.

Thick Client: 
It is nothing but, which we browser through apps, are nothing but Thick Client.

The basic difference between both terms is that the thin client uses a remote computer for processing an application. Whereas, the thick client does the application processing by itself as it locally runs the applications.



























What is Server

A server is a computer program or device that provides a service to another computer program and its user, also known as the client



Different Types of Servers

1. Web server

An open-source web server is used for accessing the world wide web through public domain software.

2. Proxy server

Proxy servers act as a bridge between a host server and a client server. A proxy sends data from a website to your computer IP address after it passes through the proxy's server.

3. Virtual machine (VM)

As their name suggests, virtual machines store and connect data strictly through virtual space. To create a virtual machine, IT teams use a hypervisor, also known as a virtual machine monitor (VMM), which is software that can run thousands of virtual machines through only one piece of physical hardware

Mail server

A mail server stores and delivers mail for clients through email service platforms.

Print server

A print server connects remotely to local computers to print through a network.


Application Server
These servers connect clients to software applications through virtual server connections.



What is On Premise  ?

Scenario

Assume that, I am having an application, which will tell me the number of seats available in the bus.

As soon as the person selects the seats he makes payment than we need to update saying that ticket is booked.

Now, assume that they are 20 people daily access the your application, and in the next weak again 50   + people are accessing the application . Daily the network traffic is increasing. So more number of people are using than CPU wont support.

























CPU (Server): The above image is CPU Server.



Now, daily the people are going on increasing, so your CPU cannot handle it because of less configuration.(RAM  & Memory) 

To over come, either we need to go with

  • Bigger Configuration
  • Buy Bigger configuration and transfer your data into the new CPU(Server)
  • Rent a server


Below image shows how the physical server looks


















Now, we need to connect server to Switches and Switches to Router.











Now below, is the image of how this Server are kept inside the Rack















Now, again more number of people are increasing than more number of servers and more number of Racks. Below is the image













The above image is how the data center looks.


In real term how it works is 













1 --> Firewall which will check if the request is valid or Not
2--> Router 
3 -> Switch
4,5,6--> Server(Which will be kept inside Racks)

We will have load balancer, based on that it will check which is having less load and it will redirect to that server.


Drawbacks of Physical Server 
 
I want to deploy the two application with different versions.

nginx 2.4
nginx 2.6 

This is not possible, as we cannot installed both the versions in the single server.




















Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...