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: password prompt deleted - shell makefile for linux users #60

Merged
merged 2 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion IaC/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ resource "random_id" "artifacts_bucket_name_suffix" {
byte_length = 5
}

resource "random_password" "password" {
length = 16
}

module "network" {
source = "./modules/network"
network_name = var.network_name
Expand All @@ -44,7 +48,7 @@ module "network" {
module "mlflow" {
source = "./modules/mlflow"
artifacts_bucket_name = "${var.artifacts_bucket}-${random_id.artifacts_bucket_name_suffix.hex}"
db_password_value = var.db_password_value
db_password_value = random_password.password.result
server_docker_image = var.mlflow_docker_image
project_id = var.project_id
consent_screen_support_email = var.consent_screen_support_email
Expand Down
6 changes: 1 addition & 5 deletions IaC/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ variable "artifacts_bucket" {
type = string
default = "oneclick-mlflow-store"
}
variable "db_password_value" {
description = "Database password to connect to your instance"
type = string
}
variable "mlflow_docker_image" {
description = "Docker image used in container registry"
type = string
Expand All @@ -48,4 +44,4 @@ variable "storage_uniform" {
type = bool
description = "Wether or not uniform level acces is to be activated for the buckets"
default = true
}
}
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ifeq ($(SHELL),/bin/sh)
SHELL:=/bin/bash
endif
pre-requesites:
source vars_base && cd Iac/prerequesites && terraform init && terraform apply
source vars_base && cd IaC/prerequesites && terraform init && terraform apply

build-docker:
source vars_base && cd tracking_server && docker build -t $${TF_VAR_mlflow_docker_image} -f tracking.Dockerfile .
Expand All @@ -8,16 +11,16 @@ push-docker:
source vars_base && docker push $${TF_VAR_mlflow_docker_image}

init-terraform:
source vars_base && cd Iac && terraform init -backend-config="bucket=$${TF_VAR_backend_bucket}"
source vars_base && cd IaC && terraform init -backend-config="bucket=$${TF_VAR_backend_bucket}"

apply-terraform:
source vars_base && cd Iac && terraform apply
source vars_base && cd IaC && terraform apply

plan-terraform:
source vars_base && cd Iac && terraform plan
source vars_base && cd IaC && terraform plan

destroy-terraform:
source vars_base && cd Iac && terraform destroy
source vars_base && cd IaC && terraform destroy

apply: init-terraform apply-terraform

Expand Down