Skip to content

Releases: gruntwork-io/bash-commons

v0.1.4

08 Apr 08:54
391ad6d
Compare
Choose a tag to compare

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

Related links

v0.1.3

09 Sep 19:21
013a0b4
Compare
Choose a tag to compare

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

21 Mar 00:03
3cb3c71
Compare
Choose a tag to compare

Modules affected

  • array.sh
  • assert.sh

Description

  • Fix syntax in the docs for the array_split function.
  • Fix minor bug in the loop indices of the assert_exactly_one_of function.

Related links

v0.1.1

05 Mar 23:36
ff79100
Compare
Choose a tag to compare

Modules affected

  • array.sh
  • assert.sh
  • aws.sh
  • file.sh
  • os.sh

Description

  • Extracted lots of great helper functions from package-kafka and package-zookeeper and moved them to bash-commons. These include array_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

28 Nov 12:44
9369cb3
Compare
Choose a tag to compare

Modules affected

All!

Description

  • Add bootstrap.sh script that sets a number of good defaults, such as pipefail, errtrace, and functrace. We strongly recommend sourceing 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.

Related links

v0.0.7

26 Oct 03:40
298eefa
Compare
Choose a tag to compare

#10 adds the file_fill_template function to replace a specific template string in a file with a value

v0.0.6

03 Sep 17:23
afa3e0d
Compare
Choose a tag to compare

#7 ensures aws_get_instances_with_tag returns only pending and running instances

v0.0.5

31 Aug 16:41
8f7678f
Compare
Choose a tag to compare

#6 adds a new functions aws_get_instances_with_tag to aws.sh and aws_wrapper_get_ips_with_tag to aws-wrapper.sh

v0.0.4

22 Jun 16:41
d738b92
Compare
Choose a tag to compare

#5: Add an os_is_redhat method to os.sh.

v0.0.3

02 May 01:20
f3349c4
Compare
Choose a tag to compare

#3 Fixed a minor issue in os.sh function os_is_amazon_linux where Amazon linux v1 and v2 had slightly different image names and we were not properly identifying Amazon linux in one of the cases.