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

Fix broken Terraform installation files #1420

Merged
merged 3 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ This Terraform configuration creates the following resources:
* Install [Helm](https://helm.sh/docs/intro/install/) \(tested with v3.3.4\)
* GCP [authentication](https://cloud.google.com/docs/authentication) and sufficient [privilege](https://cloud.google.com/iam/docs/understanding-roles) to create the resources listed above.

### 2. Configure Terraform
### 2. Configure Feast Helm Repository

Add Feast Helm repository so Charts can be found by executing:

```bash
$ helm repo add feast-charts https://feast-helm-charts.storage.googleapis.com
$ helm repo update
```

### 3. Configure Terraform

Create a `.tfvars` file under`feast/infra/terraform/gcp`. Name the file. In our example, we use `my_feast.tfvars`. You can see the full list of configuration variables in `variables.tf`. Sample configurations are provided below:

Expand All @@ -38,7 +47,7 @@ dataproc_staging_bucket = "feast-dataproc"
```
{% endcode %}

### 3. Apply
### 4. Apply

After completing the configuration, initialize Terraform and apply:

Expand Down
4 changes: 2 additions & 2 deletions infra/terraform/gcp/feast.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ locals {
}
}

feast-online-serving = {
feast-serving = {
enabled = true
"application-override.yaml" = {
feast = {
Expand Down Expand Up @@ -113,7 +113,7 @@ resource "helm_release" "feast" {
depends_on = [kubernetes_secret.feast-postgres-secret, kubernetes_secret.feast_sa_secret]

name = var.name_prefix
chart = "../../charts/feast"
chart = "feast-charts/feast"
Copy link
Member

Choose a reason for hiding this comment

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

Would it be easier to use a remote repository?

Something like chart = "https://feast-helm-charts.storage.googleapis.com/feast-0.100.4.tgz"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's easier I agree, with this doc changes are not necessary. However this solution fixes the version and with every new helm chart release you'll have to keep these terraform files up to date.

Tell me what you prefer, I'm good with both

Copy link
Member

Choose a reason for hiding this comment

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

However this solution fixes the version and with every new helm chart release you'll have to keep these terraform files up to date

I actually think this is a feature, not a bug :)

We'd essentially be pinning the dependencies to a specific version, which I think is ideal. We want to provide an opinionated set of components that we know work well together. So I think pointing to a specific chart makes the most sense.

We could use this argument layout to specific the repo + chart + version

resource "helm_release" "example" {
  name       = "my-redis-release"
  repository = "https://charts.bitnami.com/bitnami"
  chart      = "redis"
  version    = "6.0.1"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes sense! Thanks for explaining it. I've already tested with your suggested change and it works. I'll update the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@woop Done!


values = [
yamlencode(local.feast_helm_values)
Expand Down