-
Notifications
You must be signed in to change notification settings - Fork 466
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
Terraform test: Add AWS persistent #30809
Conversation
@bobbyiliev The test works locally, but fails in CI: https://buildkite.com/materialize/qa-canary/builds/338#0193bc0c-9a96-41f3-a136-927eba3f5477
Can I easily tell terraform that anyone in the Materialize org can have access to this cluster? |
200e187
to
c6b838c
Compare
@bobbyiliev There seems to be another problem. I think the security group and subnet are not using a prefix. Now that I added the persistent aws setup in this PR the temporary aws terraform setup is failing: https://buildkite.com/materialize/nightly/builds/10674#0193bc9c-f90a-45eb-8494-11b525a7a606
Can you take a look please? |
I also tried granting the CI role permissions to the EKS cluster, but still seeing the same:
|
Just submitted a PR to update a hardcoded prefix.
Is there an easy way for us to get the CI role during the run itself? I think that we could extend the terraform module to accept an extra parameter and add the role to the cluster dynamically. |
c6b838c
to
8adb562
Compare
I don't think this would work because the terraform setup already exists. For now I'd like some way to extend the AWS cluster so that every role has access to it. It's the only thing still blocking this PR: https://buildkite.com/materialize/qa-canary/builds/372#01946058-36fc-42a1-81fb-e010fe36479e @bobbyiliev @jseldess Do you have any idea how to achieve that? |
I am not familiar with how Buildkite is setup but as far as I can tell the issue is not with the Kubernetes and the Terraform setup but with the IAM assumed role used by the Buildkite agent which is lacking permissions to perform the eks:DescribeCluster action. So the Buildkite job is failing at the IAM layer, well before even talking to Kubernetes RBAC, because its IAM principal does not have permission to run eks:DescribeCluster. That said, I don't know if we can modify that Builtkite role during runtime? |
36ad20f
to
773baaf
Compare
773baaf
to
ab342d5
Compare
Ready for review now |
002af81
to
1fab6a8
Compare
1fab6a8
to
225fecd
Compare
18e517f
to
d8c8e84
Compare
@jubrad @bobbyiliev In the last commit I have switched to the approach in MaterializeInc/terraform-aws-materialize#27 (
Can I make it use the actual misc/helm-charts/operator folder? Edit: Removed the assert for now |
6d646d2
to
15206e7
Compare
15206e7
to
24ce98c
Compare
This can be submitted in this state, green test run: https://buildkite.com/materialize/nightly/builds/11128 We can improve it later. |
database_password = "zdUXjK4dRBBqBiTMK9gbkL9zPMYMSTsj" | ||
db_identifier = "aws-persistent-metadata-db" | ||
postgres_version = "15" | ||
db_instance_class = "db.t3.micro" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we really run on a t3.micro? 1 core/2 vcpu, and 1G mem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working so far, but we don't have much of a load. I can scale it up if it becomes a problem
test/terraform/mzcompose.py
Outdated
spawn.runv( | ||
[ | ||
"helm", | ||
"install", | ||
"materialize-operator", | ||
"misc/helm-charts/operator", | ||
"--namespace", | ||
"materialize", | ||
"--create-namespace", | ||
"-f", | ||
"-", | ||
], | ||
cwd=MZ_ROOT, | ||
stdin=yaml.dump(materialize_values).encode(), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should n't the terraform-aws-materialize module be installing the materialize-operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This code has been removed already)
Test run: https://buildkite.com/materialize/qa-canary/builds/404
Second test run: https://buildkite.com/materialize/qa-canary/builds/408
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.