Posts

What is docker ? How to Install it and run ? Learn docker easy

Image
What is Docker: Docker is a computer program that performs operating-system-level virtualization also known as containerization.

How to install docker in ubuntu or Centos:
To install docker in ubuntu, go to https://get.docker.com/ . you can see there 2 commands run them in terminal.
# curl -fsSL get.docker.com -o get-docker.sh

next

# sh get-docker.sh

How to install docker in RHEL 7:
To install docker in RHEL run following commands in terminal.
sudo yum install -y yum-utils   device-mapper-persistent-data   lvm2
sudo yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-test
sudo yum install docker-ce -y
yum install -y --setopt=obsoletes=0   docker-ce-17.03.1.ce-1.el7.centos   docker-ce-selinux-17.03.1.ce-1.el7.centos

How to login to docker ?
To login to docker you need to give command # docker login (username)
Then it will prompt for password then give password which is used while creating docker account.

Docker …

NO.1 Devops Interview Questions

Image
1.What is Spot instance ?
Answer: Spot instances enable you to bid on unused EC2 instances, which can lower your Amazon EC2 costs significantly. The hourly price for a Spot instance (of each instance type in each Availability Zone) is set by Amazon EC2, and fluctuates depending on the supply of and demand for Spot instances.

2. What is Jenkins Pipeline ?
Answer: Jenkins pipeline is Based on a Domain Specific Language (DSL) in Groovy, the Pipeline plugin makes pipelines scriptable and it is an incredibly powerful way to develop complex, multi-step DevOps pipelines.

3. What is Build Pipeline in Jenkins ?
Answer: It is the process of automatically starting other job(s) after the execution of a job. This approach lets you build multi-step build pipelines or trigger the rebuild of a project if one of its dependencies is updated.

4. How to check running containers in docker ?
Answer: You can check running containers in docker by using # docker ps

5. How to check all containers which is running and …

TOP 10 docker basic commands

Image
Docker basic commands:
Not only dockerhub you can search in terminal also using Ex: # docker search ubuntu

See few of docker commands and you can follow video to check how they execute.

TOP 10 docker basic commands:
1.docker search ubuntu :- To search insted of docker hub
2.docker images :- TO see how many images existing
3.docker ps : - To see how many containers running
4.docker run -i -t ubuntu /bin/bash :- To run container
5.docker ps -a :- IT will list all the containers running and stopped
6.docker start :- To start docker container which is stopped
7.docker attach CID :- To enter into docker container
8.Ctrl + p + q :- To exit container without stopping
9.docker ps -a -q :- To see only container id
10.docker images -q :-TO see only id's of docker images
11.docker login :- TO loginto docker which you created in docker hub


Learn Docker - Important Docker Commands

Image
Docker is an important concept for Devops people.

What is docker ?
Docker is a computer program that performs operating-system-level virtualization also known as containerization which runs on kernal.
Options:
      --config string      Location of client config files (default "/root/.docker")
  -D, --debug              Enable debug mode
      --help               Print usage
  -H, --host list          Daemon socket(s) to connect to (default [])
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
      --tlsv…

How to install Ansible in RHEL and CentOS using Amazon AWS

Image
Definition: Ansible is a program which deploys applications. It automates software provisioning, configuring management and application deployment.
To install Ansible using AWS you need to follow few steps.

Prerequisites to install ansible: Python, EPEL Repository, Ansible.

Useful commands: # hostnamectl set-hostname (name) To identify master and node you need to give some names to it. Ex: # hostnamectl set-hostname master

Step 1: Change your machine name to identify which is maser and which is node.

# hostnamectl set-hostname master - (For master)

# hostnamectl set-hostname node - (For node)

Step 2: Now go to master ssh connection to do so you need to give his command

# cd .ssh

Step 3: You need to generate key in master by giving command

# ssh-keygen

Step 4:  Now to visit generated key go to id_rsa.pub

# cat id_rsa.pub

Step 5: Now go to node machine and open same ssh and edit authorized key.

IN node go to # cd .ssh

 And give # vi authorized_keys

Step 6: Now paste the master's key in node auth…

Learn useful Devops Port Numbers

Image
Devops learners need to learn about port numbers to execute tools like  SSH, Pupet, Mongodb Cassandra, Http, Https etc.. PORT - Service
8080 - Apache Tomcat 80     - Http 443   - Https 22     - SSH 8140 - Puppet 5439 - Amazon Reshift 5432 - Postgresql 27017- MongoDb 3306 - Mysql 1433 - Sql Server 9160 - Casandra 3389 - Azure RDP 9000 - Sonarcube 25   - Smtp 23   - Telnet 53   - DNS 20,21- FTP 5666 - Nagios  ELK Port Numbers 9200 - Elastic search 5044 - Logstash 5601 - Kibana
This page will update weekly with updating new port numbers.

How to Install Jenkins in RHEL and CentOS using AWS

Image
Jenkins is a Continues Integration and Continues Deployment tool. Formally called as CI/CD. Before installing Jenkins you need to install few things in RHEL.
Prerequisites: wget: - # yum install wget -y                             java:  - # yum install java - y        Apache Tomcat:  - To install tomcat just refer this link [HERE]
Step 1: After installing Apache Tomcat you need to got to bin folder and start apace tomcat server. To start Apache Tomcat you need to give command
# sh startup.sh - This command you need to give in Apache-tomcat's bin folder.
Step 2:  Now go to webaps folder and download jenkins.war file in it.
Step 3:  That's it you installed Jenkins in RHEL to view it go to your domain ip address along with :8080 and you need to give /jenkins. If you are launching in aws you need to allow port 8080 in security groups.
Step 4:  To Login jenkins you need to give cat command 
# cat /root/.jenkins/secrets/initialAdminPassword
Step 5: Here you just need to setup your name an…