diff --git a/NEW_ENVIRONMENT.md b/NEW_ENVIRONMENT.md index 653e8a13..69f82b6e 100644 --- a/NEW_ENVIRONMENT.md +++ b/NEW_ENVIRONMENT.md @@ -151,16 +151,25 @@ Go back to the [Workflows](.github/workflows) and update the `proj` and Merge this PR. -## Additional tfvars files +## Add additional resources -Do the same for the GKE file (in this case, I would start with [the dev -GKE file](./environment/deployments/science-platform/dev-gke.tfvars), +Do the same for the additional resources you plan to deploy. For a +minimal Science Platform, start with [the dev GKE +file](./environment/deployments/science-platform/dev-gke.tfvars), and copy it to [the demo GKE file](./environment/deployments/science-platform/demo-gke.tfvars). This one is simper: all you need to do is replace the environment name and reset the serial, assuming your base and target environment have similar sets of resource requirements. +Repeat the process with [cloudSQL +resources](./environment/deployments/science-platform/demo-gke.tfvars), +where you will also need to update `project_id`. + +If you want other resources (or you are adding something besides a +science platform instance, which has different requirements), edit those +files in an analogous manner. + Again, create a PR, examine the Terraform output, and when happy, merge the PR. diff --git a/environment/deployments/science-platform/env/demo-cloudsql.tfvars b/environment/deployments/science-platform/env/demo-cloudsql.tfvars new file mode 100644 index 00000000..306cd03d --- /dev/null +++ b/environment/deployments/science-platform/env/demo-cloudsql.tfvars @@ -0,0 +1,22 @@ +# Project +environment = "demo" +application_name = "science-platform" +project_id = "science-platform-demo-9e05" + +# Butler database +butler_db_name = "butler-registry-demo" +butler_require_ssl = false +butler_database_flags = [ + { name = "password_encryption", value = "scram-sha-256" } +] +butler_database_version = "POSTGRES_13" +butler_ipv4_enabled = true + +# General database +db_maintenance_window_day = 1 +db_maintenance_window_hour = 22 +db_maintenance_window_update_track = "canary" +backups_enabled = true + +# Increase this number to force Terraform to update the demo environment. +# Serial: 1 diff --git a/environment/deployments/science-platform/env/demo-gke.tfvars b/environment/deployments/science-platform/env/demo-gke.tfvars new file mode 100644 index 00000000..ff093095 --- /dev/null +++ b/environment/deployments/science-platform/env/demo-gke.tfvars @@ -0,0 +1,41 @@ +# Project +environment = "demo" +application_name = "science-platform" + +# GKE +release_channel = "RAPID" +master_ipv4_cidr_block = "172.16.0.0/28" +gce_pd_csi_driver = true +maintenance_start_time = "2021-08-18T00:00:00Z" +maintenance_end_time = "2021-08-18T12:00:00Z" +maintenance_recurrence = "FREQ=WEEKLY;BYDAY=WE" + +node_pools = [ + { + name = "core-pool" + machine_type = "n2-standard-8" + node_locations = "us-central1-b" + local_ssd_count = 0 + auto_repair = true + auto_upgrade = true + preemptible = false + autoscaling = true + initial_node_count = 1 + min_count = 1 + max_count = 100 + image_type = "cos_containerd" + enable_secure_boot = true + disk_size_gb = "200" + disk_type = "pd-ssd" + } +] + +node_pools_labels = { + core-pool = { + infrastructure = "ok", + jupyterlab = "ok" + } +} + +# Increase this number to force Terraform to update the demo environment. +# Serial: 1