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

Dynamically install plugin version on runtime (deploy) #316

Open
arm4b opened this issue Oct 10, 2022 · 4 comments
Open

Dynamically install plugin version on runtime (deploy) #316

arm4b opened this issue Oct 10, 2022 · 4 comments

Comments

@arm4b
Copy link
Member

arm4b commented Oct 10, 2022

Requires (depends on) Set the plugin version on custom image build #315 for version in the plugin install.sh implementation first.

Provide users a way to install the needed plugin version on runtime(deploy) directly from the Omnibus image.
In the ops repo's bitops.config.yaml for a given tool, support the ${tool}.options.version flag). That way, if users want to specify a version of a tool, it'll work (though it'll take longer). Then, when they are comfortable with things, they can create their own bitops image with pinned versions (which is more involved #315).

Example bitops.config.yaml for installing terraform version on runtime:

terraform:
    cli:
        var-file: my-vars.tfvars
        target: terraform.module.resource
    options:
        version: 1.2.3 # <--- new setting
        stack-action: "plan"
        workspace: test

and so 1.2.3 will be passed to the plugin install.sh to install the needed tool version:
https://github.com/bitops-plugins/terraform/blob/b189c2dd7cb38e7e883837f0f3204e5b7e8a6e6b/install.sh#L13-L14
This was originally suggested here (for the TF plugin): #307 (comment).

When installing the tool on runtime, explicitly warn users about risks of using it:

WARNING: You've set the custom Terraform version 1.2.3 in the bitops.config.yaml. This will download and install the tool before every deploy, which is not recommended for production. Try it at your own risk! We encourage you to pre-package your own BitOps image instead. See how to do that: https://bitovi.github.io/bitops/plugins/#creating-your-own-bitops-image

See more details in the discussions below.

Previous Discussions

@mickmcgrath13
Copy link
Contributor

I think this one should be "blocked" by #315

@mickmcgrath13
Copy link
Contributor

It might also be good to set it behind a flag with a BIG warning to the effect of:

Setting this flag and specifying a tool version that is not pre-installed will cause BitOps to download the tool's version at deploy time. This setting is meant for development only, and you should pre-build your BitOps image (docs link) prior to any production implementation.

@mickmcgrath13
Copy link
Contributor

lol, sorry, didn't read the full description before commenting 🤦
I agree with the warning, and I do think we should set it behind a flag so users need to "opt in". The flag should be documented with a similar warning message.

@arm4b
Copy link
Member Author

arm4b commented Oct 12, 2022

Nice to have. Moderate effort. Lower priority.

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

No branches or pull requests

2 participants