Monitoring Kafka, Storm, Zookeeper with Icinga2

Steps to monitor Kafka & Storm: – open JMX port for kafka and storm – To open JMX port in Kafka : a. Add below line to $KAFKA_HOME/bin/kafka-run-class.sh b. Add below line to $KAFKA_HOME/bin/kafka-server-start.sh c. Restart kafka – To open JMX port in Storm: a. Add below lines $STORM_HOME/conf/storm.yaml b. Restart Storm – Check ports…

Bare Metal Provisioning of Linux (Proxmox) using FAI

By Neelesh Gurjar What is Remote unattended installation? Remote unattended installation means installation of remote server without any human interference. This process is very useful for bare metal provisioning, automated installation on multiple servers, etc. What is Proxmox? Proxmox is debian based OS, which provides Virtualization Platform like VMware. https://www.proxmox.com/en/ What is FAI? FAI is…

Migrate Linux VMs from XEN (SolusVM) to KVM (Proxmox)

Migrating CentOS Linux installed Xen instance to KVM is really tricky. This note contains one of the way to migrate. Here I have used SolusVM for Xen based instances and Proxmox for KVM based instances. PS: This will work with Linux Only. For eg. I have used CentOS6 linux Here are the steps to migrate:…

Setting up Self Healing Tomcat

System Administrator has to configure Critical services regularly. He/She also needs to monitor that services and if services stop then needs to start them. We can automate starting of service after failure using Daemontools/supervise. We can also use monit for same. In this note we will configure Daemontools to monitor Tomcat service and if Tomcat crashes, Daemontools…

Configuring SSL in Tomcat & AWS Elastic Load Balancer (ELB)

Steps to configure SSL in Tomcat & integrate it with AWS Elastic Load Balancer (ELB) 1. Create Keystore using keytool.2. Generate Certificate Signing Request (CSR)3. Get RootCertificate, Intermidiate Certificate & Public Certificate. 4. Import above certificates in keystore 5. Configure keystore in tomcat 6. Integrate SSL certificate with AWS ELB – – Generate RSA Private…

Configure Elastic IP Failover between EC2 instances in AWS

Configuring Failover cluster between 2 EC2 instances is bit tricky. We can achieve Failover between 2 EC2 by configuring Elastic IP Failover. In AWS we can associate Elastic IP to an EC2 instance. Using this Elastic IP we can connect to the associated instance using terminal. We can configure basic Failover of EIP using below…

Configure MySQL Master-Master replication

Server1: 10.0.0.1Server2: 10.0.0.2Both have same version of Mysql server installed Steps to configure MySQL Master-Master replication: On Server1:1. Enable server listens on all Network Interfaces, also enable binary logs and other mysql config:You should have below entries in /etc/my.cnf auto_increment_increment = 2 auto_increment_offset = 1 bind-address=0.0.0.0 log-bin=mysql-bin-log binlog-do-db=<dbName> expire_logs_days=2 max_binlog_size=100M innodb_flush_log_at_trx_commit=1 sync_binlog=1 server-id=12. Restart mysql…

MySQL incremental backup on S3 Storage bucket

Steps to take incremental backup of MySQL database and upload it on S3 bucket: 1. Enable binary loging in mysql for our database. Added below entries in /etc/my.cnf under [mysqld] log-bin=mysql-bin-log binlog-do-db=Database_name expire_logs_days=2 max_binlog_size=100M 2. Restart mysql server systemctl restart mysqld 3. Installed s3cmd & configured it yum install s3cmd s3cmd –configure Enter AWS access_key…

Basic steps to Secure Tomcat 8

1. Change Server Header Response In server.xml <Connector port=”80″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ redirectPort=”8443″ server=”<WhatEverYouWant2Show>”/> 2. Undeployed below applications – / -> Root app which displays Tomcat Welcome page – /docs -> which shows Tomcat documentation on http://ip/docs – /examples -> It shows Tomcat examples page on http://ip/examples 3. Restrict access to manager and host-manager apps. –…