Skip to content

Latest commit

 

History

History
127 lines (109 loc) · 11.5 KB

README.md

File metadata and controls

127 lines (109 loc) · 11.5 KB

ML Flow implementation for GCP

Files overview

bucket.tf - Bucket that will hold Ml Flow artifacts.

db.tf - Postgres database set up using RDS, database details are stored in parameters.

ecr.tf - ECR that will hold our container.

ecs.tf - Definition of an ECS service.

gateways.tf - NAT gateway and internet gateway.

load_balancer.tf - Load balancer and all elements it needs - listener and target group.

local.tf - Holds tags that are attached to all resources.

main.tf - General configuration for terraform.

routing.tf - Routing tables and routes association.

sg.tf - Security groups that limit traffic to different elements to ensure security.

task_def.tf - Task definition that is used to set up the service.

users.tf - User that MlFlow uses to list manage elements in bucket.

variables.tf - Input data.

vpc.tf - Setup for the vpc, subnetworks and subnetworks group (for database).

Requirements

Name Version
terraform >= 1.5
aws ~> 5.4.0

Resources

Name Type
aws_alb_listener.mlflow resource
aws_db_instance.mlflow-db resource
aws_db_subnet_group.db_subnet_group resource
aws_ecr_repository.mlflow_ecr resource
aws_ecs_cluster.mlflow_ecs resource
aws_ecs_cluster_capacity_providers.base resource
aws_ecs_service.mlflow resource
aws_ecs_task_definition.mlflow resource
aws_eip.nat_ip_a resource
aws_eip.nat_ip_b resource
aws_iam_access_key.mlflow_s3 resource
aws_iam_policy.access_ssm resource
aws_iam_role.ecs_mlflow resource
aws_iam_user.mlflow_s3 resource
aws_iam_user_policy_attachment.test-attach resource
aws_internet_gateway.main resource
aws_lb.mlflow resource
aws_lb_listener_rule.mlflow resource
aws_lb_target_group.mlflow resource
aws_nat_gateway.mlflow_nat_a resource
aws_nat_gateway.mlflow_nat_b resource
aws_route_table.private_a resource
aws_route_table.private_b resource
aws_route_table.public resource
aws_route_table_association.db_subnet_association_a resource
aws_route_table_association.db_subnet_association_b resource
aws_route_table_association.private_subnet_association_a resource
aws_route_table_association.private_subnet_association_b resource
aws_route_table_association.public_subnet_association_a resource
aws_route_table_association.public_subnet_association_b resource
aws_s3_bucket.mlflow-bucket resource
aws_security_group.allow_ingress_from_vpn_dlabs resource
aws_security_group.ecs_sg resource
aws_security_group.lb_sg resource
aws_security_group.rds_sg resource
aws_security_group_rule.db_ingress resource
aws_security_group_rule.ecs_egress resource
aws_security_group_rule.ecs_egress_all resource
aws_security_group_rule.ecs_ingress resource
aws_security_group_rule.egress_lb_ecs resource
aws_security_group_rule.ingress_lb_ports resource
aws_security_group_rule.rds_ingress resource
aws_ssm_parameter.db_password resource
aws_ssm_parameter.db_url resource
aws_ssm_parameter.mlflow-bucket_url resource
aws_ssm_parameter.mlflow_key_id resource
aws_ssm_parameter.mlflow_key_secret resource
aws_ssm_parameter.mlflow_password resource
aws_subnet.db_subnet_a resource
aws_subnet.db_subnet_b resource
aws_subnet.private_subnet_a resource
aws_subnet.private_subnet_b resource
aws_subnet.public_subnet_a resource
aws_subnet.public_subnet_b resource
aws_vpc.main resource
random_password.db_password resource
random_password.mlflow_password resource
aws_iam_policy.bucket_access data source
aws_iam_policy.cloud_watch data source
aws_iam_policy.ecs_task_execution data source

Inputs

Name Description Type Default Required
app_name n/a string "mlflow-terraform" no
cidr Cidr block of vpc string "10.0.0.0/25" no
db_cidr_a n/a string "10.0.0.32/28" no
db_cidr_b n/a string "10.0.0.48/28" no
ecs_service_name n/a string "mlflow-test" no
ecs_task_name n/a string "mlflow-test" no
env Name of the environment string "test" no
internet_cidr Cidr block for the internet string "0.0.0.0/0" no
private_cidr_a n/a string "10.0.0.0/28" no
private_cidr_b n/a string "10.0.0.16/28" no
public_cidr_a n/a string "10.0.0.96/28" no
public_cidr_b n/a string "10.0.0.112/28" no
region n/a string "eu-central-1" no
your_vpn n/a string "37.120.211.73/32" no
zone_a n/a string "eu-central-1a" no
zone_b n/a string "eu-central-1b" no
The inputs need to be updated with correct values before the project can be started.
Either in variables.tf or in terraform.tfvars.

Outputs

No outputs.