Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adopt same installer logic than terraform-installer (use releases instead of tags) #8

Open
kral2 opened this issue Oct 10, 2021 · 2 comments

Comments

@kral2
Copy link

kral2 commented Oct 10, 2021

terraform-installer uses GitHub releases whereas packer-installer uses tags.

Line 63 indicates that this choice was made because release was not populated at the time.

# parse version from github API - use Tags for Packer as release not populated

That is not the case anymore since v1.4.3.

Having the exact same pattern between each installers would simplify maintenance. I have tested to copy terraform-installer.sh and search/replace any terraform reference by packer and it seems functional. I can make a PR with this change if you are interested in.

Bonus: the same Terraform installer works perfectly fine for nomad, vault and consul when the jq query is adapted. That would be a great addition to https://iac.sh :-D

@robertpeteuil
Copy link
Owner

Great callout, @kral2 and I agree that using the same pattern for all the installers is ideal. (One of the main reasons I split them out was due to tag/release issues that you've identified.)

Does the the modified version you've tested work with Packer releases before 1.4.3? Since some folks use these scripts in CI pipelines to install pinned versions, we want to ensure that it still works with all versions.

I've also considered combining this into a universal Hashi installer (since the logic is mostly the same).

@kral2
Copy link
Author

kral2 commented Oct 11, 2021

Update related to testing older version : Modified Installer works with all the way down to 0.10.2 (tested only on macOS whith packer version returning the expected version). Below that, a binary is downloaded (up to 0.1.0) but it appeared broken on macOS Big Sur. Can't test it.

Based on your work, I hacked together this installer few days ago: https://github.com/kral2/hashistack-installer

It currently supports installing packer, terraform, vault, consul, nomad, boundary and waypoint. Tested with darwin-amd64 and linux-arm64.

Really naive implementation for now as I needed to have it out fast. I would be happy to contribute and have iac.sh updated 👍

Thinking out loud: the universal installer may test the requested version, and if older that vX.X.X fallback to the existing installers on iac.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants