From c4e0de5a3244e75ede6aad218f1ab3274947ab6e Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:59:18 -0500 Subject: [PATCH 1/5] chore: (IAC-1197) Update Branch Selector for GitHub Workflow (#91) --- .github/workflows/linter-analysis.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter-analysis.yaml b/.github/workflows/linter-analysis.yaml index f3851bb..f1d3214 100644 --- a/.github/workflows/linter-analysis.yaml +++ b/.github/workflows/linter-analysis.yaml @@ -1,7 +1,7 @@ name: Linter Analysis on: push: - branches: [ '*' ] # '*' will cause the workflow to run on all commits to all branches. + branches: [ '**' ] # '**' will cause the workflow to run on all commits to all branches, including those with path separators jobs: # Hadolint: Job-1 From e5ebbf5071c154695ecf45c98715a681910b9bfe Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:12:40 -0500 Subject: [PATCH 2/5] feat: (IAC-1193) Update Dependencies to Resolve Security Issues (#92) --- Dockerfile | 6 +++--- README.md | 6 +++--- docs/REQUIREMENTS.md | 6 +++--- requirements.txt | 2 +- roles/kubernetes/common/defaults/main.yaml | 2 +- versions.tf | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 480f93a..ea3b8a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,9 @@ RUN apt-get update && apt-get upgrade -y --no-install-recommends \ # Layers used for building/downloading/installing tools FROM baseline as tool_builder -ARG HELM_VERSION=3.12.0 -ARG KUBECTL_VERSION=1.26.7 -ARG TERRAFORM_VERSION=1.4.5-* +ARG HELM_VERSION=3.13.2 +ARG KUBECTL_VERSION=1.26.10 +ARG TERRAFORM_VERSION=1.6.3-* WORKDIR /build diff --git a/README.md b/README.md index 6a3ce60..521f881 100644 --- a/README.md +++ b/README.md @@ -100,10 +100,10 @@ This project supports the following options for running the scripts in this repo The following software is required in order to run the SAS Viya IaC tools here on your local system: -- [Terraform](https://www.terraform.io/downloads) - v1.4.5 -- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) - v2.13.4 +- [Terraform](https://www.terraform.io/downloads) - v1.6.3 +- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) - v2.15.6 - [Docker](https://docs.docker.com/engine/install/) - v20.10.17 -- [Helm](https://helm.sh/docs/intro/install/) - v3.12.0 +- [Helm](https://helm.sh/docs/intro/install/) - v3.13.2 #### Docker Requirements diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 53387af..e09b5b5 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -681,7 +681,7 @@ The third-party applications that are listed in the following table are supporte | Application | Minimum Version | | ---: | ---: | -| [Ansible](https://www.ansible.com/) | Core 2.13.4 | -| [Terraform](https://www.terraform.io/) | 1.4.5 | +| [Ansible](https://www.ansible.com/) | Core 2.15.6 | +| [Terraform](https://www.terraform.io/) | 1.6.3 | | [Docker](https://www.docker.com/) | 20.10.17 | -| [Helm](https://helm.sh/) | 3.12.0 | +| [Helm](https://helm.sh/) | 3.13.2 | diff --git a/requirements.txt b/requirements.txt index 8f3de7e..3f69aa8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # # Reference : pypi.org # -ansible==8.0.0 # 6.4.0 # 5.5.0 # 2.10.7 +ansible==8.6.0 # 8.0.0 # 6.4.0 # 5.5.0 # 2.10.7 openshift==0.13.1 # 0.12.0 kubernetes==26.1.0 # 24.2.0 # 23.3.0 # 12.0.1 dnspython==2.3.0 # 2.2.1 # 2.1.0 diff --git a/roles/kubernetes/common/defaults/main.yaml b/roles/kubernetes/common/defaults/main.yaml index 40b3b4e..2daaa94 100644 --- a/roles/kubernetes/common/defaults/main.yaml +++ b/roles/kubernetes/common/defaults/main.yaml @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -helm_version: 3.12.0 +helm_version: 3.13.2 diff --git a/versions.tf b/versions.tf index 67f30f2..b56bbbd 100644 --- a/versions.tf +++ b/versions.tf @@ -6,11 +6,11 @@ terraform { required_providers { vsphere = { source = "hashicorp/vsphere" - version = ">= 2.2.0" + version = "2.5.1" } local = { source = "hashicorp/local" - version = ">= 2.2.3" + version = "2.4.0" } } } From 01286418e0c3e48ee5c7a1ebda745e0910ee7e8e Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:58:35 -0500 Subject: [PATCH 3/5] docs: (IAC-1206) Update SAS Documentation URLs (#94) --- README.md | 4 ++-- docs/CONFIG-VARS.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 521f881..cb44c4d 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ This project helps you to automate the cluster-provisioning phase of SAS Viya pl [Architecture Diagram](./docs/images/viya4-iac-k8s-diag.png?raw=true) -To learn about all phases and options of the SAS Viya platform deployment process, see [Getting Started with SAS Viya and Open Source Kubernetes](https://go.documentation.sas.com/doc/en/itopscdc/default/itopscon/p1qungdpndaksyn156ng6duptma0.htm?fromDefault=) in _SAS® Viya® Platform Operations_. +To learn about all phases and options of the SAS Viya platform deployment process, see [Getting Started with SAS Viya and Open Source Kubernetes](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopscon&docsetTarget=p1qungdpndaksyn156ng6duptma0.htm) in _SAS® Viya® Platform Operations_. -Once the resources are provisioned, use the [viya4-deployment](https://github.com/sassoftware/viya4-deployment) project to deploy SAS Viya platform in your cloud environment. For more information about SAS Viya platform requirements and documentation for the deployment process, refer to [SAS Viya Platform Operations](https://go.documentation.sas.com/doc/en/itopscdc/default/itopswn/titlepage.htm). +Once the resources are provisioned, use the [viya4-deployment](https://github.com/sassoftware/viya4-deployment) project to deploy SAS Viya platform in your cloud environment. For more information about SAS Viya platform requirements and documentation for the deployment process, refer to [SAS Viya Platform Operations](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopswn&docsetTarget=titlepage.htm). This project supports infrastructure that is built on **physical machines** ("bare metal" machines or Linux VMs) or on **VMware vSphere or vCenter** machines. If you need to create a cluster in [AWS](https://github.com/sassoftware/viya4-iac-aws), [Microsoft Azure](https://github.com/sassoftware/viya4-iac-azure/), or [GCP](https://github.com/sassoftware/viya4-iac-gcp/), use the appropriate SAS Viya IaC repository to perform the associated tasks. diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md index 1adcff1..66cb930 100644 --- a/docs/CONFIG-VARS.md +++ b/docs/CONFIG-VARS.md @@ -69,7 +69,7 @@ Terraform input variables can be set in the following ways: | Name | Description | Type | Default | Notes | | :--- | :--- | :--- | :--- | :--- | -| cluster_version | Kubernetes version | string | "1.26.7" | Valid values are listed here: [SAS Viya platform Supported Kubernetes Versions](https://go.documentation.sas.com/doc/en/itopscdc/default/itopssr/n1ika6zxghgsoqn1mq4bck9dx695.htm#p03v0o4maa8oidn1awe0w4xlxcf6). | +| cluster_version | Kubernetes version | string | "1.26.7" | Valid values are listed here: [SAS Viya platform Supported Kubernetes Versions](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=n1ika6zxghgsoqn1mq4bck9dx695.htm#p03v0o4maa8oidn1awe0w4xlxcf6). | | cluster_cni | Kubernetes container network interface (CNI) | string | "calico" | | | cluster_cni_version | Kubernetes Container Network Interface (CNI) Version | string | "3.24.5" | | | cluster_cri | Kubernetes container runtime interface (CRI) | string | "containerd" | | @@ -297,7 +297,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para | server_memory | Memory in MB | number | 16385 | | | server_disk_size | Size of disk in GB | number | 250 | | | server_ip | Static IP address for PostgreSQL server | string | | This is a required field. | -| server_version | The version of the PostgreSQL server | string | "13" | Refer to the [SAS Viya platform System Requirements](https://go.documentation.sas.com/doc/en/sasadmincdc/default/itopssr/p05lfgkwib3zxbn1t6nyihexp12n.htm?fromDefault=#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. | +| server_version | The version of the PostgreSQL server | string | "13" | Refer to the [SAS Viya platform System Requirements](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. | | server_ssl | Enable/disable SSL | string | "off" | | | server_ssl_cert_file | Path to the PostgreSQL SSL certificate file | string | "" | If `server_ssl` is enabled and this variable is not defined, the system default SSL certificate is used. | | server_ssl_key_file | Path to the PostgreSQL SSL key file | string | "" | If `server_ssl` is enabled and this variable is not defined, the system default SSL key is used. | @@ -311,7 +311,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para - The Ansible tasks that are performed include copying the certificate and key from the PostgreSQL VM into your local workspace directory. 2. If you are planning to use the [viya4-deployment repository](https://github.com/sassoftware/viya4-deployment) to perform a SAS Viya platform deployment where you have [full-stack TLS](https://github.com/sassoftware/viya4-deployment/blob/main/docs/CONFIG-VARS.md#tls) configured, make sure that the `V4_CFG_TLS_TRUSTED_CA_CERTS` variable in the viya4-deployment ansible-vars.yaml file points to a directory that contains the server_ssl_cert_file. -Multiple SAS offerings require a second PostgreSQL instance referred to as SAS Common Data Store, or CDS PostgreSQL. For more information, see [Common Customizations](https://go.documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=dplyml0phy0dkr&docsetTarget=n08u2yg8tdkb4jn18u8zsi6yfv3d.htm#p0wkxxi9s38zbzn19ukjjaxsc0kl). A list of SAS offerings that require CDS PostgreSQL is provided in [SAS Common Data Store Requirements](https://go.documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#n03wzanutmc6gon1val5fykas9aa). To create and configure an external CDS PostgreSQL instance in addition to the external platform PostgreSQL instance named `default`, specify `cds-postgres` as a second PostgreSQL instance, as shown in the example below. +Multiple SAS offerings require a second PostgreSQL instance referred to as SAS Common Data Store, or CDS PostgreSQL. For more information, see [Common Customizations](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=dplyml0phy0dkr&docsetTarget=n08u2yg8tdkb4jn18u8zsi6yfv3d.htm#p0wkxxi9s38zbzn19ukjjaxsc0kl). A list of SAS offerings that require CDS PostgreSQL is provided in [SAS Common Data Store Requirements](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#n03wzanutmc6gon1val5fykas9aa). To create and configure an external CDS PostgreSQL instance in addition to the external platform PostgreSQL instance named `default`, specify `cds-postgres` as a second PostgreSQL instance, as shown in the example below. Here is an example of the `postgres_servers` variable with the `default` server entry overriding only the `administrator_password` parameter and the `cds-postgres` entry overriding all the parameters: @@ -433,14 +433,14 @@ The following variables are used to describe the machine targets for the SAS Viy | Name | Description | Type | Notes | |:---|---:|---:|---:| | postgres_server_name | Name of the PostgreSQL server | string | | -| postgres_server_version | The version of the PostgreSQL server | string | Refer to the [SAS Viya Platform Administration Guide](https://go.documentation.sas.com/doc/en/sasadmincdc/default/itopssr/p05lfgkwib3zxbn1t6nyihexp12n.htm?fromDefault=#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. | +| postgres_server_version | The version of the PostgreSQL server | string | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. | | postgres_server_ssl | Enable/disable SSL | string | Specify `off` or `on` | | postgres_server_ssl_cert_file | Path to the PostgreSQL SSL certificate file | string | If `postgres_server_ssl` is enabled and this variable is not defined, the system default SSL certificate is used. | | postgres_server_ssl_key_file | Path to the PostgreSQL SSL key file | string | If `postgres_server_ssl` is enabled and this variable is not defined, the system default SSL key is used. | | postgres_administrator_login | PostgreSQL admin user | string | | | postgres_administrator_password | PostgreSQL admin password | string | | -| postgres_system_setting_max_prepared_transactions | Allows you to configure the `max_prepared_transactions` setting for your PostgreSQL Server | string | If not defined in your inventory file, the value 1024 will automatically be configured as per the [SAS Viya Platform PG tuning requirements](https://go.documentation.sas.com/doc/en/sasadmincdc/default/caltuning/n0adso3frm5ioxn1s2kwa4vbm9db.htm#n03n7868gd4m83n1azbziv4hiozb) | -| postgres_system_setting_max_connections | Allows you to configure the `max_connections` setting for your PostgreSQL Server | string | If not defined in your inventory file, the value 1024 will automatically be configured as per the [SAS Viya Platform PG tuning requirements](https://go.documentation.sas.com/doc/en/sasadmincdc/default/caltuning/n0adso3frm5ioxn1s2kwa4vbm9db.htm#n03n7868gd4m83n1azbziv4hiozb) | +| postgres_system_setting_max_prepared_transactions | Allows you to configure the `max_prepared_transactions` setting for your PostgreSQL Server | string | If not defined in your inventory file, the value 1024 will automatically be configured as per the [SAS Viya Platform PG tuning requirements](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=caltuning&docsetTarget=n0adso3frm5ioxn1s2kwa4vbm9db.htm#n03n7868gd4m83n1azbziv4hiozb) | +| postgres_system_setting_max_connections | Allows you to configure the `max_connections` setting for your PostgreSQL Server | string | If not defined in your inventory file, the value 1024 will automatically be configured as per the [SAS Viya Platform PG tuning requirements](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=caltuning&docsetTarget=n0adso3frm5ioxn1s2kwa4vbm9db.htm#n03n7868gd4m83n1azbziv4hiozb) | ## Storage From 4c41981a9be0aab7579a15c7eb659c96f8270e35 Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:59:17 -0500 Subject: [PATCH 4/5] docs: (IAC-1222) Remove CR Variables from Example Files (#95) --- TODO.md | 2 ++ docs/REQUIREMENTS.md | 10 ---------- examples/bare-metal/sample-ansible-vars.yaml | 3 --- examples/bare-metal/sample-inventory | 12 ------------ .../bare-metal/sample-inventory-internal-postgres | 12 ------------ examples/vsphere/sample-terraform-dhcp.tfvars | 7 ------- examples/vsphere/sample-terraform-minimal.tfvars | 7 ------- examples/vsphere/sample-terraform-static-ips.tfvars | 7 ------- .../sample-terraform-static-singlestore.tfvars | 7 ------- examples/vsphere/sample-terraform-vi.tfvars | 7 ------- variables.tf | 2 +- 11 files changed, 3 insertions(+), 73 deletions(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..6aa69ec --- /dev/null +++ b/TODO.md @@ -0,0 +1,2 @@ +## Complete Container Registry Setup +- Make updates to the `/systems/container_registry` role to fully set up a Harbor Registry for a user. \ No newline at end of file diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index e09b5b5..f184553 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -367,13 +367,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "10.18.0.12" # Assigned values for static IPs -# Container Registry -create_cr = false # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "10.18.0.13" # Assigned values for static IPs - # PostgreSQL server # # Suggested server specs shown below. @@ -634,9 +627,6 @@ jump_ip : "" # NFS Server nfs_ip : "" -# Container Registry -cr_ip : "" - # PostgreSQL Servers ``` diff --git a/examples/bare-metal/sample-ansible-vars.yaml b/examples/bare-metal/sample-ansible-vars.yaml index cc479b6..0480c7b 100644 --- a/examples/bare-metal/sample-ansible-vars.yaml +++ b/examples/bare-metal/sample-ansible-vars.yaml @@ -141,6 +141,3 @@ jump_ip : "" # NFS Server nfs_ip : "" - -# Container Registry -cr_ip : "" diff --git a/examples/bare-metal/sample-inventory b/examples/bare-metal/sample-inventory index 757c846..dd0897f 100644 --- a/examples/bare-metal/sample-inventory +++ b/examples/bare-metal/sample-inventory @@ -49,18 +49,6 @@ FIXME - ENTER YOUR NFS SERVER IP/FQDN HERE! [nfs:children] nfs_server -# -# Container Registry -# -[cr_server] -FIXME - ENTER YOUR CR SERVER IP/FQDN HERE! - -# -# Container Registry - alias - DO NOT MODIFY -# -[cr:children] -cr_server - # # Postgres Servers # diff --git a/examples/bare-metal/sample-inventory-internal-postgres b/examples/bare-metal/sample-inventory-internal-postgres index 64a98e9..696eaeb 100644 --- a/examples/bare-metal/sample-inventory-internal-postgres +++ b/examples/bare-metal/sample-inventory-internal-postgres @@ -53,18 +53,6 @@ FIXME - ENTER YOUR NFS SERVER IP/FQDN HERE! [nfs:children] nfs_server -# -# Container Registry -# -[cr_server] -FIXME - ENTER YOUR CR SERVER IP/FQDN HERE! - -# -# Container Registry - alias - DO NOT MODIFY -# -[cr:children] -cr_server - # # All systems # diff --git a/examples/vsphere/sample-terraform-dhcp.tfvars b/examples/vsphere/sample-terraform-dhcp.tfvars index f32981f..fdbdee5 100644 --- a/examples/vsphere/sample-terraform-dhcp.tfvars +++ b/examples/vsphere/sample-terraform-dhcp.tfvars @@ -189,13 +189,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "" # Assigned values for static IPs -# Container Registry -create_cr = false # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "" # Assigned values for static IPs - # Postgres Servers postgres_servers = { default = { diff --git a/examples/vsphere/sample-terraform-minimal.tfvars b/examples/vsphere/sample-terraform-minimal.tfvars index 01f93c3..29f0ff0 100644 --- a/examples/vsphere/sample-terraform-minimal.tfvars +++ b/examples/vsphere/sample-terraform-minimal.tfvars @@ -151,13 +151,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "" # Assigned values for static IPs -# Container Registry -create_cr = false # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "" # Assigned values for static IPs - # Postgres Servers postgres_servers = { default = { diff --git a/examples/vsphere/sample-terraform-static-ips.tfvars b/examples/vsphere/sample-terraform-static-ips.tfvars index d0c1e68..156a911 100644 --- a/examples/vsphere/sample-terraform-static-ips.tfvars +++ b/examples/vsphere/sample-terraform-static-ips.tfvars @@ -190,13 +190,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "" # Assigned values for static IPs -# Container Registry -create_cr = true # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "" # Assigned values for static IPs - # Postgres Servers postgres_servers = { default = { diff --git a/examples/vsphere/sample-terraform-static-singlestore.tfvars b/examples/vsphere/sample-terraform-static-singlestore.tfvars index ca48535..9fe6bdc 100644 --- a/examples/vsphere/sample-terraform-static-singlestore.tfvars +++ b/examples/vsphere/sample-terraform-static-singlestore.tfvars @@ -216,13 +216,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "" # Assigned values for static IPs -# Container Registry -create_cr = false # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "" # Assigned values for static IPs - # Postgres Servers postgres_servers = { default = { diff --git a/examples/vsphere/sample-terraform-vi.tfvars b/examples/vsphere/sample-terraform-vi.tfvars index ee4fb55..c26ee69 100644 --- a/examples/vsphere/sample-terraform-vi.tfvars +++ b/examples/vsphere/sample-terraform-vi.tfvars @@ -143,13 +143,6 @@ nfs_memory = 16384 # 16 GB nfs_disk_size = 500 # 500 GB nfs_ip = "" # Assigned values for static IPs -# Container Registry -create_cr = false # Creation flag -cr_num_cpu = 4 # 4 CPUs -cr_memory = 8092 # 8 GB -cr_disk_size = 250 # 250 GB -cr_ip = "" # Assigned values for static IPs - # Postgres Servers postgres_servers = { default = { diff --git a/variables.tf b/variables.tf index 12cea8c..e56957c 100644 --- a/variables.tf +++ b/variables.tf @@ -212,7 +212,7 @@ variable "nfs_disk_size" { default = 250 } -# container registry +# container registry - TODO variable "create_cr" { type = bool default = false From 53740e3c4daa7612f1cd1083af2f9d69c7daf6a4 Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:05:52 -0500 Subject: [PATCH 5/5] feat: (IAC-1201) Move all postgres setup over to systems-install (#93) --- playbooks/kubernetes-install.yaml | 17 ----------------- playbooks/systems-install.yaml | 19 ++++++++++++++++++- .../alter_server_settings/defaults/main.yaml | 0 .../alter_server_settings/tasks/main.yaml | 0 .../postgres/create_databases/tasks/main.yaml | 0 .../postgres/{ => install}/defaults/main.yaml | 0 .../postgres/{ => install}/tasks/main.yaml | 0 .../postgres/restart_server/tasks/main.yaml | 0 8 files changed, 18 insertions(+), 18 deletions(-) rename roles/{kubernetes/database => systems}/postgres/alter_server_settings/defaults/main.yaml (100%) rename roles/{kubernetes/database => systems}/postgres/alter_server_settings/tasks/main.yaml (100%) rename roles/{kubernetes/database => systems}/postgres/create_databases/tasks/main.yaml (100%) rename roles/systems/postgres/{ => install}/defaults/main.yaml (100%) rename roles/systems/postgres/{ => install}/tasks/main.yaml (100%) rename roles/{kubernetes/database => systems}/postgres/restart_server/tasks/main.yaml (100%) diff --git a/playbooks/kubernetes-install.yaml b/playbooks/kubernetes-install.yaml index 80b40f9..3de2356 100644 --- a/playbooks/kubernetes-install.yaml +++ b/playbooks/kubernetes-install.yaml @@ -74,23 +74,6 @@ roles: - { role: kubernetes/node/labels_taints } -# Alter PostgreSQL server and add PostgreSQL databases -- hosts: postgres - name: Postgres Setup - Configuration - become: true - become_user: postgres - roles: - - { role: kubernetes/database/postgres/alter_server_settings } - - { role: kubernetes/database/postgres/create_databases } - -# Restart PostgreSQL server -- hosts: postgres - name: Postgres Setup - Restart - become: true - become_user: root - roles: - - { role: kubernetes/database/postgres/restart_server } - # Setup default storage class for cluster - hosts: localhost name: Default Storage Class Setup diff --git a/playbooks/systems-install.yaml b/playbooks/systems-install.yaml index a1b2f4e..8084145 100644 --- a/playbooks/systems-install.yaml +++ b/playbooks/systems-install.yaml @@ -33,7 +33,24 @@ become: true become_user: root roles: - - { role: systems/postgres } + - { role: systems/postgres/install } + +# Alter PostgreSQL server and add PostgreSQL databases +- hosts: postgres + name: Postgres Setup - Configuration + become: true + become_user: postgres + roles: + - { role: systems/postgres/alter_server_settings } + - { role: systems/postgres/create_databases } + +# Restart PostgreSQL server +- hosts: postgres + name: Postgres Setup - Restart + become: true + become_user: root + roles: + - { role: systems/postgres/restart_server } # Container Registry Server - hosts: cr diff --git a/roles/kubernetes/database/postgres/alter_server_settings/defaults/main.yaml b/roles/systems/postgres/alter_server_settings/defaults/main.yaml similarity index 100% rename from roles/kubernetes/database/postgres/alter_server_settings/defaults/main.yaml rename to roles/systems/postgres/alter_server_settings/defaults/main.yaml diff --git a/roles/kubernetes/database/postgres/alter_server_settings/tasks/main.yaml b/roles/systems/postgres/alter_server_settings/tasks/main.yaml similarity index 100% rename from roles/kubernetes/database/postgres/alter_server_settings/tasks/main.yaml rename to roles/systems/postgres/alter_server_settings/tasks/main.yaml diff --git a/roles/kubernetes/database/postgres/create_databases/tasks/main.yaml b/roles/systems/postgres/create_databases/tasks/main.yaml similarity index 100% rename from roles/kubernetes/database/postgres/create_databases/tasks/main.yaml rename to roles/systems/postgres/create_databases/tasks/main.yaml diff --git a/roles/systems/postgres/defaults/main.yaml b/roles/systems/postgres/install/defaults/main.yaml similarity index 100% rename from roles/systems/postgres/defaults/main.yaml rename to roles/systems/postgres/install/defaults/main.yaml diff --git a/roles/systems/postgres/tasks/main.yaml b/roles/systems/postgres/install/tasks/main.yaml similarity index 100% rename from roles/systems/postgres/tasks/main.yaml rename to roles/systems/postgres/install/tasks/main.yaml diff --git a/roles/kubernetes/database/postgres/restart_server/tasks/main.yaml b/roles/systems/postgres/restart_server/tasks/main.yaml similarity index 100% rename from roles/kubernetes/database/postgres/restart_server/tasks/main.yaml rename to roles/systems/postgres/restart_server/tasks/main.yaml