Posts

Showing posts from February, 2019

Kubernetes Installation( kubeadm =Non Production)

Kubernetes installation(Kubeadm for non production) AWS (t2.micro) pricing details: low-cost-burstable-ec2-instances https://aws.amazon.com/blogs/aws/low-cost-burstable-ec2-instances/ Ensure you have more than one linux with following flavors Ensure following ports are open Install docker runtime on master & all nodes by following here Install kubeadm components on master & all nodes by following here 5. Create the kubernetes cluster Login into master, become a root user (sudo -i) execute kubeadm init root@ip-172-31-7-224:~# kubeadm init [init] Using Kubernetes version: v1.13.3 [preflight] Running pre-flight checks [preflight] Pulling images required for setting up a Kubernetes cluster [preflight] This might take a minute or two, depending on the speed of your internet connection   To start using your cluster, you need to run the following as a regular user:   mkdir -p $HOME/.kube   sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config ...

How to run Jenkins on Docker container | How to create Jenkins Volumes on Docker

1. How to start Jenkins on Docker Container  2. Start and Stop Jenkins Container  3. How to set Jenkins home on Docker Volume and Host Machine How to remove died container: ubuntu@ip-172-31-39-216:~$ docker ps -a CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES efdab4e0a237        jenkins             "/bin/tini -- /usr/l…"   5 minutes ago  ...

Ansible questions

1. what is ansible?  => Ansible is a IT tool which automates the entire infrastructure.It help in configuration management,deployment ,can handle the repeated tasks,supports multi-tier applications   2. what is difference between ansible and chef? => Ansible is agentle ss,chef has a agent.Ansible deployment method is push and chef method is pull.Ansible setup is easy,chef setup is complex.Ansible deploy over ssh and chef through client server   3. i want to create users in my machine which is the most faster tool i.e ansible or chef or puppet?  => Ansible is the faster tool    4. what is loop in ansible ? =>  loop module is to handle the multiple tasks like installing multiple packages.Dont need to write the different tasks    5. how to read the variables in playbooks ?  => 6. how to expose passwords in playbooks?  => I think through ansible-vault view inventory-name    7....

Ansible Configuration:

 Ansible Configuration: note:login to root(sudo -i) =>login to master node(ACS(ansible control server)): =>update PasswordAuthentication to YES anbd then save the file: ------------------------------------------------------------ ------------------------------------------------------ root@ip-172-31-45-194:/etc/ssh# vi /etc/ssh/sshd_config =>update PasswordAuthentication to YES and then save the file: ------------------------------------------------------------ # Change to no to disable tunnelled clear text passwords PasswordAuthentication yes =>restart the servces(SSHD): ------------------------- root@ip-172-31-45-194:/etc/ssh# service sshd restart root@ip-172-31-45-194:/etc/ssh# service sshd status =>add user (username you can use anything for my practice im using "ansible": ----------------------------------------------------------------------------- root@ip-172-31-45-194:~# adduser ansible Adding user `ansible' ... Adding new group `ansible' (1001...

aws_ecs_repository(Amazon Elastic Container Service )

What is Amazon Elastic Container Service? => Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster. =>You can host your cluster on a serverless infrastructure that is managed by Amazon ECS by launching your services or tasks using the Fargate launch type. ubuntu@ip-172-31-35-89:~$ docker pull python Using default tag: latest latest: Pulling from library/python bc9ab73e5b14: Pull complete 193a6306c92a: Pull complete e5c3f8c317dc: Pull complete a587a86c9dcb: Pull complete 72744d0a318b: Pull complete 3493e487c18d: Pull complete a89e0510fd87: Pull complete 2100d277cd6f: Pull complete b61a0d6fb492: Pull complete Digest: sha256:a837aefef8f2553789bc70436621160af4da65d95b0fb02d5032557f887d0ca5 Status: Downloaded new...

docker_swarm_configuration

ubuntu@ip-172-31-10-78:~$ docker swarm init Swarm initialized: current node (pofc9eu8fpza7kkwmbn97lsco) is now a manager. To add a worker to this swarm, run the following command:     docker swarm join --token SWMTKN-1-2i7ry795oigvvjsnqfl37nb2d27v2bn3gasxpkymlzjlils1mk-0csdkdsh9uw4j9y1kvbg4esqt 172.31.10.78:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. ================================== 172-31-10-78: Master 172-31-10-222:worker ubuntu@ip-172-31-10-222:~$ docker swarm join --token SWMTKN-1-2i7ry795oigvvjsnqfl37nb2d27v2bn3gasxpkymlzjlils1mk-0csdkdsh9uw4j9y1kvbg4esqt 172.31.10.78:2377 This node joined a swarm as a worker. ubuntu@ip-172-31-10-222:~$ docker node ls   ("this comamnd will work on only master noide") Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a m...

How to get(CLOUD) Weather Reprot from Server(CURL)

How to get cloud weather details from ubuntu: ================================= curl wttr.in/?n2 ubuntu@ip-172-31-2-125:~$ curl wttr.in/india?n2 Weather report: New Delhi, India                Haze   _ - _ - _ -  71-75 °F    _ - _ - _   ← 10 mph   _ - _ - _ -  2 mi                0.0 in                         ┌─────────────┐ ┌───────────────────────┤  Mon 18 Feb ├───────────────────────┐ │             Noon      └──────┬──────┘      Night            │ ├──────────────────────────────┼──────────────────────────────┤ │ ...

Cloud-Formation Template for N-tier(JSON)(PARAMETERS)

Create a Template for the following:(PARAMETERS & REF)  LINK: N-Tier-Network(Parameters and REF)     * Region => Mumbai * CIDR => 192.168.0.0/16 * Subnets => 2 Subnets * Web: CIDR => 192.168.0.0/24 * Data: CIDR => 192.168.1.0/24 * Internet Gateway * Route Table => Should allow all incoming & outgoing traffic * 2 Virtual Machines (EC2 Instances in each subnet)

GIT Fundamentals:

Three states in gits: => working area => Staging area => Local repo To check the status: => git status To configure a folder as a working area: => $ git init Initialized empty Git repository in C:/Users/a42983729/Desktop/Ganesh_cloud/Ganesh-git/.git/ EMEA2+A42983729@BAPAA993 MINGW64 ~/Desktop/Ganesh_cloud/Ganesh-git (master) $ ls -a ./  ../  .git/ EMEA2+A42983729@BAPAA993 MINGW64 ~/Desktop/Ganesh_cloud/Ganesh-git (master) NOTE: ".got" is memory of git dont mess with that. If you want to add a folder into git: => first create folder physically => i have created a folder with the name "src" and then checked the status. $ git status On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) EMEA2+A42983729@BAPAA993 MINGW64 ~/Desktop/Ganesh_cloud/Ganesh-git (master) $ Note : Git will never give importance to empty folders. => Now i have created a file ins...