This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This script is used to set or remove environment variables in all services in a given environment. | |
| Usage: python set_env_var_to_all_services_in_env.py <mode> <env> <var_name> <var_value> | |
| """ | |
| import glob | |
| import os | |
| import sys | |
| from ruamel.yaml import YAML |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pexpect | |
| services = [ | |
| "service-foo", | |
| "service-bar", | |
| ] | |
| def send_cmd_wait_and_catch_timeout(child, cmd, timeout=30): | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ---------------------------------------------- | |
| # This script updates the Amazon EKS node groups | |
| # associated with a given EKS cluster to use the | |
| # latest version of the launch template. | |
| # | |
| # Usage: | |
| # ./update_node_group_launch_template.sh <AWS_PROFILE> <AWS_REGION> <CLUSTER_NAME> | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| : ' | |
| This script fetches logs from an AWS EKS cluster log group, filters for "error" messages, counts the events, and appends the timestamp and events count to a data file for a specified time range. | |
| The time range is defined by the start_time and end_time variables, and the script iterates over each minute in this range. | |
| The output data file is used to plot a graph using gnuplot, with time on the x-axis and events count on the y-axis. | |
| This script requires that `awscli`, `jq` and `gnuplot` be installed in your environment. | |
| It also requires that you have access to the specified AWS EKS cluster log group. | |
| ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # You need https://github.com/moretension/duti (installable via `brew`) | |
| # and of course Sublime | |
| # Set the bundle identifier for Sublime Text | |
| sublime_bundle_identifier="com.sublimetext.4" | |
| # List of file extensions | |
| file_extensions=( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| : ' | |
| This script automates the process of creating pull requests for batches of modified files in a Git repository. | |
| Each batch contains a specified number of files, and each batch is committed to a new branch with a pull request created for it. | |
| The script supports optional arguments for specifying a prefix for branch names, creating draft pull requests, and setting the batch size. | |
| Usage: | |
| ./create_prs.sh [-p <PREFIX>] [-d] [-b <BATCH_SIZE>] <JIRA_TICKET> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ASG_NAME=$1 | |
| region=$2 | |
| profile=$3 | |
| export AWS_DEFAULT_REGION=$region | |
| export AWS_PROFILE=$profile | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Filename: asg_view.sh | |
| # | |
| # Description: This script lists the Auto Scaling groups in an AWS account that have the "eks:cluster-name" tag | |
| # matching the specified value, along with the number of instances in each group and the oldest | |
| # launch time of those instances. It uses the AWS CLI to query the necessary information. | |
| # | |
| # Usage: ./asg_view.sh <cluster_name> <region> <profile> | |
| # |