Giter Club home page Giter Club logo

saba143 / devops-bash-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harisekhon/devops-bash-tools

0.0 0.0 0.0 1.44 MB

100+ DevOps Bash Scripts, Advanced .bashrc, .vimrc, .screenrc, .tmux.conf, .toprc, Utility Code Library used by CI and all my GitHub repos - includes code for AWS, GCP, Kubernetes, Kafka, Docker, Git, Code & build linting, package management for Linux / Mac / Python / Perl / Ruby / NodeJS / Golang, and lots more random goodies

Home Page: https://www.linkedin.com/in/harisekhon

License: Other

Shell 92.01% Makefile 5.30% Vim Script 2.69%

devops-bash-tools's Introduction

Hari Sekhon - DevOps Bash Tools

Build Status Codacy Badge Platform DockerHub

100+ Shell Scripts, Advanced Bashrc & Utility Code Library used by all my other GitHub repos.

For more advanced Systems Administration scripts in other languages, see the repos listed at the bottom of the page.

These scripts can be used straight from the git clone, but see setup benefits of make install next.

Quick Setup

make install
  • Adds sourcing to .bashrc/.bash_profile to automatically inherit all .bash.d/*.sh environment enhancements for all technologies (see Inventory Overview below)
  • Symlinks all .* config files to $HOME for git, vim, top, htop, screen, tmux, editorconfig, ansible etc.
  • Installs OS package dependencies for all scripts (detects the OS and installs the right RPMs, Debs, Apk or Mac HomeBrew packages)
  • Installs Python packages including AWS CLI

make install effectively does make system-packages bash python aws, but if you want to pick and choose from different sections, see Individual Setup Parts below.

Inventory Overview

  • Scripts - Linux systems administration scripts:

    • installation scripts for various OS packages (RPM, Deb, Apk) for various Linux distros (Redhat RHEL / CentOS / Fedora, Debian / Ubuntu, Alpine)
    • install if absent scripts for Python, Perl, Ruby, NodeJS and Golang packages - good for minimizing the number of source code installs by first running the OS install scripts and then only building modules which aren't already detected as installed (provided by system packages), speeding up builds and reducing the likelihood of compile failures
    • install scripts for Jython and build tools like Gradle and SBT for when Linux distros don't provide packaged versions or where the packaged versions are too old
    • Git branch management
    • utility scripts used from other scripts
  • .* - dot conf files for lots of common software eg. advanced .vimrc, .gitconfig, massive .gitignore, .editorconfig, .screenrc, .tmux.conf etc.

    • .vimrc - contains many awesome vim tweaks, plus hotkeys for linting lots of different file types in place, including Python, Perl, Bash / Shell, Dockerfiles, JSON, YAML, XML, CSV, INI / Properties files, LDAP LDIF etc without leaving the editor!
    • .gitconfig and extensive .gitignore - the bashrc profile also auto-uses diff-so-fancy for nicer diffs if found in $PATH
  • .bashrc - shell tuning and sourcing of .bash.d/*.sh

  • .bash.d/*.sh - thousands of lines of advanced bashrc code, aliases, functions and environment variables for:

    • Linux & Mac
    • SCM - Git, Mercurial, Svn
    • AWS
    • Docker
    • Kubernetes
    • Kafka
    • Vagrant
    • automatic GPG and SSH agent handling for handling encrypted private keys without re-entering passwords, and lazy evaluation to only prompt key load the first time SSH is called
    • and lots more - see .bash.d/README for a more detailed list
    • run make bash to link .bashrc/.bash_profile and the .* dot config files to your $HOME directory to auto-inherit everything
  • lib/*.sh - Bash utility libraries full of functions for Docker, environment, CI detection (Travis CI, Jenkins), port and HTTP url availability content checks etc. Sourced from all my other GitHub repos to make setting up Dockerized tests easier.

  • setup/install_*.sh - various simple to use installation scripts for common technologies like Ansible, Terraform, MiniKube and MiniShift (Kubernetes / Redhat OpenShift/OKD dev VMs), Maven, Gradle, SBT, EPEL, RPMforge, Homebrew, Travis CI, Parquet Tools etc.

  • kafka_wrappers/*.sh - scripts to make Kafka CLI usage easier including auto-setting Kerberos to source TGT from environment and auto-populating broker and zookeeper addresses. These are auto-added to the $PATH when .bashrc is sourced. For something similar for Solr, see solr_cli.pl in the DevOps Perl Tools repo.

  • Programming language linting:

    • Python (syntax, pep8, pre-byte-compiling)
    • Perl
    • Java
    • Scala
    • Ruby
    • Bash / Shell
    • Misc (whitespace, custom enforced checks like not calling quit() in Python programs etc.)
  • Build System & CI linting:

  • Data format validation using programs from my DevOps Python Tools repo:

    • CSV
    • JSON
    • Avro
    • Parquet
    • INI / Properties files (Java)
    • LDAP LDIF
    • XML
    • YAML

Currently utilized in the following GitHub repos:

  • DevOps Python Tools - 75+ DevOps CLI tools for Hadoop, HBase, Spark, Log Anonymizer, Ambari Blueprints, AWS CloudFormation, Linux, Docker, Spark Data Converters & Validators (Avro / Parquet / JSON / CSV / INI / XML / YAML), Elasticsearch, Solr, Travis CI, Pig, IPython

  • DevOps Perl Tools - 25+ DevOps CLI tools for Hadoop, HDFS, Hive, Solr/SolrCloud CLI, Log Anonymizer, Nginx stats & HTTP(S) URL watchers for load balanced web farms, Dockerfiles & SQL ReCaser (Hive, Impala, MySQL, PostgreSQL, Cassandra CQL, Apache Drill, Couchbase N1QL, Microsoft SQL Server, Oracle, Pig Latin, Neo4j, InfluxDB), Ambari FreeIPA Kerberos, Datameer, Linux...

  • The Advanced Nagios Plugins Collection - 450+ programs for Hadoop, Docker, Kafka, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Mesos, Riak, MongoDB, Memcached, Couchbase, CouchDB, Neo4j, Ambari, Cloudera, Hortonworks, MapR etc.

  • HAProxy-configs - 80+ HAProxy Configs for Hadoop, Big Data, NoSQL, Docker, Elasticsearch, SolrCloud, HBase, Cloudera, Hortonworks, MapR, MySQL, PostgreSQL, Apache Drill, Hive, Presto, Impala, ZooKeeper, OpenTSDB, InfluxDB, Prometheus, Kibana, Graphite, SSH, RabbitMQ, Redis, Riak, Rancher etc.

  • Dockerfiles - 50+ DockerHub public images for Docker & Kubernetes - Hadoop, Kafka, ZooKeeper, HBase, Cassandra, Solr, SolrCloud, Presto, Apache Drill, Nifi, Spark, Mesos, Consul, Riak, OpenTSDB, Jython, Advanced Nagios Plugins & DevOps Tools repos on Alpine, CentOS, Debian, Fedora, Ubuntu, Superset, H2O, Serf, Alluxio / Tachyon, FakeS3

  • Perl Lib - Perl utility library

  • PyLib - Python utility library

  • Lib-Java - Java utility library

  • Nagios Plugin Kafka - Kafka Nagios Plugin written in Scala with Kerberos support

Pre-built Docker images are available for those repos (which include this one as a submodule) and the "docker available" icon above links to an uber image which contains all my github repos pre-built. There are Centos, Alpine, Debian and Ubuntu versions of this uber Docker image containing all repos.

Individual Setup Parts

Optional, only if you don't do the full make install.

Install only OS system package dependencies and AWS CLI via Python Pip (doesn't symlink anything to $HOME):

make

Adds sourcing to .bashrc and .bash_profile and symlinks dot config files to $HOME (doesn't install OS system package dependencies):

make link

undo via

make unlink

Install only OS system package dependencies (doesn't include AWS CLI or Python packages):

make system-packages

Install AWS CLI:

make aws

Install generically useful Python CLI tools and modules (includes AWS CLI, autopep8 etc):

make python

Stargazers over time

Stargazers over time

devops-bash-tools's People

Contributors

harisekhon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.