1000+ DevOps Bash Scripts - AWS, GCP, Kubernetes, Docker, CI/CD, APIs, SQL, PostgreSQL, MySQL, Hive, Impala, Kafka, Hadoop, Jenkins, GitHub, GitLab, BitBucket, Azure DevOps, TeamCity, Spotify, MP3, LDAP, Code/Build Linting, pkg mgmt for Linux, Mac, Python, Perl, Ruby, NodeJS, Golang, Advanced dotfiles: .bashrc, .vimrc, .gitconfig, .screenrc, tmux..
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Hari Sekhon 535ba6dc9d renamed dockerhub_show_tags.sh to dockerhub_list_tags.sh 4 years ago
.Codefresh/cli-config added config.yaml 5 years ago
.athenacli updated athenaclirc 5 years ago
.aws/shell
.bash.d updated git.sh 4 years ago
.buildkite updated pipeline.yml 4 years ago
.circleci updated config.yml 4 years ago
.config
.git-templates/git-secrets/hooks
.github updated sync_to_adjacent_repos.sh 4 years ago
.sdkman/etc
.semaphore updated semaphore.yml 4 years ago
Library/Containers/net.sourceforge.cruisecontrol.CCMenu/Data/Library/Preferences added Spotify-Playlists to CCMenu 4 years ago
applescript updated mouse_clicks.sh 4 years ago
lib updated run.sh 4 years ago
resources moved lib/pipreqs_mapping.txt to resources/ 4 years ago
scripts updated spotify_commit_playlists.sh 4 years ago
setup Merge branch 'master' of https://github.com/HariSekhon/DevOps-Bash-tools 4 years ago
sql@a601f79f6d updated submodule sql 4 years ago
templates@5b886bd3b4 updated templates 4 years ago
tests changed SPOTIFY_CLIENT_ID/SPOTIFY_SECRET to SPOTIFY_ID/SPOTIFY_SECRET to align with zmb3/spotify 4 years ago
vagrant updated README.md 4 years ago
yamllint
.Xdefaults
.Xmodmap
.ansible.cfg
.appveyor.yml updated .appveyor.yml 4 years ago
.bash_profile updated .bash_profile 4 years ago
.bashrc updated .bashrc 4 years ago
.cirrus.yml updated .cirrus.yml 4 years ago
.concourse.yml updated .concourse.yml 4 years ago
.customize_environment
.drone.yml updated .drone.yml 4 years ago
.editorconfig
.gcloudignore updated .gcloudignore 4 years ago
.gemrc updated .gemrc 4 years ago
.gitconfig updated .gitconfig 4 years ago
.gitconfig.local added .gitconfig.local 4 years ago
.gitignore Merge branch 'master' of https://github.com/HariSekhon/DevOps-Bash-tools 4 years ago
.gitlab-ci.yml updated .gitlab-ci.yml 4 years ago
.gitmodules added templates submodule 4 years ago
.gocd.yml updated .gocd.yml 4 years ago
.hound.yml added .hound.yml 4 years ago
.inputrc
.mdlrc
.my.cnf updated .my.cnf 4 years ago
.perlcritic_forbidden_modules
.perlcriticrc
.psqlrc updated .psqlrc 4 years ago
.pylintrc
.rabbitmqadmin.conf added .rabbitmqadmin.conf 5 years ago
.sawsrc
.screenrc updated .screenrc 5 years ago
.scrutinizer.yml updated .scrutinizer.yml 5 years ago
.sonarcloud.properties updated .sonarcloud.properties 5 years ago
.sqliterc added .sqliterc 4 years ago
.terraformignore added .terraformignore 4 years ago
.tmux.conf updated .tmux.conf 4 years ago
.toprc
.travis.yml updated .travis.yml 4 years ago
.vimrc updated .vimrc 4 years ago
.zlogin added .zlogin 5 years ago
.zlogout added .zlogout 5 years ago
.zprofile added .zprofile 5 years ago
.zshenv added .zshenv 5 years ago
.zshrc updated .zshrc 5 years ago
DOCKER_STATUS.md updated DOCKER_STATUS.md 5 years ago
Jenkinsfile updated Jenkinsfile 4 years ago
LICENSE
Makefile updated Makefile 4 years ago
Makefile.in updated Makefile.in 4 years ago
README.md updated README.md 4 years ago
STATUS.md updated STATUS.md 4 years ago
apk_filter_installed.sh added apk_filter_installed.sh 4 years ago
apk_filter_not_installed.sh added apk_filter_not_installed.sh 4 years ago
apk_install_packages.sh updated apk_install_packages.sh 4 years ago
apk_install_packages_if_absent.sh updated apk_install_packages_if_absent.sh 4 years ago
apk_remove_packages.sh
appveyor_api.sh updated appveyor_api.sh 5 years ago
appveyor_byoc.sh updated appveyor_byoc.sh 5 years ago
appveyor_byoc_debian.sh updated appveyor_byoc_debian.sh 5 years ago
appveyor_delete_offline_byoc.sh added appveyor_delete_offline_byoc.sh 5 years ago
apt_install_packages.sh updated apt_install_packages.sh 4 years ago
apt_install_packages_if_absent.sh updated apt_install_packages_if_absent.sh 4 years ago
apt_remove_packages.sh updated apt_remove_packages.sh 5 years ago
apt_wait.sh updated apt_wait.sh 4 years ago
atlassian_cidr_ranges.sh updated atlassian_cidr_ranges.sh 4 years ago
aws_account_summary.sh updated aws_account_summary.sh 4 years ago
aws_cloudtrails_cloudwatch.sh updated aws_cloudtrails_cloudwatch.sh 5 years ago
aws_cloudtrails_event_selectors.sh added aws_cloudtrails_event_selectors.sh 5 years ago
aws_cloudtrails_s3_accesslogging.sh updated aws_cloudtrails_s3_accesslogging.sh 5 years ago
aws_cloudtrails_s3_kms.sh updated aws_cloudtrails_s3_kms.sh 5 years ago
aws_cloudtrails_status.sh added aws_cloudtrails_status.sh 5 years ago
aws_config_all_types.sh added aws_config_all_types.sh 5 years ago
aws_config_recording.sh added aws_config_recording.sh 5 years ago
aws_ecr_tag_image.sh updated aws_ecr_tag_image.sh 4 years ago
aws_harden_password_policy.sh added aws_harden_password_policy.sh 5 years ago
aws_iam_generate_credentials_report_wait.sh updated aws_iam_generate_credentials_report_wait.sh 4 years ago
aws_kms_key_rotation_enabled.sh renamed aws_kms_keys_rotation_enabled.sh to aws_kms_key_rotation_enabled.sh 5 years ago
aws_meta.sh updated aws_meta.sh 5 years ago
aws_password_policy.sh updated aws_password_policy.sh 4 years ago
aws_policies_attached_to_users.sh updated aws_policies_attached_to_users.sh 4 years ago
aws_policies_granting_full_access.sh updated aws_policies_granting_full_access.sh 4 years ago
aws_policies_unattached.sh updated aws_policies_unattached.sh 5 years ago
aws_s3_access_logging.sh updated aws_s3_access_logging.sh 5 years ago
aws_spot_when_terminated.sh updated aws_spot_when_terminated.sh 5 years ago
aws_ssm_put_param.sh updated aws_ssm_put_param.sh 5 years ago
aws_users.sh updated aws_users.sh 5 years ago
aws_users_access_key_age.sh updated aws_users_access_key_age.sh 4 years ago
aws_users_access_key_age_report.sh changed base64 --decode to be portable 4 years ago
aws_users_access_key_last_used.sh updated aws_users_access_key_last_used.sh 4 years ago
aws_users_access_key_last_used_report.sh changed base64 --decode to be portable 4 years ago
aws_users_last_used_report.sh changed base64 --decode to be portable 4 years ago
aws_users_mfa_active_report.sh changed base64 --decode to be portable 4 years ago
aws_users_mfa_serials.sh updated aws_users_mfa_serials.sh 4 years ago
aws_users_pw_last_used.sh updated aws_users_pw_last_used.sh 5 years ago
azure-pipelines.yml updated azure-pipelines.yml 4 years ago
beeline.sh updated beeline.sh 4 years ago
beeline_zk.sh updated beeline_zk.sh 5 years ago
bigquery_foreach_dataset.sh updated bigquery_foreach_dataset.sh 4 years ago
bigquery_foreach_table.sh updated bigquery_foreach_table.sh 4 years ago
bigquery_foreach_table_all_datasets.sh updated bigquery_foreach_table_all_datasets.sh 4 years ago
bigquery_generate_query_biggest_tables_across_datasets_by_row_count.sh updated bigquery_generate_query_biggest_tables_across_datasets_by_row_count.sh 4 years ago
bigquery_generate_query_biggest_tables_across_datasets_by_size.sh updated bigquery_generate_query_biggest_tables_across_datasets_by_size.sh 4 years ago
bigquery_list_datasets.sh updated bigquery_list_datasets.sh 4 years ago
bigquery_list_tables.sh updated bigquery_list_tables.sh 4 years ago
bigquery_list_tables_all_datasets.sh added bigquery_list_tables_all_datasets.sh 4 years ago
bigquery_table_row_count.sh updated bigquery_table_row_count.sh 4 years ago
bigquery_tables_row_counts.sh updated bigquery_tables_row_counts.sh 4 years ago
bigquery_tables_row_counts_all_datasets.sh added bigquery_tables_row_counts_all_datasets.sh 4 years ago
bitbucket-pipelines.yml updated bitbucket-pipelines.yml 4 years ago
bitbucket_api.sh updated bitbucket_api.sh 4 years ago
bitbucket_foreach_repo.sh updated bitbucket_foreach_repo.sh 4 years ago
bitbucket_set_repo_description.sh added bitbucket_set_repo_description.sh 4 years ago
boot added boot 4 years ago
brew_filter_in_setup.sh updated brew_filter_in_setup.sh 4 years ago
brew_filter_installed.sh updated brew_filter_installed.sh 4 years ago
brew_filter_not_in_setup.sh updated brew_filter_not_in_setup.sh 4 years ago
brew_filter_not_installed.sh added brew_filter_not_installed.sh 4 years ago
brew_install_packages.sh updated brew_install_packages.sh 5 years ago
brew_install_packages_if_absent.sh updated brew_install_packages_if_absent.sh 4 years ago
brew_upgrade_packages.sh updated brew_upgrade_packages.sh 4 years ago
buddy.yml updated buddy.yml 4 years ago
buildkite_agent.sh updated buildkite_agent.sh 4 years ago
buildkite_agents.sh updated buildkite_agents.sh 4 years ago
buildkite_api.sh updated buildkite_api.sh 4 years ago
buildkite_cancel_scheduled_builds.sh updated buildkite_cancel_scheduled_builds.sh 4 years ago
buildkite_create_pipeline.sh updated buildkite_create_pipeline.sh 4 years ago
buildkite_foreach_pipeline.sh updated buildkite_foreach_pipeline.sh 4 years ago
buildkite_get_pipeline.sh updated buildkite_get_pipeline.sh 4 years ago
buildkite_pipelines.sh updated buildkite_pipelines.sh 4 years ago
buildkite_rebuild_cancelled_builds.sh updated buildkite_rebuild_cancelled_builds.sh 4 years ago
buildkite_rebuild_failed_builds.sh added buildkite_rebuild_failed_builds.sh 4 years ago
buildkite_rebuild_last_cancelled.sh updated buildkite_rebuild_last_cancelled.sh 4 years ago
buildkite_recreate_pipeline.sh updated buildkite_recreate_pipeline.sh 4 years ago
buildkite_running_builds.sh updated buildkite_running_builds.sh 4 years ago
buildkite_save_pipelines.sh updated buildkite_save_pipelines.sh 4 years ago
buildkite_trigger.sh updated buildkite_trigger.sh 4 years ago
buildkite_trigger_all.sh updated buildkite_trigger_all.sh 4 years ago
buildkite_update_pipeline.sh updated buildkite_update_pipeline.sh 4 years ago
center.sh
check_all.sh updated check_all.sh 4 years ago
check_ansible_playbooks.sh updated check_ansible_playbooks.sh 5 years ago
check_aws_no_git_credentials.sh updated check_aws_no_git_credentials.sh 5 years ago
check_bash_arrays.sh updated check_bash_arrays.sh 5 years ago
check_bash_duplicate_defs.sh updated check_bash_duplicate_defs.sh 5 years ago
check_bash_syntax.sh updated check_bash_syntax.sh 5 years ago
check_caches_clean.sh added check_caches_clean.sh 4 years ago
check_circle_ci_yml.sh added check_circle_ci_yml.sh 5 years ago
check_codefresh_config.sh added check_codefresh_config.sh 5 years ago
check_concourse_config.sh added check_concourse_config.sh 5 years ago
check_cson.sh updated check_cson.sh 5 years ago
check_docker_clean.sh updated check_docker_clean.sh 4 years ago
check_docker_compose.sh updated check_docker_compose.sh 5 years ago
check_dockerfiles.sh updated check_dockerfiles.sh 5 years ago
check_drone_yml.sh added check_drone_yml.sh 4 years ago
check_duplicate_dependencies.sh updated check_duplicate_dependencies.sh 5 years ago
check_duplicate_packages.sh updated check_duplicate_packages.sh 5 years ago
check_git_commit_authors.sh updated check_git_commit_authors.sh 5 years ago
check_git_no_merge_remnants.sh updated check_git_no_merge_remnants.sh 5 years ago
check_gitlab_ci_yml.sh added check_gitlab_ci_yml.sh 4 years ago
check_gradle_build.sh updated check_gradle_build.sh 5 years ago
check_json.sh updated check_json.sh 5 years ago
check_makefiles.sh renamed check_makefile.sh to check_makefiles.sh 4 years ago
check_maven_pom.sh updated check_maven_pom.sh 5 years ago
check_no_tabs.sh updated check_no_tabs.sh 4 years ago
check_non_executable_scripts.sh updated check_non_executable_scripts.sh 5 years ago
check_perl_syntax.sh updated check_perl_syntax.sh 4 years ago
check_python3_compat.sh
check_python_asserts.sh updated check_python_asserts.sh 5 years ago
check_python_exception_pass.sh updated check_python_exception_pass.sh 5 years ago
check_python_misc.sh updated check_python_misc.sh 5 years ago
check_python_pep8.sh updated check_python_pep8.sh 5 years ago
check_python_pylint.sh updated check_python_pylint.sh 5 years ago
check_pytools.sh updated check_pytools.sh 5 years ago
check_readme_badges.sh updated check_readme_badges.sh 4 years ago
check_ruby_syntax.sh updated check_ruby_syntax.sh 5 years ago
check_sbt_build.sh updated check_sbt_build.sh 5 years ago
check_shippable_readme_ids.sh updated check_shippable_readme_ids.sh 4 years ago
check_ssh_keys_encrypted.sh updated check_ssh_keys_encrypted.sh 5 years ago
check_tests_run_qualified.sh updated check_tests_run_qualified.sh 4 years ago
check_tld_chars.sh updated check_tld_chars.sh 5 years ago
check_travis_yml.sh updated check_travis_yml.sh 5 years ago
check_vagrantfiles.sh updated check_vagrantfiles.sh 4 years ago
check_whitespace.sh updated check_whitespace.sh 4 years ago
check_yaml.sh updated check_yaml.sh 5 years ago
circle_ci_job.sh updated circle_ci_job.sh 5 years ago
clean_caches.sh updated clean_caches.sh 4 years ago
cloudera_manager_api.sh updated cloudera_manager_api.sh 4 years ago
cloudera_manager_impala_queries.sh updated cloudera_manager_impala_queries.sh 5 years ago
cloudera_manager_impala_queries_ddl.sh added cloudera_manager_impala_queries_ddl.sh 5 years ago
cloudera_manager_impala_queries_exceptions.sh updated cloudera_manager_impala_queries_exceptions.sh 5 years ago
cloudera_manager_impala_queries_failed.sh added cloudera_manager_impala_queries_failed.sh 5 years ago
cloudera_manager_impala_queries_metadata.sh updated cloudera_manager_impala_queries_metadata.sh 5 years ago
cloudera_manager_impala_queries_metadata_errors.sh updated cloudera_manager_impala_queries_metadata_errors.sh 5 years ago
cloudera_manager_impala_queries_metadata_refresh.sh renamed cloudera_manager_impala_queries_refresh_metadata.sh to cloudera_manager_impala_queries_metadata_refresh.sh 5 years ago
cloudera_manager_yarn_apps.sh updated cloudera_manager_yarn_apps.sh 5 years ago
cloudera_manager_yarn_apps_failed.sh added cloudera_manager_yarn_apps_failed.sh 5 years ago
cloudera_navigator_api.sh updated cloudera_navigator_api.sh 4 years ago
cloudera_navigator_audit_logs.sh updated cloudera_navigator_audit_logs.sh 5 years ago
cloudera_navigator_audit_logs_download.sh updated cloudera_navigator_audit_logs_download.sh 4 years ago
cloudera_navigator_audit_logs_download_retry.sh updated cloudera_navigator_audit_logs_download_retry.sh 5 years ago
cloudera_navigator_audit_logs_export_postgresql.sh updated cloudera_navigator_audit_logs_export_postgresql.sh 5 years ago
cloudflare_api.sh updated cloudflare_api.sh 4 years ago
cloudflare_cidr_ranges.sh added cloudflare_cidr_ranges.sh 4 years ago
cloudflare_custom_certificates.sh added cloudflare_custom_certificates.sh 4 years ago
cloudflare_dns_records.sh added cloudflare_dns_records.sh 4 years ago
cloudflare_dns_records_all_zones.sh updated cloudflare_dns_records_all_zones.sh 4 years ago
cloudflare_dnssec.sh updated cloudflare_dnssec.sh 4 years ago
cloudflare_foreach_account.sh updated cloudflare_foreach_account.sh 4 years ago
cloudflare_foreach_zone.sh updated cloudflare_foreach_zone.sh 4 years ago
cloudflare_ssl_verified.sh added cloudflare_ssl_verified.sh 4 years ago
cloudflare_ssl_verified_all_zones.sh added cloudflare_ssl_verified_all_zones.sh 4 years ago
codefresh.yml updated codefresh.yml 4 years ago
codefresh_cancel_delayed_builds.sh added codefresh_cancel_delayed_builds.sh 5 years ago
concourse.sh merged github 4 years ago
coveralls_latest.sh updated coveralls_latest.sh 4 years ago
crt_hash.sh updated crt_hash.sh 4 years ago
csv_header_indices.sh updated csv_header_indices.sh 5 years ago
curl_auth.sh added JWT support as well as OAuth2 4 years ago
debs_filter_installed.sh renamed debs_installed.sh to debs_filter_installed.sh 4 years ago
debs_filter_not_installed.sh renamed debs_not_installed.sh to debs_filter_not_installed.sh 4 years ago
decomment.sh
disable_swap.sh added disable_swap.sh 4 years ago
docker_api.sh updated docker_api.sh 4 years ago
docker_clean.sh
docker_generate_status_page.sh updated docker_generate_status_page.sh 5 years ago
docker_mount_build_exec.sh
docker_registry_get_manifest.sh added docker_registry_get_manifest.sh 4 years ago
docker_registry_list_images.sh updated docker_registry_list_images.sh 4 years ago
docker_registry_list_tags.sh renamed docker_registry_show_tags.sh to docker_registry_list_tags.sh 4 years ago
docker_registry_tag_image.sh added docker_registry_tag_image.sh 4 years ago
dockerhub_api.sh updated dockerhub_api.sh 4 years ago
dockerhub_build_status.sh updated dockerhub_build_status.sh 5 years ago
dockerhub_list_tags.sh renamed dockerhub_show_tags.sh to dockerhub_list_tags.sh 4 years ago
dockerhub_search.sh added dockerhub_search.sh 4 years ago
dockerhub_show_tags_by_last_updated.sh updated dockerhub_show_tags_by_last_updated.sh 4 years ago
drone_api.sh added drone_api.sh 4 years ago
drone_docker_runner.sh added drone_docker_runner.sh 4 years ago
drone_docker_server.sh added drone_docker_server.sh 4 years ago
elasticsearch_decommission_node.sh updated elasticsearch_decommission_node.sh 5 years ago
exec_interactive.sh
find_broken_links.sh updated find_broken_links.sh 5 years ago
find_duplicate_files_by_checksum.sh updated find_duplicate_files_by_checksum.sh 4 years ago
find_duplicate_files_by_size.sh updated find_duplicate_files_by_size.sh 4 years ago
find_duplicate_lines.sh updated find_duplicate_lines.sh 5 years ago
find_hanging_mount_point.sh
fly.sh updated fly.sh 5 years ago
gce_is_preempted.sh updated gce_is_preempted.sh 5 years ago
gce_list_instance_service_accounts.sh updated gce_list_instance_service_accounts.sh 4 years ago
gce_meta.sh updated gce_meta.sh 5 years ago
gce_when_preempted.sh updated gce_when_preempted.sh 5 years ago
gcp_find_orphaned_disks.sh updated gcp_find_orphaned_disks.sh 4 years ago
gcp_foreach_project.sh updated gcp_foreach_project.sh 4 years ago
gcp_info.sh updated gcp_info.sh 4 years ago
gcp_info_accounts_secrets.sh updated gcp_info_accounts_secrets.sh 4 years ago
gcp_info_all_projects.sh updated gcp_info_all_projects.sh 4 years ago
gcp_info_auth_config.sh updated gcp_info_auth_config.sh 4 years ago
gcp_info_bigdata.sh updated gcp_info_bigdata.sh 4 years ago
gcp_info_compute.sh updated gcp_info_compute.sh 4 years ago
gcp_info_gke.sh updated gcp_info_gke.sh 4 years ago
gcp_info_networking.sh updated gcp_info_networking.sh 4 years ago
gcp_info_projects.sh updated gcp_info_projects.sh 4 years ago
gcp_info_services.sh updated gcp_info_services.sh 4 years ago
gcp_info_storage.sh updated gcp_info_storage.sh 4 years ago
gcp_info_tools.sh updated gcp_info_tools.sh 4 years ago
gcp_secrets_to_kubernetes.sh updated gcp_secrets_to_kubernetes.sh 4 years ago
gcp_secrets_to_kubernetes_multipart.sh updated gcp_secrets_to_kubernetes_multipart.sh 4 years ago
gcp_service_apis.sh updated gcp_service_apis.sh 4 years ago
gcr_alternate_tags.sh updated gcr_alternate_tags.sh 4 years ago
gcr_list_tags.sh updated gcr_list_tags.sh 4 years ago
gcr_newest_image_tags.sh updated gcr_newest_image_tags.sh 4 years ago
gcr_tag_datetime.sh updated gcr_tag_datetime.sh 4 years ago
gcr_tag_latest.sh updated gcr_tag_latest.sh 4 years ago
gcr_tag_newest_image_as_latest.sh updated gcr_tag_newest_image_as_latest.sh 4 years ago
gcr_tags_timestamps.sh updated gcr_tags_timestamps.sh 4 years ago
generate_status_page.sh updated generate_status_page.sh 4 years ago
gerrit.sh updated gerrit.sh 4 years ago
gerrit_projects.sh updated gerrit_projects.sh 4 years ago
git_clean_repos.sh updated git_clean_repos.sh 4 years ago
git_files_last_modified.sh renamed git_log_files_last_modified.sh to git_files_last_modified.sh 4 years ago
git_foreach_branch.sh renamed git_for_each_branch.sh to git_foreach_branch.sh 5 years ago
git_foreach_modified.sh updated git_foreach_modified.sh 4 years ago
git_foreach_repo.sh updated git_foreach_repo.sh 4 years ago
git_log_empty_commits.sh added git_log_empty_commits.sh 4 years ago
git_merge_all.sh updated git_merge_all.sh 5 years ago
git_merge_master.sh updated git_merge_master.sh 5 years ago
git_merge_master_pull.sh updated git_merge_master_pull.sh 5 years ago
git_pull_make_repos.sh updated git_pull_make_repos.sh 4 years ago
git_remotes_add_public_repos.sh updated git_remotes_add_public_repos.sh 4 years ago
git_remotes_set_multi_origin.sh updated git_remotes_set_multi_origin.sh 4 years ago
git_repos.sh updated git_repos.sh 4 years ago
git_repos_pull.sh updated git_repos_pull.sh 4 years ago
git_repos_update.sh updated git_repos_update.sh 4 years ago
git_submodules_update_repos.sh updated git_submodules_update_repos.sh 4 years ago
git_summary_line.sh updated git_summary_line.sh 4 years ago
git_sync_repos_upstream.sh updated git_sync_repos_upstream.sh 4 years ago
github_actions_runner.sh updated github_actions_runner.sh 4 years ago
github_api.sh updated github_api.sh 4 years ago
github_foreach_repo.sh updated github_foreach_repo.sh 4 years ago
github_generate_status_page.sh updated github_generate_status_page.sh 4 years ago
github_get_user_gpg_keys.sh added github_get_user_gpg_keys.sh 4 years ago
github_get_user_ssh_public_key.sh updated github_get_user_ssh_public_key.sh 4 years ago
github_get_user_ssh_public_key2.sh updated github_get_user_ssh_public_key2.sh 4 years ago
github_repo_description.sh added github_repo_description.sh 4 years ago
github_repo_stars.sh added github_repo_stars.sh 4 years ago
github_repos_sync_status.sh updated github_repos_sync_status.sh 4 years ago
github_runners.sh updated github_runners.sh 4 years ago
github_sync_repo_descriptions.sh updated github_sync_repo_descriptions.sh 4 years ago
github_workflow_runs.sh updated github_workflow_runs.sh 4 years ago
github_workflows.sh updated github_workflows.sh 4 years ago
github_workflows_status.sh updated github_workflows_status.sh 4 years ago
gitio.sh updated gitio.sh 4 years ago
gitlab_api.sh updated gitlab_api.sh 4 years ago
gitlab_foreach_repo.sh updated gitlab_foreach_repo.sh 4 years ago
gitlab_get_user_ssh_public_key.sh updated gitlab_get_user_ssh_public_key.sh 4 years ago
gitlab_get_user_ssh_public_key2.sh updated gitlab_get_user_ssh_public_key2.sh 4 years ago
gitlab_project_mirrors.sh added gitlab_project_mirrors.sh 4 years ago
gitlab_pull_mirror.sh added gitlab_pull_mirror.sh 4 years ago
gitlab_set_project_description.sh updated gitlab_set_project_description.sh 4 years ago
gitlab_validate_ci_yaml.sh updated gitlab_validate_ci_yaml.sh 4 years ago
gke_kube_creds.sh added gke_kube_creds.sh 4 years ago
gocd.sh merged github 4 years ago
golang_get_install.sh updated golang_get_install.sh 5 years ago
golang_get_install_if_absent.sh updated golang_get_install_if_absent.sh 5 years ago
golang_rm_binaries.sh updated golang_rm_binaries.sh 4 years ago
grep_or_append.sh added grep_or_append.sh 4 years ago
hadolint.yaml
hadoop_random_node.sh updated hadoop_random_node.sh 5 years ago
hdfs_checksum.sh
hdfs_checksum_crc.sh
hdfs_checksum_crc_parallel.sh
hdfs_checksum_parallel.sh
hdfs_file_size.sh updated hdfs_file_size.sh 5 years ago
hdfs_file_size_including_replicas.sh updated hdfs_file_size_including_replicas.sh 5 years ago
hdfs_find_replication_factor_1.sh
hdfs_set_replication_factor_3.sh
headtail.sh updated headtail.sh 4 years ago
hive_foreach_table.sh updated hive_foreach_table.sh 4 years ago
hive_list_databases.sh updated hive_list_databases.sh 4 years ago
hive_list_tables.sh updated hive_list_tables.sh 4 years ago
hive_tables_column_counts.sh updated hive_tables_column_counts.sh 4 years ago
hive_tables_locations.sh updated hive_tables_locations.sh 4 years ago
hive_tables_metadata.sh updated hive_tables_metadata.sh 4 years ago
hive_tables_row_counts.sh updated hive_tables_row_counts.sh 4 years ago
impala_foreach_table.sh updated impala_foreach_table.sh 4 years ago
impala_list_databases.sh updated impala_list_databases.sh 4 years ago
impala_list_tables.sh updated impala_list_tables.sh 4 years ago
impala_shell.sh updated impala_shell.sh 4 years ago
impala_tables_column_counts.sh updated impala_tables_column_counts.sh 4 years ago
impala_tables_locations.sh updated impala_tables_locations.sh 4 years ago
impala_tables_metadata.sh updated impala_tables_metadata.sh 4 years ago
impala_tables_row_counts.sh updated impala_tables_row_counts.sh 4 years ago
install_packages.sh updated install_packages.sh 4 years ago
install_packages_if_absent.sh updated install_packages_if_absent.sh 4 years ago
jenkins.sh updated jenkins.sh 4 years ago
jenkins_api.sh updated jenkins_api.sh 4 years ago
jenkins_cli.sh updated jenkins_cli.sh 4 years ago
jenkins_password.sh updated jenkins_password.sh 4 years ago
json2yaml.sh updated json2yaml.sh 4 years ago
jsondiff.sh updated jsondiff.sh 5 years ago
jvm_heaps.sh added jvm_heaps.sh 4 years ago
jvm_heaps_total_mb.sh updated jvm_heaps_total_mb.sh 4 years ago
kafka_acls.sh updated kafka_acls.sh 5 years ago
kafka_cli_jaas.conf moved kafka_wrappers/kafka_cli_jaas.conf to . 5 years ago
kafka_configs.sh updated kafka_configs.sh 5 years ago
kafka_console_consumer.sh updated kafka_console_consumer.sh 5 years ago
kafka_console_producer.sh updated kafka_console_producer.sh 5 years ago
kafka_consumer_groups.sh updated kafka_consumer_groups.sh 5 years ago
kafka_consumer_perf_test.sh updated kafka_consumer_perf_test.sh 5 years ago
kafka_producer_perf_test.sh updated kafka_producer_perf_test.sh 5 years ago
kafka_topics.sh updated kafka_topics.sh 5 years ago
kubeadm_join_cmd.sh renamed kubernetes_join_cmd.sh to kubeadm_join_cmd.sh 4 years ago
kubeadm_join_cmd2.sh renamed kubernetes_join_cmd2.sh to kubeadm_join_cmd2.sh 4 years ago
kubectl_busybox.sh updated kubectl_busybox.sh 4 years ago
kubectl_dnsutils.sh updated kubectl_dnsutils.sh 4 years ago
kubectl_exec.sh updated kubectl_exec.sh 4 years ago
kubectl_exec_grep.sh updated kubectl_exec_grep.sh 4 years ago
kubernetes_api.sh renamed k8s_api.sh to kubernetes_api.sh 4 years ago
kubernetes_delete_stuck_jobs.sh updated kubernetes_delete_stuck_jobs.sh 4 years ago
kubernetes_etcd_backup.sh renamed kubernetes_backup.sh to kubernetes_etcd_backup.sh 4 years ago
kubernetes_find_stuck_jobs.sh added kubernetes_find_stuck_jobs.sh 4 years ago
kubernetes_foreach_context.sh updated kubernetes_foreach_context.sh 4 years ago
kubernetes_foreach_namespace.sh updated kubernetes_foreach_namespace.sh 4 years ago
kubernetes_get_secret_values.sh changed base64 --decode to be portable 4 years ago
kubernetes_info.sh updated kubernetes_info.sh 4 years ago
kubernetes_pods_per_node.sh updated kubernetes_pods_per_node.sh 4 years ago
kubernetes_running_image_counts.sh updated kubernetes_running_image_counts.sh 4 years ago
kubernetes_running_images.sh updated kubernetes_running_images.sh 4 years ago
ldap_group_recurse.sh
ldap_user_recurse.sh
ldapsearch.sh updated ldapsearch.sh 5 years ago
mariadb.sh reworked postgres.sh, mysqld.sh, mariadb.sh, migrated postgres wait to dbshell.sh and improved docker handling 4 years ago
mariadb_test_scripts.sh updated mariadb_test_scripts.sh 4 years ago
mp3_set_album.sh updated mp3_set_album.sh 4 years ago
mp3_set_artist.sh updated mp3_set_artist.sh 4 years ago
mp3_set_track_name.sh updated mp3_set_track_name.sh 4 years ago
mp3_set_track_order.sh updated mp3_set_track_order.sh 4 years ago
mysql.sh updated mysql.sh 4 years ago
mysql_foreach_table.sh updated mysql_foreach_table.sh 4 years ago
mysql_list_databases.sh updated mysql_list_databases.sh 4 years ago
mysql_list_tables.sh updated mysql_list_tables.sh 4 years ago
mysql_tables_row_counts.sh updated mysql_tables_row_counts.sh 4 years ago
mysql_test_scripts.sh updated mysql_test_scripts.sh 4 years ago
mysqld.sh reworked postgres.sh, mysqld.sh, mariadb.sh, migrated postgres wait to dbshell.sh and improved docker handling 4 years ago
nodejs_npm_install.sh updated nodejs_npm_install.sh 5 years ago
nodejs_npm_install_if_absent.sh updated nodejs_npm_install_if_absent.sh 4 years ago
perl_cpanm_install.sh updated perl_cpanm_install.sh 5 years ago
perl_cpanm_install_if_absent.sh updated perl_cpanm_install_if_absent.sh 5 years ago
perl_find_duplicate_cpan_requirements.sh updated perl_find_duplicate_cpan_requirements.sh 5 years ago
perl_find_library_executable.sh updated perl_find_library_executable.sh 5 years ago
perl_find_library_path.sh updated perl_find_library_path.sh 5 years ago
perl_find_unused_cpan_modules.sh updated perl_find_unused_cpan_modules.sh 5 years ago
perl_generate_fatpacks.sh updated perl_generate_fatpacks.sh 4 years ago
perl_generate_par_binaries.sh added perl_generate_par_binaries.sh 5 years ago
perlpath.sh
pingdom_api.sh updated pingdom_api.sh 4 years ago
pingdom_check_latency_by_hour.sh added pingdom_check_latency_by_hour.sh 4 years ago
pingdom_check_outages.sh updated pingdom_check_outages.sh 4 years ago
pingdom_checks.sh updated pingdom_checks.sh 4 years ago
pingdom_checks_average_response_times.sh updated pingdom_checks_average_response_times.sh 4 years ago
pingdom_checks_latency_by_hour.sh added pingdom_checks_latency_by_hour.sh 4 years ago
pingdom_checks_outages.sh updated pingdom_checks_outages.sh 4 years ago
pingdom_foreach_check.sh updated pingdom_foreach_check.sh 4 years ago
pingdom_sms_credits.sh updated pingdom_sms_credits.sh 4 years ago
postgres.sh updated postgres.sh 4 years ago
postgres_foreach_table.sh updated postgres_foreach_table.sh 4 years ago
postgres_foreach_table_timeout.sh updated postgres_foreach_table_timeout.sh 4 years ago
postgres_list_databases.sh updated postgres_list_databases.sh 4 years ago
postgres_list_schemas.sh updated postgres_list_schemas.sh 4 years ago
postgres_list_tables.sh updated postgres_list_tables.sh 4 years ago
postgres_tables_row_counts.sh updated postgres_tables_row_counts.sh 4 years ago
postgres_test_scripts.sh updated postgres_test_scripts.sh 4 years ago
progress_dots.sh updated progress_dots.sh 4 years ago
psql.sh updated psql.sh 4 years ago
pygmentize.sh
python_compile.sh updated python_compile.sh 4 years ago
python_find_duplicate_pip_requirements.sh updated python_find_duplicate_pip_requirements.sh 5 years ago
python_find_library_executable.sh updated python_find_library_executable.sh 5 years ago
python_find_library_path.sh updated python_find_library_path.sh 5 years ago
python_find_unused_pip_modules.sh updated python_find_unused_pip_modules.sh 5 years ago
python_indices.sh added ./python_indices.sh 5 years ago
python_module_to_import_name.sh updated python_module_to_import_name.sh 4 years ago
python_pip_install.sh updated python_pip_install.sh 5 years ago
python_pip_install_if_absent.sh updated python_pip_install_if_absent.sh 5 years ago
python_pip_reinstall_all_modules.sh added python_pip_reinstall_all_modules.sh 5 years ago
python_pyinstaller.sh updated python_pyinstaller.sh 5 years ago
python_pypi_versions.sh updated python_pypi_versions.sh 4 years ago
pythonpath.sh
quay.io_api.sh added quay.io_api.sh 4 years ago
random_select.sh
random_string.sh updated random_string.sh 4 years ago
retry.sh updated retry.sh 5 years ago
rpms_filter_installed.sh renamed rpms_installed.sh to rpms_filter_installed.sh 4 years ago
rpms_filter_not_installed.sh updated rpms_filter_not_installed.sh 4 years ago
ruby_gem_install.sh updated ruby_gem_install.sh 5 years ago
ruby_gem_install_if_absent.sh updated ruby_gem_install_if_absent.sh 5 years ago
run_latest_tests.sh
run_tests.sh updated run_tests.sh 5 years ago
sbtw updated sbtw 4 years ago
scalastyle_config.xml
scan_duplicate_macs.sh
shippable.yml updated shippable.yml 4 years ago
shippable_account_id.sh updated shippable_account_id.sh 5 years ago
shippable_api.sh updated shippable_api.sh 5 years ago
shippable_builds.sh updated shippable_builds.sh 5 years ago
shippable_project_builds.sh updated shippable_project_builds.sh 5 years ago
shippable_projects.sh updated shippable_projects.sh 5 years ago
split.sh updated split.sh 5 years ago
spotify_add_to_playlist.sh updated spotify_add_to_playlist.sh 4 years ago
spotify_api.sh updated spotify_api.sh 4 years ago
spotify_api_token.sh updated spotify_api_token.sh 4 years ago
spotify_backup.sh updated spotify_backup.sh 4 years ago
spotify_backup_playlist.sh updated spotify_backup_playlist.sh 4 years ago
spotify_backup_playlists.sh updated spotify_backup_playlists.sh 4 years ago
spotify_create_playlist.sh updated spotify_create_playlist.sh 4 years ago
spotify_delete_any_duplicates_in_playlist.sh updated spotify_delete_any_duplicates_in_playlist.sh 4 years ago
spotify_delete_duplicate_tracks_in_playlists.sh updated spotify_delete_duplicate_tracks_in_playlists.sh 4 years ago
spotify_delete_duplicates_in_playlist.sh updated spotify_delete_duplicates_in_playlist.sh 4 years ago
spotify_delete_from_playlist.sh updated spotify_delete_from_playlist.sh 4 years ago
spotify_duplicate_tracks_in_playlist.sh added spotify_duplicate_tracks_in_playlist.sh 4 years ago
spotify_duplicate_uri_in_playlist.sh updated spotify_duplicate_uri_in_playlist.sh 4 years ago
spotify_filename_to_playlist.sh updated spotify_filename_to_playlist.sh 4 years ago
spotify_foreach_playlist.sh updated spotify_foreach_playlist.sh 4 years ago
spotify_liked_tracks.sh updated spotify_liked_tracks.sh 4 years ago
spotify_liked_tracks_uri.sh updated spotify_liked_tracks_uri.sh 4 years ago
spotify_playlist_id_to_name.sh updated spotify_playlist_id_to_name.sh 4 years ago
spotify_playlist_json.sh updated spotify_playlist_json.sh 4 years ago
spotify_playlist_name_to_id.sh updated spotify_playlist_name_to_id.sh 4 years ago
spotify_playlist_to_filename.sh updated spotify_playlist_to_filename.sh 4 years ago
spotify_playlist_tracks.sh updated spotify_playlist_tracks.sh 4 years ago
spotify_playlist_tracks_uri.sh updated spotify_playlist_tracks_uri.sh 4 years ago
spotify_playlists.sh updated spotify_playlists.sh 4 years ago
spotify_playlists_json.sh updated spotify_playlists_json.sh 4 years ago
spotify_rename_playlist.sh updated spotify_rename_playlist.sh 4 years ago
spotify_search.sh updated spotify_search.sh 4 years ago
spotify_search_json.sh updated spotify_search_json.sh 4 years ago
spotify_search_uri.sh updated spotify_search_uri.sh 4 years ago
spotify_set_playlists_private.sh updated spotify_set_playlists_private.sh 4 years ago
spotify_set_playlists_public.sh updated spotify_set_playlists_public.sh 4 years ago
spotify_set_tracks_uri_to_liked.sh updated spotify_set_tracks_uri_to_liked.sh 4 years ago
spotify_top_artists.sh updated spotify_top_artists.sh 4 years ago
spotify_top_artists_uri.sh updated spotify_top_artists_uri.sh 4 years ago
spotify_top_tracks.sh updated spotify_top_tracks.sh 4 years ago
spotify_top_tracks_uri.sh updated spotify_top_tracks_uri.sh 4 years ago
spotify_uri_to_name.sh updated spotify_uri_to_name.sh 4 years ago
sqlite.sh added sqlite.sh 4 years ago
ssl_get_cert.sh updated ssl_get_cert.sh 5 years ago
ssl_verify_cert.sh updated ssl_verify_cert.sh 5 years ago
sync_bootstraps_to_adjacent_repos.sh added sync_bootstraps_to_adjacent_repos.sh 4 years ago
sync_ci_to_adjacent_repos.sh updated sync_ci_to_adjacent_repos.sh 4 years ago
teamcity_agents.sh updated teamcity_agents.sh 4 years ago
teamcity_api.sh updated teamcity_api.sh 4 years ago
teamcity_builds.sh added teamcity_builds.sh 4 years ago
travis_api.sh updated travis_api.sh 4 years ago
update_gitignore.io.sh updated update_gitignore.io.sh 5 years ago
urldecode.sh updated urldecode.sh 5 years ago
urlencode.sh updated urlencode.sh 5 years ago
vagrant_hosts.sh updated vagrant_hosts.sh 4 years ago
vagrant_total_mb.sh updated vagrant_total_mb.sh 4 years ago
vault_pass.sh
wercker.yml updated wercker.yml 4 years ago
wercker_api_app.sh updated wercker_api_app.sh 5 years ago
wercker_api_runs.sh added wercker_api_runs.sh 5 years ago
wercker_api_workflows.sh added wercker_api_workflows.sh 5 years ago
wercker_app_id.sh added wercker_app_id.sh 5 years ago
yaml2json.sh updated yaml2json.sh 4 years ago
yum_install_packages.sh updated yum_install_packages.sh 4 years ago
yum_install_packages_if_absent.sh updated yum_install_packages_if_absent.sh 4 years ago
yum_remove_packages.sh
zookeeper_client.sh updated zookeeper_client.sh 5 years ago
zookeeper_shell.sh updated zookeeper_shell.sh 5 years ago

README.md

Hari Sekhon - DevOps Bash Tools

Codacy Badge CodeFactor Quality Gate Status Maintainability Rating Reliability Rating Security Rating Code Inspector Grade Code Inspector Score GitHub stars GitHub forks GitHub Last Commit Lines of Code

Linux Mac Docker DockerHub Pulls StarTrack

Mac Homebrew Alpine CentOS Debian Fedora Redhat Ubuntu

CI Builds Overview Jenkins Concourse GoCD

Travis CI AppVeyor Drone CircleCI Codeship Status for HariSekhon/DevOps-Bash-tools Shippable Codefresh BuildKite Buddy Cirrus CI Semaphore Wercker Reviewed by Hound

Azure DevOps Pipeline BitBucket Pipeline GitLab Pipeline Repo on GitHub Repo on GitLab Repo on BitBucket

CI Mac CI Mac 10.15 CI Ubuntu CI Ubuntu 14.04 CI Ubuntu 16.04 CI Ubuntu 18.04 CI Ubuntu 20.04 CI Ubuntu GitHub CI Debian CI Debian 8 CI Debian 9 CI Debian 10 CI CentOS CI CentOS 6 CI CentOS 7 CI CentOS 8 CI Fedora CI Alpine CI Alpine 3 CI Python 2.7 CI Python 3.5 CI Python 3.6 CI Python 3.7 CI Python 3.8 CI PyPy 2 CI PyPy 3

git.io/bash-tools

450+ DevOps Shell Scripts and Advanced Bash environment.

Fast, Advanced Systems Engineering, Automation, APIs, shorter CLIs, etc.

Heavily used in many GitHub repos, dozens of DockerHub builds (Dockerfiles) and 400+ CI builds.

Summary:

  • Scripts for many popular DevOps technologies, see Inventory below for more details
  • Advanced configs for common tools like Git, vim, screen, tmux, PostgreSQL psql etc...
  • CI configs for most major Continuous Integration products (see CI builds page)
  • CI scripts for a drop-in framework of standard checks to run in all CI builds, CI detection, accounting for installation differences across CI environments, root vs user, virtualenvs etc.
  • API scripts auto-handling authentication, tokens and other details to quickly query popular APIs with a few keystrokes just supplying the /path/endpoint
  • Advanced Bash environment - .bashrc + .bash.d/*.sh - aliases, functions, colouring, dynamic Git & shell behaviour enhancements, automatic pathing for installations and major languages like Python, Perl, Ruby, NodeJS, Golang across Linux distributions and Mac. See .bash.d/README.md
  • Installs the best systems packages - AWS CLI, Azure CLI, GCloud SDK, Terraform, Kubernetes kubectl & kustomize, jx, jq etc... extensive package lists for servers and desktops for all major Linux distributions package managers and Mac
  • Utility Libraries used by many hundreds of scripts and builds across repos:
    • .bash.d/ - interactive library
    • lib/ - scripting and CI library
  • SQL Scripts - 80+ scripts for PostgreSQL, MySQL, AWS Athena + CloudTrail, Google BigQuery

See Also: similar DevOps repos in other languages

Hari Sekhon

Cloud & Big Data Contractor, United Kingdom

(ex-Cloudera, former Hortonworks Consultant)

My LinkedIn

(you're welcome to connect with me on LinkedIn)

Quick Setup

To bootstrap, install packages and link in to your shell profile to inherit all configs, do:

curl -L git.io/bash-bootstrap | sh
  • Adds sourcing to .bashrc/.bash_profile to automatically inherit all .bash.d/*.sh environment enhancements for all technologies (see Inventory Overview below)
  • Symlinks .* config dotfiles to $HOME for git, vim, top, htop, screen, tmux, editorconfig, Ansible, PostgreSQL .psqlrc etc. (only when they don't already exist so there is no conflict with your own configs)
  • 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

To only install package dependencies to run scripts, simply cd to the git clone directory and run make:

git clone https://github.com/HariSekhon/DevOps-Bash-tools bash-tools
cd bash-tools
make

make install sets your shell profile to source this repo. See Individual Setup Parts below for more install/uninstall options.

Inventory

  • .* - 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!
    • .screenrc - fancy screen configuration including advanced colour bar, large history, hotkey reloading, auto-blanking etc.
    • .tmux.conf - fancy tmux configuration include advanced colour bar and plugins, settings, hotkey reloading etc.
    • Git:
      • .gitconfig - advanced Git configuration
      • .gitignore - extensive Git ignore of trivial files you shouldn't commit
      • enhanced Git diffs
      • protections against committing AWS secret keys or merge conflict unresolved files
  • .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
    • GCP
    • 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 etc), 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 AWS CLI, Azure CLI, GCloud SDK, Terraform, Ansible, MiniKube, MiniShift (Kubernetes / Redhat OpenShift/OKD dev VMs), Maven, Gradle, SBT, EPEL, RPMforge, Homebrew, Travis CI, Circle CI, AppVeyor, BuildKite, Parquet Tools etc.

  • sql/*.sql - useful SQL scripts for AWS Athena CloudTrail logs integration setup, Google BigQuery billing queries, MySQL and lots of PostgreSQL

  • aws_*.sh - AWS scripts:

    • aws_account_summary.sh - prints AWS account summary in key = value pairs for easy viewing / grepping of things like AccountMFAEnabled, AccountAccessKeysPresent, useful for checking whether the root account has MFA enabled and no access keys, comparing number of users vs number of MFA devices etc. (see also check_aws_root_account.py in Advanced Nagios Plugins)
    • aws_cloudtrails_cloudwatch.sh - lists Cloud Trails and their last delivery to CloudWatch Logs (should be recent)
    • aws_cloudtrails_event_selectors.sh - lists Cloud Trails and their event selectors to check each one has at least one event selector
    • aws_cloudtrails_s3_accesslogging.sh - lists Cloud Trails buckets and their Access Logging prefix and target bucket. Checks S3 access logging is enabled
    • aws_cloudtrails_s3_kms.sh - lists Cloud Trails and whether their S3 buckets are KMS secured
    • aws_cloudtrails_status.sh - lists Cloud Trails status - if logging, multi-region and log file validation enabled
    • aws_config_all_types.sh - lists AWS Config recorders, checking all resource types are supported (should be true) and includes global resources (should be true)
    • aws_config_recording.sh - lists AWS Config recorders, their recording status (should be true) and their last status (should be success)
    • aws_ecr_tag_image.sh - tags an AWS ECR image with another tag without pulling and pushing it
    • aws_harden_password_policy.sh - strengthens AWS password policy according to CIS Foundations Benchmark recommendations
    • aws_iam_generate_credentials_report_wait.sh - generates an AWS IAM credentials report
    • aws_kms_key_rotation_enabled.sh - lists AWS KMS keys and whether they have key rotation enabled
    • aws_meta.sh - AWS EC2 Metadata API query shortcut. See also the official ec2-metadata shell script with more features
    • aws_password_policy.sh - prints AWS password policy in key = value pairs for easy viewing / grepping (used by aws_harden_password_policy.sh before and after to show the differences)
    • aws_policies_attached_to_users.sh - finds AWS IAM policies directly attached to users (anti-best practice) instead of groups
    • aws_policies_granting_full_access.sh - finds AWS IAM policies granting full access (anti-best practice)
    • aws_policies_unattached.sh - lists unattached AWS IAM policies
    • aws_s3_access_logging.sh - lists AWS S3 buckets and their access logging status
    • aws_spot_when_terminated.sh - executes commands when the AWS EC2 instance running this script is notified of Spot Termination, acts as a latch mechanism that can be set any time after boot
    • aws_ssm_put_param.sh - reads a value from a command line argument or non-echo prompt and saves it to AWS Systems Manager Parameter Store. Useful for uploading a password without exposing it on your screen
    • aws_users.sh - list your AWS IAM users
    • aws_users_access_key_age.sh - prints AWS users access key status and age (see also aws_users_access_key_age.py in DevOps Python tools which can filter by age and status)
    • aws_users_access_key_age_report.sh - prints AWS users access key status and age using a bulk credentials report (faster for many users)
    • aws_users_access_key_last_used.sh - prints AWS users access keys last used date
    • aws_users_access_key_last_used_report.sh - same as above using bulk credentials report (faster for many users)
    • aws_users_last_used_report.sh - lists AWS users password/access keys last used dates
    • aws_users_mfa_active_report.sh - lists AWS users password enabled and MFA enabled status
    • aws_users_mfa_serials.sh - lists AWS users MFA serial numbers (differentiates Virtual vs Hardware MFAs)
    • aws_users_pw_last_used.sh - lists AWS users and their password last used date
  • Google Cloud scripts - gcp_*.sh / gce_*.sh / gke_*.sh / gcr_*.sh / bigquery_*.sh:

    • gcp_info.sh - huge Google Cloud inventory of deployed resources within the current project - Cloud SDK info plus all of the following (detects which services are enabled to query):
      • gcp_info_compute.sh - GCE Virtual Machine instances, App Engine instances, Cloud Functions, GKE clusters, all Kubernetes objects across all GKE clusters (see kubernetes_info.sh below for more details)
      • gcp_info_storage.sh - Cloud SQL instances, Cloud Storage Buckets, Cloud Filestore, Cloud Memorystore Redis, BigTable clusters and instances, Datastore indexes
      • gcp_info_networking.sh - VPC Networks, Addresses, Proxies, Subnets, Routers, Routes, VPN Gateways, VPN Tunnels, Reservations, Firewall rules, Forwarding rules, Cloud DNS managed zones and verified domains
      • gcp_info_bigdata.sh - Dataproc clusters and jobs in all regions, Dataflow jobs in all regions, PubSub messaging topics, Cloud IOT registries in all regions
      • gcp_info_tools.sh - Cloud Source Repositories, Cloud Builds, Container Registry images across all major repos (gcr.io, us.gcr.io, eu.gcr.io, asia.gcr.io), Deployment Manager deployments
      • gcp_info_auth_config.sh - Auth Configurations, Organizations & Current Config
      • gcp_info_projects.sh - Projects names and IDs
      • gcp_info_services.sh - Services & APIs enabled
        • gcp_service_apis.sh - lists all available GCP Services, APIs and their states (ENABLED/DISABLED), and provides is_service_enabled() function use throughout the adjacent scripts to avoid errors and only show relevant services
      • gcp_info_accounts_secrets.sh - IAM Service Accounts, Secrets Manager secrets
    • gcp_info_all_projects.sh - same as above but for all detected projects
    • gcp_foreach_project.sh - executes a templated command across all GCP projects, switching core/project and replacing {project_id} and {project_name} in each iteration - powerful, use with care! (used by gcp_info_all_projects.sh to call gcp_info.sh)
    • gcp_find_orphaned_disks.sh - lists orphaned disks across all GCP projects (not attached to any compute instance)
    • gcp_secrets_*.sh - Google Secret Manager scripts:
      • gcp_secrets_to_kubernetes.sh - loads GCP secrets to Kubernetes secrets in a 1-to-1 mapping. Can specify a list of secrets or auto-loads all GCP secrets with labels kubernetes-cluster and kubernetes-namespace matching the current kubectl context (kcd to the right namespace first, see .bash.d/kubernetes). See also kubernetes_get_secret_values.sh` to debug the actual values that got loaded
      • gcp_secrets_to_kubernetes_multipart.sh - creates a Kubernetes secret from multiple GCP secrets (used to put private.pem and public.pem into the same secret to appear as files on volume mounts for apps in pods to use)
    • gcr_*.sh - Google Container Registry scripts:
      • gcr_tag_latest.sh - tags a given GCR docker image:tag as latest without pulling or pushing the docker image
      • gcr_tag_datetime.sh - tags a given GCR docker image with its creation date and UTC timestamp (when it was uploaded or created by Google Cloud Build) without pulling or pushing the docker image
      • gcr_newest_image_tags.sh - lists the tags for the given GCR docker image with the newest creation date (can use this to determine which image version to tag as latest)
      • gcr_tag_newest_image_as_latest.sh - finds and tags the newest build of a given GCR docker image as latest without pulling or pushing the docker image
      • gcr_alternate_tags.sh - lists all the tags for a given GCR docker image:tag (use arg <image>:latest to see what version / build hashref / date tag has been tagged as latest)
      • gcr_list_tags.sh - lists all the tags for a given GCR docker image
      • gcr_tags_timestamps.sh - lists all the tags and their timestamps for a given GCR docker image
      • see also cloudbuild.yml in the Templates repo
    • gce_*.sh - Google Compute Engine scripts:
      • gce_meta.sh - simple script to query the GCE metadata API from within Virtual Machines
      • gce_when_preempted.sh - GCE VM preemption latch script - can be executed any time to set one or more commands to execute upon preemption
      • gce_is_preempted.sh - GCE VM return true/false if preempted, callable from other scripts
    • bigquery_*.sh - BigQuery scripts:
      • bigquery_list_datasets.sh - lists BigQuery datasets in the current GCP project
      • bigquery_list_tables.sh - lists BigQuery tables in a given dataset
      • bigquery_list_tables_all_datasets.sh - lists tables for all datasets in the current GCP project
      • bigquery_foreach_dataset.sh - executes a templated command for each dataset
      • bigquery_foreach_table.sh - executes a templated command for each table in a given dataset
      • bigquery_foreach_table_all_datasets.sh - executes a templated command for each table in each dataset in the current GCP project
      • bigquery_table_row_count.sh - gets the row count for a given table
      • bigquery_tables_row_counts.sh - gets the row counts for all tables in a given dataset
      • bigquery_tables_row_counts_all_datasets.sh - gets the row counts for all tables in all datasets in the current GCP project
      • bigquery_generate_query_biggest_tables_across_datasets_by_row_count.sh - generates a BigQuery SQL query to find the top 10 biggest tables by row count
      • bigquery_generate_query_biggest_tables_across_datasets_by_size.sh - generates a BigQuery SQL query to find the top 10 biggest tables by size
      • see also the SQL Scripts repo for many more straight BigQuery SQL scripts
    • gke_kube_creds.sh - auto-loads all Google Kubernetes Engine credentials and contexts for all clusters in the current project so your kubectl is ready to rock on GCP
  • curl_auth.sh - wraps curl to securely load your OAuth2 / JWT API token or username & password from environment variables or interactive starred password prompt through a ram file descriptor to avoid placing them on the command line (which would expose your credentials in the process list or OS audit log files). Used by many other adjacent API querying scripts

  • kubernetes_*.sh - Kubernetes scripts:

    • kubernetes_info.sh - huge Kubernetes inventory listing of deployed resources across all namespaces in the current cluster / kube context:
      • cluster-info
      • master component statuses
      • nodes
      • namespaces
      • deployments, replicasets, replication controllers, statefulsets, daemonsets, horizontal pod autoscalers
      • storage classes, persistent volumes, persistent volume claims
      • service accounts, resource quotas, network policies, pod security policies
      • container images running
      • container images running counts descending
      • pods (might be too much detail if you have high replica counts, so done last, comment if you're sure nobody has deployed pods outside deployments)
    • kubernetes_foreach_context.sh - executes a command across all kubectl contexts, replacing {context} in each iteration (skips lab contexts docker / minikube / minishift to avoid hangs since they're often offline)
    • kubernetes_foreach_namespace.sh - executes a command across all kubernetes namespaces in the current cluster context, replacing {namespace} in each iteration
      • Can be chained with kubernetes_foreach_context.sh and useful when combined with gcp_secrets_to_kubernetes.sh to load all secrets from GCP to Kubernetes for the current cluster, or combined with gke_kube_creds.sh and kubernetes_foreach_context.sh for all clusters! Powerful stuff, use with care.
    • kubeadm_join_cmd.sh - outputs kubeadm join command (generates new token) to join an existing Kubernetes cluster (used in vagrant kubernetes provisioning scripts)
    • kubeadm_join_cmd2.sh - outputs kubeadm join command manually (calculates cert hash + generates new token) to join an existing Kubernetes cluster
    • kubectl_exec.sh - finds and execs to the first Kubernetes pod matching given pod filters, can optionally specify the container to exec to, showing the full generated kubectl exec command line for clarity
    • kubectl_exec_grep.sh - finds and execs to the first Kubernetes pod matching the given name regex, can optionally specify the container name regex to exec to, showing the full generated kubectl exec command line for clarity
    • kubernetes_api.sh - finds Kubernetes API and runs your curl arguments against it, auto-getting authorization token and auto-populating OAuth authentication header
    • kubernetes_etcd_backup.sh - creates a timestamped backup of the Kubernetes Etcd database for a kubeadm cluster
    • kubernetes_pods_per_nodes.sh - lists number of pods per node sorted descending
    • kubernetes_find_stuck_jobs.sh - finds Kubernetes jobs stuck for hours or days with no completions
    • kubernetes_delete_stuck_jobs.sh - prompts for confirmation to delete stuck Kubernetes jobs found by script above
    • kubernetes_running_images.sh - lists Kubernetes container images running on the current cluster
    • kubernetes_running_image_counts.sh - lists Kubernetes container images running counts sorted descending
    • kubernetes_get_secret_values.sh - prints the keys and base64 decoded values within a given Kubernetes secret for quick debugging of Kubernetes secrets. See also: gcp_secrets_to_kubernetes.sh
    • see also the Kubernetes templates repo
  • docker_*.sh / dockerhub_*.sh - Docker / DockerHub API scripts:

    • dockerhub_api.sh - queries DockerHub API v2 with or without authentication ($DOCKERHUB_USER & $DOCKERHUB_PASSWORD / $DOCKERHUB_TOKEN)
    • docker_api.sh - queries a Docker Registry with optional basic authentication if $DOCKER_USER & $DOCKER_PASSWORD are set
    • docker_registry_list_images.sh - lists images in a given private Docker Registry
    • docker_registry_list_tags.sh - lists tags for a given image in a private Docker Registry
    • docker_registry_get_manifest.sh - gets a given image:tag manifest from a private Docker Registry
    • docker_registry_tag_image.sh - tags a given image with a new tag in a private Docker Registry via the API without pulling and pushing the image data (must faster and more efficient)
    • dockerhub_show_tags.sh - lists tags for a given DockerHub repo. See also dockerhub_show_tags.py in the DevOps Python tools repo.
    • dockerhub_show_tags_by_last_updated.sh - lists tags for a given DockerHub repo sorted by last updated timestamp descending
    • dockerhub_search.sh - searches with a configurable number of returned items (older docker cli was limited to 25 results)
    • see also the Dockerfiles repo
  • quay.io_api.sh - queries the Quay.io API with OAuth2 authentication token $QUAY_TOKEN

  • travis_api.sh - queries the Travis CI API with $TRAVIS_TOKEN (one of my all-time favourite CI systems)

  • ldapsearch.sh - wraps ldapsearch inferring settings from environment, can use environment variables for overrides

  • ldap_user_recurse.sh / ldap_group_recurse.sh - recurse Active Directory LDAP users upwards to find all parent groups, or groups downwards to find all nested users (useful for debugging LDAP integration and group-based permissions)

  • kafka_*.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.

  • zookeeper*.sh - Apache ZooKeeper scripts:

    • zookeeper_client.sh - wraps zookeeper-client, auto-populating the zookeeper quorum from the environment variable $ZOOKEEPERS or else parsing the zookeeper quorum from /etc/**/*-site.xml to make it faster and easier to connect
    • zookeeper_shell.sh - wraps Kafka's zookeeper-shell, auto-populating the zookeeper quorum from the environment variable $KAFKA_ZOOKEEPERS and optionally $KAFKA_ZOOKEEPER_ROOT to make it faster and easier to connect
  • hive_*.sh / beeline*.sh - Apache Hive scripts:

    • beeline.sh - connects to HiveServer2 via beeline, auto-populating Kerberos and SSL settings, zookeepers for HiveServer2 HA discovery if the environment variable $HIVE_HA is set or using the $HIVESERVER_HOST environment variable so you can connect with no arguments (prompts for HiveServer2 address if you haven't set $HIVESERVER_HOST or $HIVE_HA)
      • beeline_zk.sh - connects to HiveServer2 HA via beeline, auto-populating SSL and ZooKeeper service discovery settings (specify $HIVE_ZOOKEEPERS environment variable to override). Automatically called by beeline.sh if either $HIVE_ZOOKEEPERS or $HIVE_HA is set (the latter parses hive-site.xml for the ZooKeeper addresses)
    • hive_foreach_table.sh - executes a SQL query against every table, replacing {db} and {table} in each iteration eg. select count(*) from {table}
    • hive_*.sh - various scripts using beeline.sh to list databases, tables, for all tables: row counts, DDL metadata field extraction, table locations etc.
  • impala*.sh - Apache Impala scripts:

    • impala_shell.sh - connects to Impala via impala-shell, parsing the Hadoop topology map and selecting a random datanode to connect to its Impalad. This is mostly for convenience to shorten commands and while it acts as a poor man's load balancer, you might want to instead use my real load balancer HAProxy config for Impala (and many other Big Data & NoSQL technologies). Optional environment variables $IMPALA_HOST (eg. point to HAProxy load balancer) and IMPALA_SSL=1 (or use regular impala-shell --ssl argument pass through)
    • impala_foreach_table.sh - executes a SQL query against every table, replacing {db} and {table} in each iteration eg. select count(*) from {table}
    • impala_*.sh - various scripts using impala_shell.sh to list databases, tables, for all tables: row counts, DDL metadata field extraction, table locations etc.
  • mysql*.sh - MySQL scripts:

    • mysql.sh - connects to MySQL via mysql, auto-populating settings from both standard environment variables like $MYSQL_TCP_PORT, $DBI_USER, $MYSQL_PWD (see doc) and other common environment variables like $MYSQL_HOST / $HOST, $MYSQL_USER / $USER, $MYSQL_PASSWORD / $PASSWORD, $MYSQL_DATABASE / $DATABASE
    • mysql_foreach_table.sh - executes a SQL query against every table, replacing {db} and {table} in each iteration eg. select count(*) from {table}
    • mysql_*.sh - various scripts using mysql.sh for row counts, iterating each table, or outputting clean lists of databases and tables for quick scripting
    • mysqld.sh - one-touch MySQL, boots docker container + drops in to mysql shell, with /sql scripts mounted in container for easy sourcing eg. source /sql/<name>.sql. Optionally loads sample 'chinook' database
    • see also the SQL Scripts repo for many more straight MySQL SQL scripts
  • mariadb.sh - one-touch MariaDB, boots docker container + drops in to mysql shell, with /sql scripts mounted in container for easy sourcing eg. source /sql/<name>.sql. Optionally loads sample 'chinook' database

  • sqlite.sh - one-touch SQLite, starts sqlite3 shell with sample 'chinook' database loaded

  • postgres*.sh / psql.sh - PostgreSQL scripts:

    • postgres.sh - one-touch PostgreSQL, boots docker container + drops in to psql shell, with /sql scripts mounted in container for easy sourcing eg. \i /sql/<name>.sql. Optionally loads sample 'chinook' database
    • psql.sh - connects to PostreSQL via psql, auto-populating settings from environment variables, using both standard postgres supported environment variables like $PG* (see doc) as well as other common environment variables like $POSTGRESQL_HOST / $POSTGRES_HOST / $HOST, $POSTGRESQL_USER / $POSTGRES_USER / $USER, $POSTGRESQL_PASSWORD / $POSTGRES_PASSWORD / $PASSWORD, $POSTGRESQL_DATABASE / $POSTGRES_DATABASE / $DATABASE
    • postgres_foreach_table.sh - executes a SQL query against every table, replacing {db}, {schema} and {table} in each iteration eg. select count(*) from {table}
    • postgres_*.sh - various scripts using psql.sh for row counts, iterating each table, or outputting clean lists of databases, schemas and tables for quick scripting
    • see also the SQL Scripts repo for many more straight PostgreSQL SQL scripts
  • find_duplicate_files_by_size.sh / find_duplicate_files_by_checksum.sh - finds duplicate files by size and/or checksum in given directory trees. Checksums are only done on files that already have matching byte counts for efficiency

  • hdfs_*.sh - Hadoop HDFS scripts:

    • hdfs_checksum*.sh - walks an HDFS directory tree and outputs HDFS native checksums, MD5-of-MD5 or the portable externally comparable CRC32, in serial or in parallel to save time
    • hdfs_find_replication_factor_1.sh / hdfs_set_replication_factor_3.sh - finds HDFS files with replication factor 1 / sets HDFS files with replication factor <=2 to replication factor 3 to repair replication safety and avoid no replica alarms during maintenance operations (see also Python API version in the DevOps Python Tools repo)
    • hdfs_file_size.sh / hdfs_file_size_including_replicas.sh - quickly differentiate HDFS files raw size vs total replicated size
  • cloudera_*.sh - Cloudera scripts:

    • cloudera_manager_api.sh - script to simplify querying Cloudera Manager API using environment variables, prompts, authentication and sensible defaults. Built on top of curl_auth.sh
    • cloudera_manager_impala_queries*.sh - queries Cloudera Manager for recent Impala queries, failed queries, exceptions, DDL statements, metadata stale errors, metadata refresh calls etc. Built on top of cloudera_manager_api.sh
    • cloudera_manager_yarn_apps.sh - queries Cloudera Manager for recent Yarn apps. Built on top of cloudera_manager_api.sh
    • cloudera_navigator_api.sh - script to simplify querying Cloudera Navigator API using environment variables, prompts, authentication and sensible defaults. Built on top of curl_auth.sh
    • cloudera_navigator_audit_logs.sh - fetches Cloudera Navigator audit logs for given service eg. hive/impala/hdfs via the API, simplifying date handling, authentication and common settings. Built on top of cloudera_navigator_api.sh
    • cloudera_navigator_audit_logs_download.sh - downloads Cloudera Navigator audit logs for each service by year. Skips existing logs, deletes partially downloaded logs on failure, generally retry safe (while true, Control-C, not kill -9 obviously). Built on top of cloudera_navigator_audit_logs.sh
  • git*.sh - Git scripts:

    • git_foreach_branch.sh - executes a command on all branches (useful in heavily version branched repos like in my Dockerfiles repo)
    • git_foreach_repo.sh - executes a command against all adjacent repos from a given repolist (used heavily by many adjacent scripts)
    • git_foreach_modified.sh - executes a command against each file with git modified status
    • git_merge_all.sh / git_merge_master.sh / git_merge_master_pull.sh - merges updates from master branch to all other branches to avoid drift on longer lived feature branches / version branches (eg. Dockerfiles repo)
    • git_remotes_add_public_repos.sh - auto-creates remotes for the 3 major public repositories (GitHub/GitLab/Bitbucket)
    • git_remotes_set_multi_origin.sh - sets up multi-remote origin for unified push to automatically keep the 3 major public repositories in sync (especially useful for Bitbucket which doesn't have the GitLab auto-sync from GitHub feature)
    • git_repos_pull.sh - pull multiple repos based on a source file mapping list - useful for easily sync'ing lots of Git repos among computers
    • git_repos_update.sh - same as above but also runs the make update build to install the latest dependencies, leverages the above script
    • git_log_empty_commits.sh - find empty commits in git history (eg. if a git filter-branch was run but --prune-empty was forgotten, leaking metadata like subjects containing file names or other sensitive info)
    • git_submodules_update_repos.sh - updates submodules (pulls and commits latest upstream github repo submodules) - used to cascade submodule updates throughout on all my repos
  • github_*.sh - GitHub API scripts:

    • github_api.sh - queryies the GitHub API. Can infer GitHub user, repo and authentication token from local checkout or environment ($GITHUB_USER, $GITHUB_TOKEN)
    • github_get_user_ssh_public_key.sh - fetches a GitHub user's public SSH keys via the API for quick local installation to ~/.ssh/authorized_keys
    • github_foreach_repo.sh - executes a templated command for each non-fork GitHub repo, replacing the {user} and {repo} in each iteration
    • github_generate_status_page.sh - generates a STATUS.md page by merging all the README.md headers for all of a user's non-forked GitHub repos or a given list of any repos etc.
    • github_actions_runner.sh - downloads, configures and runs a local GitHub Actions Runner
    • github_runners.sh - lists GitHub Actions runners
    • github_workflows.sh - lists GitHub Actions workflows for a given repo (or auto-infers local repository)
    • github_workflow_runs.sh - lists GitHub Actions workflow runs for a given workflow id or name
    • github_workflows_status.sh - lists all GitHub Actions workflows and their statuses for a given repo
    • github_sync_repo_descriptions.sh - syncs GitHub repo descriptions to GitLab & BitBucket repos (uses git_foreach_repo.sh, github_repo_description.sh, gitlab_set_project_description.sh, bitbucket_set_repo_description.sh)
    • github_repos_sync_status.sh - determines whether each GitHub repo has an in-sync GitLab and BitBucket repo by querying all 3 APIs for the master branch hashrefs
  • gitlab_*.sh - GitLab API scripts:

    • gitlab_api.sh - queries the GitLab API. Can infer GitLab user, repo and authentication token from local checkout or environment ($GITLAB_USER, $GITLAB_TOKEN)
    • gitlab_get_user_ssh_public_key.sh - fetches a GitLab user's public SSH keys via the API for quick local installation to ~/.ssh/authorized_keys
    • gitlab_foreach_repo.sh - executes a templated command for each GitLab project/repo, replacing the {user} and {project} in each iteration
    • gitlab_project_mirrors.sh - lists each GitLab repo and whether it is a mirror or not
    • gitlab_pull_mirror.sh - trigger a GitLab pull mirroring for a given project's repo, or auto-infers project name from the local git repo
    • gitlab_set_project_description.sh - sets the description for one or more projects using the GitLab API
    • gitlab_validate_ci_yaml.sh - validates a .gitlab-ci.yml file via the GitLab API
  • bitbucket_*.sh - BitBucket API scripts:

    • bitbucket_api.sh - queries the BitBucket API. Can infer BitBucket user, repo and authentication token from local checkout or environment ($BITBUCKET_USER, $BITBUCKET_TOKEN)
    • bitbucket_foreach_repo.sh - executes a templated command for each BitBucket repo, replacing the {user} and {repo} in each iteration
    • bitbucket_set_project_description.sh - sets the description for one or more repos using the BitBucket API
  • atlassian_cidr_ranges.sh - lists Atlassian's IPv4 and/or IPv6 cidr ranges via its API

  • cloudflare_*.sh - Cloudflare API queries and reports:

    • cloudflare_api.sh - queries the Cloudflare API, handling authentication from $CLOUDFLARE_TOKEN
    • cloudflare_cidr_ranges.sh - lists Cloudflare's IPv4 and/or IPv6 cidr ranges via its API
    • cloudflare_custom_certificates.sh - lists any custom SSL certificates in a given Cloudflare zone along with their status and expiry date
    • cloudflare_dns_records.sh - lists any Cloudflare DNS records for a zone, including the type and ttl
    • cloudflare_dns_records_all_zones.sh - same as above but for all zones
    • cloudflare_dnssec.sh - lists the Cloudflare DNSSec status for all zones
    • cloudflare_foreach_account.sh - executes a templated command for each Cloudflare account, replacing the {account_id} and {account_name} in each iteration (useful for chaining with cloudflare_api.sh)
    • cloudflare_foreach_zone.sh - executes a templated command for each Cloudflare zone, replacing the {zone_id} and {zone_name} in each iteration (useful for chaining with cloudflare_api.sh, used by adjacent cloudflare_*_all_zones.sh scripts)
    • cloudflare_ssl_verified.sh - gets the Cloudflare zone SSL verification status for a given zone
    • cloudflare_ssl_verified_all_zones.sh - same as above for all zones
  • pingdom_*.sh - Pingdom API queries and reports for status, latency, average response times, latency averages by hour, SMS credits, outages periods and durations over the last year etc.

    • pingdom_api.sh - Solarwinds Pingdom API query script
    • pingdom_foreach_check.sh - executes a templated command against each Pingdom check, replacing the {check_id} and {check_name} in each iteration
    • pingdom_checks.sh - show all Pingdom checks, status and latencies
    • pingdom_checks_outages.sh / pingdom_checks_outages.sh - show one or all Pingdom checks outage histories for the last year
    • pingdom_checks_average_response_times.sh - shows the average response times for all Pingdom checks for the last week
    • pingdom_check_latency_by_hour.sh / pingdom_checks_latency_by_hour.sh - shows the average latency for one or all Pingdom checks broken down by hour of the day, over the last week
    • pingdom_sms_credits.sh - gets the remaining number of Pingdom SMS credits
  • buildkite_*.sh - BuildKite API scripts:

    • buildkite_pipelines.sh - list buildkite pipelines for your $BUILDKITE_ORGANIZATION / $BUILDKITE_USER
    • buildkite_foreach_pipeline.sh - executes a templated command for each Buildkite pipeline, replacing the {user} and {pipeline} in each iteration
    • buildkite_agent.sh - runs a buildkite agent locally on Linux or Mac, or in Docker with choice of Linux distros
    • buildkite_agents.sh - lists the Buildkite agents connected along with their hostname, IP, started dated and agent details
    • buildkite_pipelines.sh - lists Buildkite pipelines
    • buildkite_create_pipeline.sh - create a Buildkite pipeline from a JSON configuration (like from buildkite_get_pipeline.sh or buildkite_save_pipelines.sh)
    • buildkite_get_pipeline.sh - gets details for a specific Buildkite pipeline in JSON format
    • buildkite_cancel_scheduled_builds.sh - cancels BuildKite scheduled builds (to clear a backlog due to offline agents and just focus on new builds)
    • buildkite_rebuild_cancelled_builds.sh - triggers rebuilds of any cancelled pipelines
    • buildkite_rebuild_failed_builds.sh - triggers rebuilds of any failed pipelines (useful if you killed an agent and want to re-run them)
    • buildkite_recreate_pipeline.sh - recreates a pipeline to wipe out all stats (see url and badge caveats in --help)
    • buildkite_running_builds.sh - lists running builds and the agent they're running on
    • buildkite_save_pipelines.sh - saves all BuildKite pipelines in your $BUILDKITE_ORGANIZATION to local JSON files in $PWD/.buildkite-pipelines/
    • buildkite_trigger.sh - triggers BuildKite build job for a given pipeline
    • buildkite_trigger_all.sh - same as above but for all pipelines
  • jenkins_*.sh - Jenkins CI scripts:

    • jenkins_cli.sh - runs Jenkins CLI, auto-inferring basic configuations, auto-downloads jenkins-cli.jar from Jenkins server if not present, infers a bunch of Jenkins related variables like $JENKINS_URL and authentication from $JENKINS_USER/$JENKINS_PASSWORD, or finds admin password from inside local docker container. Used heavily by jenkins.sh one-shot setup
    • jenkins_password.sh - gets Jenkins admin password from local docker container. Used by jenkins_cli.sh
    • jenkins.sh - one-touch Jenkins CI, launches in docker, installs plugins, validates Jenkinsfile, configures jobs from $PWD/setup/jenkins-job.xml and sets Pipeline to git remote origin's Jenkinsfile, triggers build, tails results in terminal. Call from any repo top level directory with a Jenkinsfile pipeline and setup/jenkins-job.xml (all mine have it)
  • concourse.sh - one-touch Concourse CI, launches in docker, configures pipeline from $PWD/.concourse.yml, triggers build, tails results in terminal, prints recent build statuses at end. Call from any repo top level directory with a .concourse.yml config (all mine have it), mimicking structure of fully managed CI systems

  • gocd.sh - one-touch GoCD CI, launches in docker, (re)creates config repo ($PWD/setup/gocd_config_repo.json) from which to source pipeline(s) (.gocd.yml), detects and enables agent(s) to start building. Call from any repo top level directory with a .gocd.yml config (all mine have it), mimicking structure of fully managed CI systems

  • teamcity_*.sh - Teamcity CI API scripts:

    • teamcity_api.sh - queries Teamcity's API, auto-handling authentication and other quirks of the API
    • teamcity_agents.sh - lists Teamcity agents, their connected state, authorized state, whether enabled and up to date
    • teamcity_builds.sh - lists the last 100 Teamcity builds along with the their state (eg. finished) and status (eg. SUCCESS/FAILURE)
  • perl*.sh - Perl utilities:

    • perl_cpanm_install.sh - bulk installs CPAN modules from mix of arguments / file lists / stdin, accounting for User vs System installs, root vs user sudo, Perlbrew / Google Cloud Shell environments, Mac vs Linux library paths, ignore failure option, auto finds and reads build failure log for quicker debugging showing root cause error in CI builds logs etc
    • perl_cpanm_install_if_absent.sh - installs CPAN modules not already in Perl libary path (OS or CPAN installed) for faster installations only where OS packages are already providing some of the modules, reducing time and failure rates in CI builds
    • perlpath.sh - prints all Perl libary search paths, one per line
    • perl_find_library_path.sh - finds directory where a CPAN module is installed - without args finds the Perl library base
    • perl_find_library_executable.sh - finds directory where a CPAN module's CLI program is installed (system vs user, useful when it gets installed to a place that isn't in your $PATH, where which won't help)
    • perl_find_unused_cpan_modules.sh - finds CPAN modules that aren't used by any programs in the current directory tree
    • perl_find_duplicate_cpan_requirements.sh - finds duplicate CPAN modules listed for install more than once under the directory tree (useful for deduping module installs in a project and across submodules)
    • perl_generate_fatpacks.sh - creates Fatpacks - self-contained Perl programs with all CPAN modules built-in
  • python*.sh - Python utilities:

    • python_compile.sh - byte-compiles Python scripts and libraries into .pyo optimized files
    • python_pip_install.sh - bulk installs PyPI modules from mix of arguments / file lists / stdin, accounting for User vs System installs, root vs user sudo, VirtualEnvs / Anaconda / GitHub Workflows/ Google Cloud Shell, Mac vs Linux library paths, and ignore failure option
    • python_pip_install_if_absent.sh - installs PyPI modules not already in Python libary path (OS or pip installed) for faster installations only where OS packages are already providing some of the modules, reducing time and failure rates in CI builds
    • python_pip_reinstall_all_modules.sh - reinstalls all PyPI modules which can fix some issues
    • pythonpath.sh - prints all Python libary search paths, one per line
    • python_find_library_path.sh - finds directory where a PyPI module is installed - without args finds the Python library base
    • python_find_library_executable.sh - finds directory where a PyPI module's CLI program is installed (system vs user, useful when it gets installed to a place that isn't in your $PATH, where which won't help)
    • python_find_unused_pip_modules.sh - finds PyPI modules that aren't used by any programs in the current directory tree
    • python_find_duplicate_pip_requirements.sh - finds duplicate PyPI modules listed for install under the directory tree (useful for deduping module installs in a project and across submodules)
    • python_module_to_import_name.sh - converts PyPI module names to Python import names, used by python_find_unused_pip_modules.sh
    • python_pyinstaller.sh - creates PyInstaller self-contained Python programs with Python interpreter and all PyPI modules included
  • mp3_set_*.sh - various MP3 metadata management scripts for albums and audiobooks:

    • mp3_set_artist.sh / mp3_set_album.sh - sets the artist / album tag for all mp3 files under given directories. Useful for grouping artists/albums and audiobook author/books (eg. for correct importing into Mac's Books.app)
    • mp3_set_track_name.sh - sets the track name metadata for mp3 files under given directories to follow their filenames. Useful for correctly displaying audiobook progress / chapters etc.
    • mp3_set_track_order.sh - sets the track order metadata for mp3 files under given directories to follow the lexical file naming order. Useful for correctly ordering album songs and audiobook chapters (eg. for Mac's Books.app). Especially useful for enforcing global ordering on multi-CD audiobooks after grouping into a single audiobook using mp3_set_album.sh (otherwise default track numbers in each CD interleave in Mac's Books.app)
  • spotify_*.sh - 30+ Spotify API scripts (used extensively to manage my Spotify-Playlists repo):

    • spotify_playlists*.sh - list playlists in either <id> <name> or JSON format
    • spotify_playlist_tracks*.sh - download playlist contents as track URIs / Artists - Track / CSV format - useful for Spotify backups, portable backups, or exporting between music systems
    • spotify_backup.sh - backup all Spotify playlists as well as the ordered list of playlists
    • spotify_backup_playlist*.sh - backup Spotify playlists to local files in both human readable Artist - Track format and Spotify URI format for easy restores or adding to new playlists
    • spotify_search*.sh - search Spotify's library for tracks / albums / artists getting results in human readable format, JSON, or URI formats for easy loading to Spotify playlists
    • spotify_uri_to_name.sh - convert Spotify track / album / artist URIs to human readable Artist - Track / CSV format. Takes Spotify URIs, URL links or just IDs. Reads URIs from files or standard input
    • spotify_create_playlist.sh - creates a Spotify playlist, either public or private
    • spotify_rename_playlist.sh - renames a Spotify playlist
    • spotify_set_playlists_public.sh / spotify_set_playlists_private.sh - sets one or more given Spotify playlists to public / private
    • spotify_add_to_playlist.sh - adds tracks to a given playlist. Takes a playlist name or ID and Spotify URIs in any form from files or standard input. Can be combined with many other tools listed here which output Spotify URIs, or appended from other playlists. Can also be used to restore a spotify playlist from backups
    • spotify_delete_from_playlist.sh - deletes tracks from a given playlist. Takes a playlist name or ID and Spotify URIs in any form from files or standard input, optionally prefixed with a track position to remove only specific occurrences (useful for removing duplicates from playlists)
    • spotify_duplicate_uri_in_playlist.sh - finds duplicate Spotify URIs in a given playlist (these are guaranteed exact duplicate matches), returns all but the first occurrence and optionally their track positions (zero-indexed to align with the Spotify API for easy chaining with other tools)
    • spotify_duplicate_tracks_in_playlist.sh - finds duplicate Spotify tracks in a given playlist (these are idential Artist - Track name matches, which may be from different albums / singles)
    • spotify_delete_duplicates_in_playlist.sh - deletes duplicate Spotify URI tracks (identical) in a given playlist using spotify_duplicate_uri_in_playlist.sh and spotify_delete_from_playlist.sh
    • spotify_delete_duplicate_tracks_in_playlist.sh - deletes duplicate Spotify tracks (name matched) in a given playlist using spotify_duplicate_tracks_in_playlist.sh and spotify_delete_from_playlist.sh
    • spotify_delete_any_duplicates_in_playlist.sh - calls both of the above scripts to first get rid of duplicate URIs and then remove any other duplicates by track name matches
    • spotify_top_artists*.sh / spotify_top_tracks*.sh - fetch your list of top artists / tracks in either human readable or URI format (which can be auto-loaded into other playlists)
    • spotify_liked_tracks*.sh - download the Liked Songs list in either human readable or URI formats
    • spotify_set_tracks_uri_to_liked.sh - set a list of spotify URIs to "Liked" so they appear in the Liked Songs playlist. Useful for marking all the tracks in your best playlists as favourite tracks, or for porting historical Starred tracks to the newer Liked Songs
    • spotify_foreach_playlist.sh - executes a templated command against all playlists, replacing {playlist} and {playlist_id} in each iteration
    • spotify_playlist_name_to_id.sh / spotify_playlist_id_to_name.sh - convert playlist names <=> IDs
    • spotify_api_token.sh - gets a Spotify authentication token using either Client Credentials or Authorization Code authentication flows, the latter being able to read/modify private user data, automatically used by spotify_api.sh
    • spotify_api.sh - query any Spotify API endpoint with authentication, used by adjacent spotify scripts
  • json2yaml.sh - converts JSON to YAML

  • yaml2json.sh - converts YAML to JSON - needed for some APIs like GitLab CI linting (see gitlab_*.sh section above)

  • Linux / Mac 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
    • OS / Distro Package Management:
      • install_packages.sh - installs package lists from arguments, files or stdin on major linux distros and Mac, detecting the package manager and invoking the right install commands, with sudo if not root. Works on RHEL / CentOS / Fedora, Debian / Ubuntu, Alpine, and Mac Homebrew. Leverages and supports all features of the distro / OS specific install scripts listed below
      • install_packages_if_absent.sh - installs package lists if they're not already installed, saving time and minimizing install logs / CI logs, same support list as above
      • yum_install_packages.sh / yum_remove_packages.sh - installs RPM lists from arguments, files or stdin. Handles Yum + Dnf behavioural differences, calls sudo if not root, auto-attempts variations of python/python2/python3 package names. Avoids yum slowness by checking if rpm is installed before attempting to install it, accepts NO_FAIL=1 env var to ignore unavailable / changed package names (useful for optional packages or attempts for different package names across RHEL/CentOS/Fedora versions)
      • yum_install_if_absent.sh - installs RPMs only if not already installed and not a metapackage provided by other packages (eg. vim metapackage provided by vim-enhanced), saving time and minimizing install logs / CI logs, plus all the features of yum_install_packages.sh above
      • apt_install_packages.sh / apt_remove_packages.sh - installs Deb package lists from arguments, files or stdin. Auto calls sudo if not root, accepts NO_FAIL=1 env var to ignore unavailable / changed package names (useful for optional packages or attempts for different package names across Debian/Ubuntu distros/versions)
      • apt_install_if_absent.sh - installs Deb packages only if not already installed, saving time and minimizing install logs / CI logs, plus all the features of apt_install_packages.sh above
      • apk_install_packages.sh / apk_remove_packages.sh - installs Alpine apk package lists from arguments, files or stdin. Auto calls sudo if not root, accepts NO_FAIL=1 env var to ignore unavailable / changed package names (useful for optional packages or attempts for different package names across Alpine versions)
      • apk_install_if_absent.sh - installs Alpine apk packages only if not already installed, saving time and minimizing install logs / CI logs, plus all the features of apk_install_packages.sh above
      • brew_install_packages.sh / brew_remove_packages.sh - installs Mac Hombrew package lists from arguments, files or stdin. Accepts NO_FAIL=1 env var to ignore unavailable / changed package names (useful for optional packages or attempts for different package names across versions)
      • brew_install_if_absent.sh - installs Mac Homebrew packages only if not already installed, saving time and minimizing install logs / CI logs, plus all the features of brew_install_packages.sh above
  • all builds across all my GitHub repos now make system-packages before make pip / make cpan to shorten how many packages need installing, reducing chances of build failures

  • check_*.sh - extensive collection of generalized tests - these run against all my GitHub repos via CI. Some examples:

  • Data format validation validate_*.py from DevOps Python Tools repo:

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

See Also:

  • DevOps Python Tools - 80+ DevOps CLI tools for AWS, 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

  • SQL Scripts - 100+ SQL Scripts - PostgreSQL, MySQL, AWS Athena, Google BigQuery

  • Templates - dozens of Code & Config templates - AWS, GCP, Docker, Jenkins, Terraform, Vagrant, Puppet, Python, Bash, Go, Perl, Java, Scala, Groovy, Maven, SBT, Gradle, Make, GitHub Actions Workflows, CircleCI, Jenkinsfile, Makefile, Dockerfile, docker-compose.yml, M4 etc.

  • Kubernetes templates - Kubernetes YAML templates - Best Practices, Tips & Tricks are baked right into the templates for future deployments

  • The Advanced Nagios Plugins Collection - 450+ programs for Nagios monitoring your Hadoop & NoSQL clusters. Covers every Hadoop vendor's management API and every major NoSQL technology (HBase, Cassandra, MongoDB, Elasticsearch, Solr, Riak, Redis etc.) as well as message queues (Kafka, RabbitMQ), continuous integration (Jenkins, Travis CI) and traditional infrastructure (SSL, Whois, DNS, Linux)

  • 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 (MySQL, PostgreSQL, AWS Redshift, Snowflake, Apache Drill, Hive, Impala, Cassandra CQL, Microsoft SQL Server, Oracle, Couchbase N1QL, Dockerfiles, Pig Latin, Neo4j, InfluxDB), Ambari FreeIPA Kerberos, Datameer, Linux...

  • 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 Azure CLI:

make azure

Install GCP GCloud SDK (includes CLI):

make gcp

Install GCP GCloud Shell environment (sets up persistent OS packages and all home directory configs):

make gcp-shell

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

make python

Full Help

> make help

 Usage:

  Common Options:

    make help                   show this message
    make build                  installs all dependencies - OS packages and any language libraries via native tools eg. pip, cpanm, gem, go etc that are not available via OS packages
    make build-retry            retries 'make build' x 3 until success to try to mitigate temporary upstream repo failures triggering false alerts in CI systems
    make ci                     prints env, then runs 'build-retry' for more resilient CI builds with debugging
    make printenv               prints environment variables, CPU cores, OS release, $PWD, Git branch, hashref etc. Useful for CI debugging
    make system-packages        installs OS packages only (detects OS via whichever package manager is available)
    make test                   run tests
    make clean                  removes compiled / generated files, downloaded tarballs, temporary files etc.

    make submodules             initialize and update submodules to the right release (done automatically by build / system-packages)
    make init                   same as above, often useful to do in CI systems to get access to additional submodule provided targets such as 'make ci'

    make cpan                   install any modules listed in any cpan-requirements.txt files if not already installed

    make pip                    install any modules listed in any requirements.txt files if not already installed

    make python-compile         compile any python files found in the current directory and 1 level of subdirectory
    make pycompile

    make github                 open browser at github project
    make readme                 open browser at github's README
    make github-url             print github url and copy to clipboard
    make status                 open browser at Github CI Builds overview Status page for all projects

    make ls                     print list of code files in project
    make wc                     show counts of files and lines

  Repo specific options:

    make install                builds all script dependencies, installs AWS CLI, symlinks all config files to $HOME and adds sourcing of bash profile

    make link                   symlinks all config files to $HOME and adds sourcing of bash profile
    make unlink                 removes all symlinks pointing to this repo's config files and removes the sourcing lines from .bashrc and .bash_profile

    make python-desktop         installs all Python Pip packages for desktop workstation listed in setup/pip-packages-desktop.txt
    make perl-desktop           installs all Perl CPAN packages for desktop workstation listed in setup/cpan-packages-desktop.txt
    make ruby-desktop           installs all Ruby Gem packages for desktop workstation listed in setup/gem-packages-desktop.txt
    make golang-desktop         installs all Golang packages for desktop workstation listed in setup/go-packages-desktop.txt
    make nodejs-desktop         installs all NodeJS packages for desktop workstation listed in setup/npm-packages-desktop.txt

    make desktop                installs all of the above + many desktop OS packages listed in setup/

    make mac-desktop            all of the above + installs a bunch of major common workstation software packages like Ansible, Terraform, MiniKube, MiniShift, SDKman, Travis CI, CCMenu, Parquet tools etc.
    make linux-desktop

    make ls-scripts             print list of scripts in this project, ignoring code libraries in lib/ and .bash.d/

    make kubernetes             installs kubectl and kustomize to ~/bin/
    make vim                    installs Vundle and plugins
    make tmux                   installs TMUX TPM and plugin for kubernetes context
    make ccmenu                 installs and (re)configures CCMenu to watch this and all other major HariSekhon GitHub repos
    make status                 open the Github Status page of all my repos build statuses across all CI platforms

    make aws                    installs AWS CLI tools
    make azure                  installs Azure CLI
    make gcp                    installs Google Cloud SDK

    make gcp-shell              sets up GCP Cloud Shell: installs core packages and links configs
                                (maintains itself across future Cloud Shells via .customize_environment hook)
    make azure-shell            sets up Azure Cloud Shell (limited compared to gcp-shell, doesn't install OS packages since there is no sudo)

Now exiting usage help with status code 3 to explicitly prevent silent build failures from stray 'help' arguments
make: *** [help] Error 3

(make help exits with error code 3 like most of my programs to differentiate from build success to make sure a stray help argument doesn't cause silent build failure with exit code 0)

Stargazers over time

Stargazers over time

git.io/bash-tools