Skip to content

Releases: gruntwork-io/bash-commons

v0.2.2

28 Jun 22:26
eed9799
Compare
Choose a tag to compare

Modules affected

  • bash-commons

Description

  • Default to IMDSv2 if no override set
    • The calling script can override this by setting either of the two variables:
      • GRUNTWORK_BASH_COMMONS_IMDS_VERSION
      • default_instance_metadata_version
  • Improved metadata availability detection

v0.2.1

27 Jun 19:21
3fc19af
Compare
Choose a tag to compare

Modules affected

  • bash-commons

Description

  • Fixed unbound variable bug in modules/bash-commons/src/aws.sh

v0.2.0

25 Jun 19:05
1354678
Compare
Choose a tag to compare

Modules affected

  • bash-commons

Description

Update to use IMDSv2 by default (still supports manually setting v1 if needed)

IMPORTANT

There is a bug modules/bash-commons/src/aws.sh that will result in an unbound variable error if GRUNTWORK_BASH_COMMONS_IMDS_VERSION is undefined. This is fixed in v0.2.1.

v0.1.9

22 Oct 13:43
e570b32
Compare
Choose a tag to compare

Modules affected

  • log.sh

Description

Added convenience function for echo-ing to stderr.

v0.1.8

08 Oct 20:32
607e5f5
Compare
Choose a tag to compare

Modules affected

  • aws.sh

Description

Introduce support for AWS Instance Metadata Service (IMDS) Version 2. These changes are fully backward compatible, and bash-commons continues to default to Version 1 of the Instance Metadata Service.

You can override the version of IMDS that bash-commons contacts by setting the following environment variable:

GRUNTWORK_BASH_COMMONS_IMDS_VERSION="2"

bash-commons will continue to default to IMDSv1 until we have migrated all our dependent modules to use version 2. Once this migration is complete, we will issue another release that updates bash-commons to use IMDSv2 by default.

For more information on the differences between Instance Metadata Service Versions 1 and 2 see here.

v0.1.7

11 Jun 17:44
4034968
Compare
Choose a tag to compare

Modules affected

  • assert.sh
  • string.sh

Description

  • Introduce assert_user_has_sudo_perms which checks if user has permissions to run sudo.
  • Introduce string_substr which can extract a substring by index.

Related links

v0.1.6

11 Jun 13:36
ddd22a6
Compare
Choose a tag to compare

Modules affected

  • os.sh

Description

  • Fix bug introduced with using sudo for the os_create_user and os_change_dir_owner functions.

Related links

v0.1.5

10 Jun 16:35
9ffcd19
Compare
Choose a tag to compare

Modules affected

  • os.sh

Description

  • os_create_user and os_change_dir_owner now have the ability to run respective commands using sudo.

Related links

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