Posts

Showing posts from May, 2018

Install and Configure Docker Swarm On Ubuntu

Image
Docke swarm 
Swarm is a clustering of the docker. Its a group of server on which you have hosted to different applications in order to provide some services and it's intention to insort that these services are always up and running. That we created cluster. Swarm support high availibility and we can join multyple manager to the cluster. So that if one manager node fails then onther can automatically take it's place withoud impact cluster. with swarm we can scale up our application horizantaly. we can increase number of containers instances for the same application.





Manager Node : manager nodes are manage cluster management tasks.
it's maintain cluster state.scheduling services.Serving swarm mode HTTP API Endpoint.
Worker node : worker nodes are used to execute containers. Worker node are instances of docker engine which executes containers .Worker nodes don’t participate in the raft distributed state, make scheduling decisions, or serve the swarm mode HTTP API. All manager nod…

Install Apache Using Ansible Playbooks

Image
Ansible is a automation tool which is widely used, you can install and install, configure and manage number of system and services remotely. you can install software and manage services and tasks without needing manually log in to each servers. you have to install ansible in one machine and use ssh to communicate host each other.



Ansible uses Playbooks which is written in YAML format. it's uses module base format. with playbook can run multiple tasks at time and provide more advance functionality, YAML file always start with "---" syntax. In this article we will see how to install and configure apahce2 using ansible YAML script. Master server : 10.80.253.11 [Ansible server, ] Slave 1 : 10.80.253.12 [need to install apache2 in slave 1] Slave 2 : 10.80.253.13 [need to install apache2 in slave 2] We need to configure slave server info in our ansible configuration file, click here to know how to add client machine to ansible. Let's update our apache2.yml file and install…

Setup password less SSH on linux

Image
In this article i will explain you to how to connect remote server machine using password less login.
SSH client : 10.80.253.11
SSH remote Host : 10.80.253.12














Generate a pair key on ssh server :ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:1Je7TcRc58MxO5C6qBJ6qy44L+nxT8xHSXfBHUpNy48 root@slave1 The key's randomart image is: +---[RSA 2048]----+ | .o++ooo| | ...+B+o=| | ....o+o+=.| | ..o .o oo o| | oS . oE.. | | o.. . . + | |.o .+... . . | |=.o..o.. | |.=+++oo | +----[SHA256]-----+ Copy key to client machine :ssh-copy-id -i id_rsa.pub root@10.80.253.12 it will ask you the password. Now you can login to client machine witho…

Install and Configure Ansible on Ubuntu 16.04

Image
in this article we will learn how to install and configure ansible in ubuntu 16.02, Ansible is a agent less configuration management tool which help us to manage large number of client machines easily, ansible running and communicates over ssh protocol, So it's doesn't need to install any software on client side.

Scenario : 

master server : 10.80.253.11 / master
client server 1 : 10.80.253.12 / slave1
client server 2 :  10.80.253.13 / slave2
you can enter machine ip and name in /etc/host file. 

Installing the Ansible on Ubuntu 16.04 (we will install ansible on Master server only).
To install ansible you must have to configure PPA (Personal Package Archive) on your system for latest version of ansible.

$sudo apt-add-repository ppa:ansible/ansible
Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, u…

Create aws s3 bucket using cli

Image
In this article i will explain you to how to manage s3 bucket and objects using AWS cli command line interface. for that you will have to configure AWS cli interface to your local linux machine. You can configure cli from. HERE.




After configured aws cli to your local machine, you can run all below commands. How to create bucket using AWS Cli.root@master:~# aws s3 mb s3://linuxgurubucket make_bucket: linuxgurubucket Listing Bucket : To list all bucket : root@master:~# aws s3 ls 2018-05-01 15:28:37 linuxgurubucket To list all objects from bucket :root@master:~# aws s3 ls s3://linuxgurubucket 2018-05-01 15:32:16 71515 vishal.jpg How to copy local file to s3 using aws cp command :root@master:~# aws s3 cp ansible.sh s3://linuxgurubucket/ upload: ./ansible.sh to s3://linuxgurubucket/ansible.sh To check it's upload or not :root@master:~# aws s3 ls s3://linuxgurubucket/ 2018-05-01 15:34:19 82 ansible.sh 2018-05-01 15:32:16 71515 vishal.jpg To remove file from s3 bucket using cli: