Releases: gruntwork-io/bash-commons
Releases · gruntwork-io/bash-commons
v0.1.4
Modules affected
aws-wrapper.sh
Description
- Added a new
aws_wrapper_get_asg_rally_point
function that can calculate a "rally point" instance in an Auto Scaling Group (ASG) and return its hostname. This is a deterministic way for the instances in an ASG to all pick the same single instance to perform some action: e.g., this instance could become the leader in a cluster or run some initialization script that should only be run once for the entire ASG. Under the hood, this method picks the instance in the ASG with the earliest launch time; in the case of ties, the instance with the earliest instance ID (lexicographically) is returned.
Special thanks
- Thank you to @yardbirdsax for the contribution!
Related links
v0.1.3
Modules affected
dynamic-ubuntu-wait.sh
[NEW]
Description
Introduce a new helper script that can be used to wait for apt locks to be released. This is useful in infrastructure setup scripts (e.g. packer
) where the nodes may start updating the packages as it is booting, preventing you from interacting with apt
.
Related links
v0.1.2
v0.1.1
Modules affected
array.sh
assert.sh
aws.sh
file.sh
os.sh
Description
- Extracted lots of great helper functions from
package-kafka
andpackage-zookeeper
and moved them tobash-commons
. These includearray_split
,array_prepend
,assert_exactly_one_of
,file_replace_text_in_files
,os_user_exists
,os_create_user
,os_change_dir_owner
, and a number of AWS EC2 and ENI functions. Check out the PR link below for the full list.
Related links
v0.1.0
Modules affected
All!
Description
- Add
bootstrap.sh
script that sets a number of good defaults, such aspipefail
,errtrace
, andfunctrace
. We strongly recommendsource
ing this script at the very top of all of your scripts (i.e., before importing any of the other bash-commons scripts)! - Use
#!/usr/bin/env bash
in all scripts instead of#!/bin/bash
. - Make scripts
shellcheck
compatible, fixing minor bugs along the way.