Installing Kafka on CentOS 7

[vagrant@localhost ~]$ sudo yum install java-1.8.0-openjdk.x86_64 -y [vagrant@localhost ~]$ java -version openjdk version "1.8.0_144" OpenJDK Runtime Environment (build 1.8.0_144-b01) OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode) [vagrant@localhost ~]$ sudo vi /etc/profile export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk export JRE_HOME=/usr/lib/jvm/jre [vagrant@localhost ~]$ source /etc/profile [vagrant@localhost ~]$  wget http://www-us.apache.org/dist/kafka/0.9.0.1/kafka_2.11-0.9.0.1.tgz [vagrant@localhost ~]$ tar -xvf kafka_2.11-0.9.0.1.tgz [vagrant@localhost ~]$ ls -l total 34816 … Continue reading Installing Kafka on CentOS 7

virtual machines with vagrant

################ Method-1 ############## Make sure you have any hypervisor platform on your pc ex: virtualbox follow steps tin url install virtualbox and vagrant https://shaikmdrafi.wordpress.com/2017/01/13/vagrant/ mohammedrafi@NOC-RAFI:~$ mkdir vagrant mohammedrafi@NOC-RAFI:~$ cd vagrant/ mohammedrafi@NOC-RAFI:~/vagrant$ vim Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "centos/7" end mohammedrafi@NOC-RAFI:~/vagrant$ vim Vagrantfile mohammedrafi@NOC-RAFI:~/vagrant$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing … Continue reading virtual machines with vagrant

Kubernetes manual setup in centos7

[root@master ~]# systemctl stop firewalld [root@master ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service. [root@master ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> … Continue reading Kubernetes manual setup in centos7

kubectl-cheatsheet

https://kubernetes.io/docs/user-guide/kubectl-cheatsheet/ mohammedrafi@NOC-RAFI:~$ kubectl kubectl controls the Kubernetes cluster manager. Find more information at https://github.com/kubernetes/kubernetes. Basic Commands (Beginner): create Create a resource by filename or stdin expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster run-container Run a particular image … Continue reading kubectl-cheatsheet

Kubernetes with minikube

mohammedrafi@NOC-RAFI:~$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 85.3M 100 85.3M 0 0 6926k 0 0:00:12 0:00:12 --:--:-- 7483k mohammedrafi@NOC-RAFI:~$ minikube Minikube is a CLI tool that provisions and manages … Continue reading Kubernetes with minikube

git cheat sheet

https://git-scm.com/docs http://ndpsoftware.com/git-cheatsheet.html#loc=remote_repo; Setup and Config git config help Getting and Creating Projects init clone Basic Snapshotting add status diff commit reset rm mv Branching and Merging branch checkout merge mergetool log stash tag Sharing and Updating Projects fetch pull push remote submodule Inspection and Comparison show log diff shortlog describe Patching apply cherry-pick diff rebase … Continue reading git cheat sheet

Configuration of Nginx Server

Consider the code given below: server { listen 80 default_site; root /var/www; index index.html index.htm; ! server_name server_name.com http://www.server_name.com; ! location / { try_files $uri $uri/ =404; } } The above code shows a basic configuration of Nginx so as to serve files on a particular website. It listens on port number 80, which is … Continue reading Configuration of Nginx Server

Basic Docker Commands

If you wish to view all available commands in docker, use the following command: sudo docker or docker mohammedrafi@NOC-RAFI:~$ docker Usage: docker [OPTIONS] COMMAND [arg...] A self-sufficient runtime for linux containers. Options: --api-cors-header= Set CORS headers in the remote API -b, --bridge= Attach containers to a network bridge --bip= Specify network bridge IP -D, --debug=false … Continue reading Basic Docker Commands

limits.conf with ansible

[root@localhost ~]# ansible-galaxy init limits.conf - limits.conf was created successfully [root@localhost ~]# ansible-doc pam_limits [root@localhost ~]# vim limits.conf/tasks/main.yml --- # tasks file for limits.conf - pam_limits: domain: "{{ item.domain }}" limit_type: "{{ item.limit_type }}" limit_item: "{{ item.limit_item }}" value: "{{ item.value }}" with_items: "{{ limits_conf_settings }}" [root@localhost ~]# vim limits_conf.yml --- - hosts: all roles: … Continue reading limits.conf with ansible

how to use sysctl with ansible

[root@localhost ~]# sysctl -a |grep vm.swappiness vm.swappiness = 30 [root@localhost ~]# ansible-galaxy init sysctl - sysctl was created successfully [root@localhost ~]# ansible-doc sysctl [root@localhost ~]# vim test.yml --- - hosts: localhost roles: - sysctl vars: sysctl_settings: - name: vm.swappiness value: 90 [root@localhost ~]# vim sysctl/tasks/main.yml --- # tasks file for sysctl - name: sysctl settings … Continue reading how to use sysctl with ansible