Posts

Docker

  What are the various commands of docker file? From It defines which image to download and start from. Entry point Specifies the starting of expression to use when starting your container. CMD Command specifies the whole command to run. ADD When we want to add some files ADD statement is used. Add new files from system to the file system of image, example local files: ADD run.sh/ run.sh Tar Archieves : ADD project tar. COPY Copy the current directory contains into a container at current directory. Copy Between different environments Dev/Stage/Prod etc. What is bind mount? They will rely on host machine operating system and directory structure. A route from host computer must be supplied. What is docker persistent volume? Docker volumes provide persistent storage.Docker manages data separately.This can be shared with multiple containers separately.CLI can access docker volume. What is docker Prune command? Docker prune command Is used to Remove all containers, network images, et ce...

AWS

How do we deploy our application in AWS? We use Jenkins or docker to deploy our application in AWS. Using Jenkins docker pipeline We create docker images.We deploy images in ECS or EC2. How can we enhance availability of production during deployment in server and database? Availability comes from, how will you apply caching mechanism. We should provide hundred percent availability like when moving code to production, there should be not be production downtime. We can do a blueprint deployment Of existing instance, version and route traffic to it, and then create a new plans and update it once it is all set. Availability in RDS on AWS Can be done using read, replica and focus traffic on that by making them available in availability zone. What is cloud front?What is edge location? Amazon cloud front is a content delivery network service that helps to distribute content quickly and reliably. It uses a global network of servers called as edge locations,To cache content Closer to the users ...

Jenkins

In How many ways can we launch an agent in Jenkins? Launch agent by connecting it to master. Agent Connects to master Launch agent via SSH Controller initiates the connection to the SSH. How do we login into AWS? How do we pass and login AWS in Jenkins pipelines or Jenkins file? We can use assume role and get credentials. We can use AWS plug-in to configure cloud. In the cloud, we can provide our AWS access key or secret key. We can add our EC2 End point, region, et cetera Now in Jenkins credential provider, we can give our username and provide key credentials. This will give us a credential ID. We can use this credential ID in Jenkins pipelines. Can we write git clone in pipeline? No, we can use checkout instead. What is the difference between scripted and declarative pipeline? Declarative pipelines uses declarative model and scripted uses imperative model.Declarative breaks the stages into multiple steps.Scripted Does not require this. Scripted pipelines permit developer to inject a ...

GIT

  What is the difference between git pull and git fetch? Git fetch command tell our local gate to Vihar, the latest meta data information from original repository.(There is no file transferring. It is just like checking to see if there are any changes available.) Git pull is used To download latest changes from central repository To local repository.(File transfer happens here). I have same history and want to commit in four branches. What should I use? Git worktree helps to create parallel repository so that we can work on them in parallel.

CICD

  How the process of pushing application to container happens in CICD pipeline? Push is to github. Github is hooked to Jenkins, which listens to an SSH. Whenever code is pushed, it triggers a build, and this artefact goes to Kubernetes cluster. The cluster then take it as an image and runs it on the container in some port.

Some Devops Tools

Git GitHub Maven Nexus Sonarcube Docker Kubernetes Ansible Confluence.

Setup Devops in AWS

To set up and environment in CICD in In AWS, we require Following components Application load balancer(ALB) We create Different of ALB’s for frontend and backend Services. For all the services(ECS) and ALB, we have only one security group. Developers push their code on Code repository Like GitHub. Each micro service has a docker file In its root directory, which is used to create a customised image Of that micro service Which is deployable and executable in All docker supported Environments. We create a package, build an image using AWS code build Which reads instruction form a file In root directory Called as buildspec.yml. We deploy image in ECS clusters using Pipeline. We can define the CFT file of our ECS clusters, target service and cloud watch log groups. We have details about the container, the taskdefinition, file, and details about services. Under the ECS cluster, we have services under the services we have tasks. The task is the image, deployed and container running the same....