Hello. I'm trying to deploy Metaflow over Kubernet...
# ask-metaflow
m
Hello. I'm trying to deploy Metaflow over Kubernetes/Terraform and would like some help exposing the UI to the world with an ALB (no authentication, as a first step). I modified the TF template to include the "UI" module so the UI should be deployed, but I need help configuring an ALB to point to it. Can someone please be kind enough to guide me?
✅ 1
Maybe the place to start is whether this is even the right way to go about enabling the UI on an AWS/Terraform installation: https://github.com/outerbounds/terraform-aws-metaflow/tree/master/modules/ui , or is the helm chart preferred?
a
@average-beach-28850 @hundreds-zebra-57629 might be able to help here
m
The problem: I can't access the UI when I put the URL in the browser. Not even directly with the full ALB DNS name (from the output of the UI submodule). I've created a route53 record - tested that it's resolving fine to the ALB. Security groups seem to be setup fine (ALB security group allows port 443 in, ECS security group allows everything from the ALB security group). The only thing I can suspect now is the VPC configuration. I left this at the default. I started with the EKS_Argo configuration: https://github.com/outerbounds/terraform-aws-metaflow/tree/master/examples/eks_argo, and added the submodules for UI and computation.
Could you please help me @hundreds-zebra-57629 @average-beach-28850?
👀 1
Alright I can now access the UI over https by passing in vpc.public_subnet instead or private. But this has probably put the ECS service itself on a public subnet, which doesn't sound ideal.
h
Hey @millions-horse-99435, apologies about the delay. Exposing the LB to the public internet requires specifying public subnets. The ECS service has a locked down security group so it is not an immediate risk. However, you can rework the module a little so it takes in a different set of subnet ids (public) and pass it to the LB resource when trying LB publicly. The current module likely doesn't have this option to make it less likely for users to introduce issues by exposing an unauthenticated endpoint.
m
Thank you for the response @hundreds-zebra-57629. The next thing I'm looking to do is add authentication with Cognito (as done in the Cloudformation template). Is there a terraform example relevant to this?