Home

Awesome

Hari Sekhon - DevOps Golang Tools

GitHub stars GitHub forks License My LinkedIn GitHub Last Commit

<!-- doesn't include /tests?/ or comments [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=HariSekhon_DevOps-Golang-tools&metric=ncloc)](https://sonarcloud.io/dashboard?id=HariSekhon_DevOps-Golang-tools) [![Lines of Code](https://img.shields.io/badge/lines%20of%20code-26k-lightgrey)](https://github.com/HariSekhon/DevOps-Golang-tools) -->

Codacy CodeFactor Language grade: Golang Quality Gate Status Maintainability Rating Reliability Rating Security Rating Vulnerabilities Total alerts

<!-- site broken [![PyUp](https://pyup.io/repos/github/HariSekhon/DevOps-Golang-tools/shield.svg)](https://pyup.io/account/repos/github/HariSekhon/DevOps-Golang-tools/) [![Golang 3](https://pyup.io/repos/github/HariSekhon/DevOps-Golang-tools/golang-3-shield.svg)](https://pyup.io/repos/github/HariSekhon/DevOps-Golang-tools/) -->

Linux Mac Docker Dockerfile DockerHub Pulls

<!-- these badges don't work any more [![DockerHub Build Automated](https://img.shields.io/docker/automated/harisekhon/go-tools?logo=docker&logoColor=white)](https://hub.docker.com/r/harisekhon/go-tools/) [![Docker Build Status](https://img.shields.io/docker/build/harisekhon/go-tools?logo=docker&logoColor=white)](https://hub.docker.com/r/harisekhon/go-tools/builds) [![MicroBadger](https://images.microbadger.com/badges/image/harisekhon/go-tools.svg)](http://microbadger.com/#/images/harisekhon/go-tools) -->

CI Builds Overview Jenkins Concourse GoCD TeamCity

CircleCI BuildKite AppVeyor Drone Codefresh Cirrus CI Semaphore Buddy Shippable Travis CI

Azure DevOps Pipeline GitLab Pipeline BitBucket Pipeline AWS CodeBuild GCP Cloud Build

Repo on GitHub Repo on GitLab Repo on Azure DevOps Repo on BitBucket ShellCheck JSON YAML XML Validation Kics Grype Semgrep Semgrep Cloud Trivy

GitHub Actions Ubuntu Mac Mac 11 Mac 12 Ubuntu Ubuntu 20.04 Ubuntu 22.04 Debian Debian 10 Debian 11 Debian 12 CentOS CentOS 7 CentOS 8 Fedora Alpine Alpine 3

Golang versions Golang Golang 1.9 Golang 1.10 Golang 1.11 Golang 1.12 Golang 1.13 Golang 1.14 Golang 1.15 Golang 1.16 Golang 1.17 Golang 1.18

git.io/go-tools

DevOps Golang Tools

All programs have --help to list the available options.

Hari Sekhon

Cloud & Big Data Contractor, United Kingdom

https://www.linkedin.com/in/HariSekhon <br>(you're welcome to connect with me on LinkedIn)

Make sure you run make update if updating and not just git pull as you will often need the latest library submodule and possibly new upstream libraries

Quick Start

Ready to run Docker image

All programs and their pre-compiled dependencies can be found ready to run on DockerHub.

List all programs:

docker run harisekhon/go-tools

Run any given program:

docker run harisekhon/go-tools <program> <args>

Automated Build from source

installs git, make, pulls the repo and build the binaries:

curl -L https://git.io/go-bootstrap | sh

or manually:

git clone https://github.com/HariSekhon/DevOps-Golang-tools go-tools
cd go-tools
make

The make command automates building the go binaries which can then be copied around to other systems of the same family, eg. Linux or Mac.

Alternatively there is shebang magic which means each .go program can be called directly like a script and it'll runtime compile and execute instantly like a scripted language. This is a neat trick for quick usage and testing built on go run, but for frequent use the compiled binaries are usually the way to go.

Detailed Build Instructions are available further down.

Usage

All programs come with a --help switch which includes a program description and the list of command line options.

Environment variables are supported for convenience and also to hide credentials from being exposed in the process list eg. $PASSWORD, $TRAVIS_TOKEN. These are indicated in the --help descriptions in brackets next to each option and often have more specific overrides with higher precedence eg. $AMBARI_HOST, $HBASE_HOST take priority over $HOST.

DevOps Golang Tools - Inventory

Detailed Build Instructions

Manual Setup

Enter the go-tools directory and run git submodule init and git submodule update to fetch my library repo:

git clone https://github.com/HariSekhon/DevOps-Golang-tools go-tools
cd go-tools
git submodule update --init
./compile.sh
Mac OS X

The automated build also works on Mac OS X but you'll need to install Apple XCode (on recent Macs just typing git is enough to trigger Xcode install).

I also recommend you get HomeBrew to install other useful tools and libraries you may need like OpenSSL for development headers and tools such as wget (these are installed automatically if Homebrew is detected on Mac OS X):

bash-tools/install/install_homebrew.sh

Updating

Run make update. This will git pull and then git submodule update which is necessary to pick up corresponding library updates.

Contributions

Patches, improvements and even general feedback are welcome in the form of GitHub pull requests and issue tickets.

Star History

Star History Chart

git.io/go-tools

More Core Repos

<!-- OTHER_REPOS_START -->

Knowledge

Readme Card Readme Card

<!-- Not support on GitHub Markdown: <iframe src="https://raw.githubusercontent.com/HariSekhon/HariSekhon/main/knowledge.md" width="100%" height="500px"></iframe> Does nothing: <embed src="https://raw.githubusercontent.com/HariSekhon/HariSekhon/main/knowledge.md" width="100%" height="500px" /> -->

DevOps Code

Readme Card Readme Card Readme Card Readme Card

<!-- [![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=f8f551332440f1ca8897ff010e363e03)](https://gist.github.com/HariSekhon/f8f551332440f1ca8897ff010e363e03) -->

Containerization

Readme Card Readme Card

CI/CD

Readme Card Readme Card

DBA - SQL

Readme Card

DevOps Reloaded

Readme Card Readme Card Readme Card Readme Card Readme Card

Templates

Readme Card Readme Card

Misc

Readme Card Readme Card

The rest of my original source repos are here.

Pre-built Docker images are available on my DockerHub.

<!-- 1x1 pixel counter to record hits -->

<!-- OTHER_REPOS_END -->