Navigation Menu

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

pulumi: install providers and add update script #72373

Merged
merged 1 commit into from Nov 6, 2019

Conversation

jlesquembre
Copy link
Member

Motivation for this change

Without providers (also called plugins) pulumi doesn't do much. The way
they work, if you want to use a provider, pulimi will look for it in
your PATH, and if not found it will download it. Providers are just
executables, but third party binaries usually don't work on nixos unless
they are patched with the patchelf utility. Because of that, I'm
installing some patched providers with the main pulumi binary.

I'm also adding a small script helper to generate the hashes for all the
binaries.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @peterromfeldhk

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename "fetch-pulumi.sh" to something else like "update.sh" or "maintain.sh" because otherwise the name sounds as if you are implementing a custom fetcher, which you did not.
Also would be nice to run the ShellCheck on it.

Otherwise LGTM.

Without providers (also called plugins) pulumi doesn't do much. The way
they work, if you want to use a provider, pulimi will look for it in
your PATH, and if not found it will download it. Providers are just
executables, but third party binaries usually don't work on nixos unless
they are patched with the patchelf utility. Because of that, I'm
installing some patched providers with the main pulumi binary.

I'm also adding a small script helper to generate the hashes for all the
binaries.
@jlesquembre
Copy link
Member Author

@veprbl Thanks for your review, I renamed the script to update.sh and updated it based on the warnings from ShellCheck. I also reformatted it with shfmt

@veprbl
Copy link
Member

veprbl commented Nov 6, 2019

@GrahamcOfBorg build pulumi-bin

@veprbl veprbl merged commit 7272491 into NixOS:master Nov 6, 2019
@jlesquembre jlesquembre deleted the pulumi-fix branch May 5, 2020 08:19
@jlesquembre jlesquembre mentioned this pull request Jun 7, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants