kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
321 stars 49 forks source link

Eliminate manual installation of Terraform dependencies #556

Open johananl opened 4 years ago

johananl commented 4 years ago

Right now users have to install Terraform manually as well as the correct version of the ct provider in order for lokoctl to be able to manage clusters. This isn't very nice at the UX level and is also error-prone.

We should consider shipping the correct Terraform binary with lokoctl and safely pin a known set of Terraform providers so that the correct providers are downloaded during the terraform init phase.

The end result should be that a user can download a lokoctl binary and simply run lokoctl cluster apply to get a working cluster.

invidian commented 4 years ago

This can be easily solved for Terraform providers after we upgrade to Terraform 0.13, which will allow pulling providers from 3rd part registries. See https://github.com/hashicorp/terraform/blob/mildwonkey/ps-docs/website/docs/configuration/providers.html.md#provider-source for more details.

The Terraform binary itself could be either embedded in lokoctl/release OR we could switch to run Terraform programmatically from Go instead of using separate binary.

invidian commented 3 years ago

ct provider is now automatically pulled from the registry. However, some platforms may not have a provider published (e.g. libvirt), then manual installation is still needed.