Skip to content

Instantly share code, notes, and snippets.

View mansurali901's full-sized avatar

Mansur Ul Hasan mansurali901

View GitHub Profile
@mansurali901
mansurali901 / InstallDockerOfLine-RHEL-7.sh
Last active June 30, 2019 17:43
#This script installs Docker as offline bundle in RHEL 7
#!/bin/bash
# Author : Mansur Ul Hasan
# Email : [email protected]
# This script has two functions one should be online & online system will be used as package
# collector and will be used for package bundling
# --onlybundle This function will download Docker Offline binaries"
# --onlyinstall This function install if you already preaper offline bundle"
# --bundleship This create offline bundle
#!/bin/bash
TIMEFORMAT='It took %R seconds to complete this process.'
time {
# Defining variables
threads=$[$(nproc)+1]
# Build local yum cache and install development tools
echo "[1/16] Installing the 'Developer Tools' yum group.."
yum -y makecache >/dev/null 2>&1 && yum -y groupinstall "Development Tools" >/dev/null 2>&1
#!/bin/bash
# This script meant to create AMI for specified instance this script is well tested
# on python3 support awscli before you begin make sure you have configure your AWS credentials
# on your machine for security purpose we are not adding credential to part of script
# Author : Mansur Ul Hasan
# Email : [email protected]
## Global variables
Instance=i-0ccc9bd30bcf06aa1 # Instance to backup
import os
import subprocess
import fnmatch
from re import search
thisdir = '/opt/tomcat/latest/logs/'
# r=root, d=directories, f = files
list_of_files = []
for r, d, f in os.walk(thisdir):
#!/bin/bash
# Author : Mansur Ul Hasan
# Email : [email protected]
# LinkedIn : https://www.linkedin.com/in/mansurulhasan/
### This script setup kafka and zookeeper and well tested on CentOS Amazon Linux and FEDORA
# USAGE of the script can be standalone and could be use for cluster as well
# To Install Zookeeper on the server download the script and run with root user
# sh SetupKafkaZookeeper-RPM.sh --setup-zookeeper
# follow the instructions and complete the zookeeper setup
#!/bin/bash
# Author : Mansur Ul Hasan
# Email : [email protected]
# LinkedIn : https://www.linkedin.com/in/mansurulhasan/
### This script setup kafka and zookeeper and well tested on CentOS Amazon Linux and FEDORA
# USAGE of the script can be standalone and could be use for cluster as well
# To Install Zookeeper on the server download the script and run with root user
# sh SetupKafkaZookeeper-RPM.sh --setup-zookeeper
# follow the instructions and complete the zookeeper setup
---
- hosts: all
become: true
vars:
create_containers: 4
default_container_name: docker
default_container_image: nginx
default_container_command: sleep 1d
default_container_port: 8080
defaul_host_port: 8080