Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Install from latest release instead of master #133

Merged
merged 2 commits into from
Jun 27, 2018

Conversation

AMeng
Copy link
Contributor

@AMeng AMeng commented Jun 25, 2018

Make the install script idempotent by locking in the latest version number. This value needs to be updated each time a new release is pushed out.

An alternative solution would be to pass in the release version as an argument to this script. I think even if this option was to be added, it should still default to the release from which the install script was taken.

Without this change, the install script cannot reliably be used for idempotent builds.

Make the install script idempotent by locking in the latest version number.
@michaelwittig
Copy link
Contributor

Hi @AMeng

We only have versioned RPMs at the moment.

I don't like to hardcode the version because I'm the one who has to keep the version in sync.

As you suggested, a argument to the install script that defaults to master would be much better. Would you be able to make the change in your PR?

@AMeng
Copy link
Contributor Author

AMeng commented Jun 26, 2018

Added an option for specifying the release which defaults to master. The new help text looks like this:

$ ./install.sh -h
Usage: install.sh [-hv] [-a ARN] [-i GROUP,GROUP,...] [-l GROUP,GROUP,...] [-s GROUP] [-p PROGRAM] [-u "ARGUMENTS"] [-r RELEASE]
Install import_users.sh and authorized_key_commands.

    -h                 display this help and exit
    -v                 verbose mode.

    -a arn             Assume a role before contacting AWS IAM to get users and keys.
                       This can be used if you define your users in one AWS account, while the EC2
                       instance you use this script runs in another.
    -i group,group     Which IAM groups have access to this instance
                       Comma seperated list of IAM groups. Leave empty for all available IAM users
    -l group,group     Give the users these local UNIX groups
                       Comma seperated list
    -s group,group     Specify IAM group(s) for users who should be given sudo privileges, or leave
                       empty to not change sudo access, or give it the value '##ALL##' to have all
                       users be given sudo rights.
                       Comma seperated list
    -p program         Specify your useradd program to use.
                       Defaults to '/usr/sbin/useradd'
    -u "useradd args"  Specify arguments to use with useradd.
                       Defaults to '--create-home --shell /bin/bash'
    -r release         Specify a release of aws-ec2-ssh to download from GitHub. This argument is
                       passed to `git clone -b` and so works with branches and tags.
                       Defaults to 'master'

@michaelwittig michaelwittig merged commit abf073a into widdix:master Jun 27, 2018
mukgupta pushed a commit to SvavaCapital/aws-ec2-ssh that referenced this pull request Jul 31, 2018
Add argument to install script to specify release
labkey-ians pushed a commit to LabKey/aws-ec2-ssh that referenced this pull request Feb 22, 2019
* if iam returns no users at all, it is likey down (implementation merged from https://github.com/packetfairy/aws-ec2-ssh/blob/condoms/import_users.sh#L285) fixes widdix#96

* Fix typo (widdix#125)

* Fix typo in rpm install output text
* Fix file name

* fix

* fix

* improved check

* re added creation policy

* changing aws command line detection to make it silent (widdix#127)

* fix RHEL

* increase timeout

* allow parallel tests

* fix RHEL showcase

* re-add creation policy

* Update README.md

bump version

* added license to templates

* Install from latest release instead of master (widdix#133)

Add argument to install script to specify release

* document ##ALL##

* fix tag enabled groups in multi account setup (widdix#136)

* added hint to AWS Systems Manager Session Manager

* Changed URI for RPM to latest release version (widdix#140)

* fix IAM SSH access

* fix

* Update README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants