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

Add GKE and cloudsql definitions #505

Merged
merged 1 commit into from
Apr 16, 2024
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
15 changes: 12 additions & 3 deletions NEW_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
22 changes: 22 additions & 0 deletions environment/deployments/science-platform/env/demo-cloudsql.tfvars
Original file line number Diff line number Diff line change
@@ -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
41 changes: 41 additions & 0 deletions environment/deployments/science-platform/env/demo-gke.tfvars
Original file line number Diff line number Diff line change
@@ -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
Loading