Sunday, January 19, 2020

Install Apache HTTP Server in Linux Redhat Server - Mithun Technologies - 9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
Install Apache HTTP Server Installation 
 Login as root user and execute the below command for install http server.

yum install httpd -y

Enable the service as follows.

systemctl enable httpd.service

Start the HTTP server as follows.

systemctl start httpd.service

Important Points
  1.  httpd.conf file is the configuration file for Apache HTTP server, which is available in /etc/httpd/conf directory.
  2. Logs will be available in /etc/httpd/logs directory.

Thursday, January 16, 2020

Install Docker in Linux Server - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/
 
In Ubuntu Server
----------------------
Method-1
=======

Step 1: Update all Software Repositories using below command.

#sudo apt-get update

Step 2: Install a Docker using below command

#sudo apt install docker.io -y

Step 3: Enable and start the docker service as follows.

#sudo systemctl enable docker
#sudo systemctl start docker

Step 4: Check the  docker version

#docker --version

# You will get permison denied error as regular user dosn't have permisions to execute docker commands, add ubuntu user to docker group.

#sudo usermod -aG docker $USER
     or 
#sudo usermod -aG docker ubuntu

# Exit From Current SSH Terminal & SSH(Login) again .Then execute
docker ps

To Un Install a docker
-----------------------------

Use below command to un-install docker
#apt-get remove docker docker-engine docker.io -y
----------------------------------------------------------------------------------------------------------------------------
Method -2
========
Step 1: Update all Software Repositories using below command.
#apt-get update


Step 2: Install Docker using below command
#curl -fsSL get.docker.com | /bin/bash


Step 3: Check all the versions.
#apt-cache madison docker-ce


Step 4: If we want to install the specific version use the below command.
apt-get install docker-ce=<VERSION>

Step 5: If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

#usermod -aG docker  <<YourUser>>
============================================================================

 In Amazon Linux
-----------------------

sudo yum update -y       
sudo yum install docker -y
sudo service docker start

Add Regural user to dockergroup
sudo usermod -aG docker  <username>

ex:
sudo usermod -aG docker ec2-user

Once you add user to group exit from the server and login again.
# Get docker information
docker info

#Install Docker in Linux (Works for most of linux flavors).
sudo curl -fsSL get.docker.com | /bin/bash

Docker Home Directory/Working Dir:
/var/lib/docker

============================================================================
Install Docker on AWS RHEL  (Offcially No Support)
----------------------------------------------------------------------

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce-3:18.09.1-3.el7 -y
sudo systemctl enable docker
sudo systemctl start docker

sudo docker info

# Check docker is installed or not
docker info

# You will get permison denied error as regular user dosn't have permisions to execute docker commands, add user to docker group.

sudo usermod -aG docker $USER
or
sudo usermod -aG docker ec2-user

# Exit From Current SSH Terminal & SSH(Login) again .Then execute
docker ps




Sunday, January 5, 2020

Jenkins Docker Swarm Integration - Mithun Technologies - 9980923226

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 





Jenkins Docker Swarm Integration
=========================

1) CI/CD Pipeline Scrit to build and deploy single service in docker swarm


2) CI/CD Pipeline Scrit to build and deploy multiple services using docker stack(Compose File) in docker swarm


Pre Requisite:
==========

1) Docker Swarm Cluster
  
   https://www.youtube.com/watch?v=cuNW5Qwd-D4
  
2)  Setup CI/CD (Jenkins) Server   

=========Install Java, Jenkins, Docker in Ubuntu==============

sudo apt update -y

sudo apt install openjdk-8-jdk -y

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update -y
sudo apt-get install jenkins -y

sudo systemctl status jenkins

sudo curl -fsSL get.docker.com | /bin/bash

# Add jenkins user to docker group
sudo usermod -aG docker jenkins
# Restart jenkins to reflect docker permisions
sudo systemctl restart jenkins

# Use below commands if you want to switch to jenkins user.
sudo -i -u jenkins
sudo su -s /bin/bash jenkins

##Plugins Used
sshAgent

Ansible Installation in Amazon Linux - Mithun Technologies - 9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                 ...