This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y yum-utils | |
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
yum makecache fast | |
yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.99-1.el7_6.noarch.rpm | |
yum install docker-ce | |
systemctl status docker.service && systemctl enable docker.service && systemctl start docker.service && systemctl status docker.service | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author : Mansur Ul Hasan | |
# EMail : [email protected] | |
# Disclaimer : | |
# This script is well tested on Ubuntu Docker image and latest Ubuntu version along with | |
# some older versions like Ubuntu 14.04 | |
SetupLoc='/tmp' | |
Download_Setup () { | |
# This function download all neccesary files which are required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################ | |
# Author Mansur Ul Hasan | |
# EMail : [email protected] | |
# YouTube : https://www.youtube.com/user/mansur7820/about?view_as=subscriber | |
# This script consist with State Full Web Server with Nginx using terraform | |
# This script will setup | |
# - VPC | |
# - Subnets | |
# - Route Tables |
NewerOlder