This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<!-- Load c3.css --> | |
<link href="http://mamase.org/static/css/c3.css" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<div id="chart"></div> | |
<!-- Load d3.js and c3.js --> | |
<script src="http://mamase.org/static/js/d3.js" charset="utf-8"></script> | |
<script src="http://mamase.org/static/js/c3.js"></script> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "kubernetes_namespace" "ingress_nginx" { | |
depends_on = ["google_container_node_pool.primary_preemptible_nodes"] | |
metadata { | |
name = "ingress-nginx" | |
labels = { | |
"app.kubernetes.io/name" = "ingress-nginx" | |
"app.kubernetes.io/part-of" = "ingress-nginx" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "kubernetes_deployment" "metabase" { | |
metadata { | |
name = "metabase" | |
labels = { | |
app = "metabase" | |
} | |
namespace = "${kubernetes_namespace.sandbox.metadata.0.name}" | |
} | |
spec { | |
replicas = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "google_container_cluster" "primary" { | |
project = "${var.project_id}" | |
name = "demo-cluster" | |
location = "${var.zone}" | |
remove_default_node_pool = true | |
initial_node_count = 1 | |
master_auth { | |
username = "${var.k8s_username}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable project_id {} | |
variable cloudsql_proxy_sa_key {} | |
variable zone {} | |
variable k8s_username {} | |
variable k8s_password {} | |
variable db_instance_connection_name {} | |
variable metabase_db_name {} | |
variable metabase_db_user {} | |
variable metabase_db_password {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "metabase_db_name" { | |
value = "${google_sql_database.metabase_database.name}" | |
} | |
output "db_instance_connection_name" { | |
value = "${google_sql_database_instance.demo_instance.connection_name}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable project_id {} | |
variable region {} | |
variable metabase_db_user {} | |
variable metabase_db_password {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "google_sql_database_instance" "demo_instance" { | |
project = "${var.project_id}" | |
name = "demo-db" | |
region = "${var.region}" | |
database_version = "POSTGRES_9_6" | |
settings { | |
tier = "db-f1-micro" | |
disk_autoresize = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "project_id" { | |
value = "${google_project.demo_project.project_id}" | |
} | |
output "cloudsql_proxy_sa_key" { | |
value = "${google_service_account_key.cloudsql_proxy_sa_key.private_key}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "google" { | |
project = "${var.project}" | |
zone = "${var.zone}" | |
} | |
resource "google_project" "demo_project" { | |
name = "${var.project}" | |
project_id = "${var.project}-id" | |
org_id = "${var.org_id}" | |
billing_account = "${var.billing_id}" |
OlderNewer