Skip to main content

Posts

aws&Devops Interview questions and answers

 1.How to mount unmount  a disk ? First we can check disk partition fdisk -l or lsblk  * we can create a directory where we want mount    sudo mkdir /mnt/mydisk *we can use mount command to mount the disk    sudo mount /dev/sdXn /mnt/mydisk *To unmount disk     sudo umount /mnt/mydisk 2. How to unlock the username? *If a user account is locked due to multiple failed login attempts Then we can use below command  sudo passwd -u username 3.How to set user to NO LOGIN *If we don't require interactive logins. Then we can use below command sudo usermod --shell /usr/sbin/nologin username The usermod command can be used to modify user account properties 4.what are the process states in linux The Linux process states are many *Running (R).   : we are executing instructions on CPU *Sleeping(S)    : Sleeping processes are not using CPU resources * Stopped (T).  : A stopped process can be resumed or terminated. *Zombie (Z):    :  In an operating system ,processes that are terminated but , for
Recent posts

aws Devops course content

   aws 1.EC2 2.Installing nginx ,httpd,tomcat and jenkins on top redhat ec2 machine     security group   How we can connect to machine   Linux basic commands 3.vpc 4.s3 bucket 5.IAM 6.ROUTE53 7.Autoscalling 8.Load balacner     _____-Infra as a code----------------- Terraform a. ec2 machine creation b. Packer - creating our own AMI c.s3 bucket ,vpc and IAM we can up by using terraform   Task:Terraform Integration  with jenkins  ---------------------------Cloudformation----- services how we can up in aws How we can deploy war file inside s3 bucket after building maven project in jenkins ------------------------------------------     DevOps SCM  ----Git  All git commands Webhoks concept with jenkins ---------  Jenkins -------------------- Ansible   (Configuration management tool) 1.How we can create ec2 machine by using anible playbook 2.how we can install httpd on ec2 machine by playbook 3.In two machines how we can deploy tomcat by using ansible playbook 4.How we can integrate ansible w

shell scripting and important linux questions and answers

 1.echo $0 what it means?     It will show the name of the currently running process Example: prepare test.sh #!/bin/bash echo $0 Then run test.sh after giving permission to chmod 700 test.sh root@ip-172-31-15-196:~# chmod 700 test.sh root@ip-172-31-15-196:~# ./test.sh ./test.sh 2.How to create 100 empty files at a time? touch file-{001..100} 3.What is hardlink and softlink and how it will be work and what is the difference between them? Hard link:  1.If we delete original file our data will be available 2.Inode number of both original file and hard link file both are same 3.Hard links are fast . Soft link: 1.If we delete original file our data will not be available 2.inode of original file and soft link file are different 3.Soft links are slower. 4.soft links can be used for linking directories 5.soft links will work across file systems. 6.File permissions are different. Creating sof link creating a file1.txt [root@ip-172-31-43-210 linux]# echo "ashwika tech" >> file1.

Listout aws ec2 machines.

 1. aws ec2 describe-instances --filters "Name=instance-type,Values=t2.micro" --query "Reservations[].Instances[].InstanceId" 2. aws ec2 describe-instances --filters "Name=instance-type,Values=t2.medium" --query "Reservations[].Instances[].InstanceId" 3.To list out security groups  aws ec2 describe-security-groups --group-ids

How to copy files from one server to another server by using ansible copy module

 We have two servers 1.master 2.worker1 create playbook example: play.yml ---   - hosts: all     tasks:     - name: Ansible copy file to remote server       copy:        src: ~/kube-cluster        dest: /root Run ansible playbook  ansible-playbook play.yml

Jenkins with sonarqube and nexus

 Jenkins installation on redhat machine installation of java on   yum install wget -y  yum install java-1.8.0-openjdk-devel.x86_64 Jenkins nstallation ----------------------- i.  sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo ii. sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key iii.sudo yum install jenkins iv. service jenkins start  service jenkins status ====================sonarqube setup========== Sonarqube on amazon linux ec2 machine Install docker on amazonlinux ec2 then run below command docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest =====Integration of sonarqube and jenkins================================ -----In jenkins we need to install SonarQube Scanner plugin--- Then go to manage jenkins and click on configure system In middle we have SonarQube servers option will be there clcik on Add sonar give name and url http://44.192.26.91:9000 clcik on add we w