📦Yuki Proxy Terraform Installation Guide (AWS)

This guide provides detailed instructions for installing the Yuki Proxy using Terraform on an AWS environment.

Prerequisites

Before you begin, ensure the following tools are installed and configured on your machine:

  • AWS CLI

    • Install: brew install awscli

    • Check version: aws --version

    • Configure AWS: Execute aws configure and follow prompts to input your AWS Access Key ID, Secret Access Key, region, and output format.

  • Terraform

    • Install: brew install terraform

    • Check version: terraform -v

  • kubectl

    • Install: brew install kubectl

    • Check version: kubectl version --client

  • AWS Environment Check

    • Verify that there are fewer than 5 VPCs and Elastic IPs in your AWS region to avoid limits.

  • AWS Service Access

    • Ensure full access to EC2, EKS, ECR, ECS, Elastic Load Balancing, IAM, CloudFormation, Route 53, and Certificate Manager (ACM).

Installation Steps

Configure Terraform Variables

  • Open Terraform/variables.tf file from your IDE (e.g., VS Code).

  • Set the certificate_arn and adjust the region:

    ...
    variable "main-region" {
      type    = string
      default = "<region>"
    }
    
    variable "vpc_azs" {
      type = list(string)
      default = ["<region>a", "<region>b"]
    }
    ...
    variable "certificate_arn" {
      type = string
      default = "arn:aws:acm:<region>:<account-identifier>:certificate/<certificate>"
    }
    ...

Initialize and Apply Terraform

  • Change directory to the Terraform folder.

  • Initialize and apply Terraform:

    terraform init
    terraform apply
  • Confirm the action by typing yes when prompted. The installation takes approximately 10 minutes.

Configure Kubernetes Cluster

  • Navigate to the EKS console.

  • Update your kubeconfig file to interact with your cluster:

    aws eks --region <region> update-kubeconfig --name <cluster_name>

Validate Installation

  • Check that the Yuki Proxy pods are running:

    kubectl get pods -n yuki-proxy
  • Ensure that there are 2 running pods as expected.

Configure DNS with Route53

  • Open Terraform/proxy-dns-record/variables.tf file from your IDE.

  • Set DNS variables:

    • route53_hosted_zone_id: ID of your Route53 Hosted Zone.

    • domain_name: Domain name for connections.

    • load_balancer_hosted_zone_id: Hosted zone ID of your AWS Load Balancer.

    • load_balancer_dns_name: DNS name of your AWS Load Balancer (e.g., "snowflake.your-domain.com").

  • Initialize and apply Terraform for DNS:

    terraform init
    terraform apply
  • Confirm the action by typing yes when prompted.

Validate DNS Record

  • Check that the new DNS record is resolving correctly.

  • To test the connection, use your IDE (e.g., DataGrip), entering the load_balancer_dns_name as the host.

Troubleshooting

If you encounter issues, review your configurations and check the Common Issues and Troubleshooting. For further assistance, contact the Yuki tech team.

Summary

Your Snowflake is now connected, and you can use the proxy address to query Snowflake. For warehouse consolidation, refer back to the Getting Started guide and ensure your warehouses are enabled if not already done.

Last updated