This project contains Terraform scripts to provision Google GCP infrastructure resources required to deploy SAS Viya 4 platform products. Here is a list of resources this project can create -
- VPC Network and Network Firewalls
- Managed Google Kubernetes Engine (GKE) cluster
- System and User GKE Node pools with required Labels and Taints
- Infrastructure to deploy SAS Viya platform CAS in SMP or MPP mode
- Shared Storage options for SAS Viya platform - Google Filestore (ha) or NFS Server (standard)
- Google Cloud SQL for PostgreSQL instance, optional
Once the cloud resources are provisioned, see the viya4-deployment repo to deploy SAS Viya 4 platform products. If you need more information on the SAS Viya 4 platform products refer to the official SAS® Viya® platform Operations documentation for more details.
Operational knowledge of
-
Access to a Google Cloud "Project" with these API Services enabled.
-
Terraform or Docker
-
- Terraform - v1.8.5
- kubectl - v1.28.7
- jq - v1.6
- gcloud CLI - (optional - useful as an alternative to the Google Cloud Platform Portal) - v479.0.0
- gke-gcloud-auth-plugin - (optional - only for provider based Kubernetes configuration files) - >= v1.26
-
Run these commands in a Terminal session:
# clone this repo
git clone https://github.com/sassoftware/viya4-iac-gcp
# move to directory
cd viya4-iac-gcp
See Terraform GCP Authentication for details.
Create a file named terraform.tfvars
to customize any input variable value documented in the CONFIG-VARS.md file. For starters, you can copy one of the provided example variable definition files in ./examples
folder. For more details on the variables declared refer to the CONFIG-VARS.md file.
NOTE: You will need to update the cidr_blocks
in the variables.tf file to allow traffic from your current network. Without these rules, access to the cluster will only be allowed via the GCP Console.
When using a variable definition file other than terraform.tfvars
, see Advanced Terraform Usage for additional command options.
Create and manage the GCP cloud resources by either
- using Terraform directly on your workstation, or
- using a Docker container.
See troubleshooting page.
We welcome your contributions! Please read CONTRIBUTING.md for details on how to submit contributions to this project.
This project is licensed under the Apache 2.0 License.
- Google Cloud CLI - https://cloud.google.com/sdk/gcloud
- Terraform on GCP - https://cloud.google.com/docs/terraform
- Terraform and GCP Service Accounts - https://medium.com/@gmusumeci/how-to-create-a-service-account-for-terraform-in-gcp-google-cloud-platform-f75a0cf918d1
- GKE intro - https://cloud.google.com/kubernetes-engine
- Google Provider - https://www.terraform.io/docs/providers/google/index.html
- Google GKE - https://www.terraform.io/docs/providers/google/r/container_cluster