# sassoftware/viya4-deployment architecture

> Architecture diagram of the GitHub repository sassoftware/viya4-deployment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sassoftware/viya4-deployment
- Repository: https://github.com/sassoftware/viya4-deployment

## Overview

This Ansible project prepares an existing Kubernetes environment, assembles a SAS Viya deployment manifest, and deploys it. The primary workflow starts with operator-supplied deployment inputs, proceeds through cluster preparation and deployment configuration, then applies the platform to Kubernetes. Separate capabilities cover multi-tenancy, multi-zone distribution, and SingleStore. The graph reflects README-documented capabilities and source paths in the tree; sampled source is limited to three helper modules, so internal role-to-role calls are not asserted.

Main entry points: [`roles/vdm/tasks/main.yaml`](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/main.yaml) (Viya deployment workflow), [`playbooks/playbook.yaml`](https://github.com/sassoftware/viya4-deployment/blob/main/playbooks/playbook.yaml) (Deployment playbook), [`roles/baseline/tasks/main.yaml`](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/main.yaml) (Cluster baseline), [`roles/vdm/tasks/deploy.yaml`](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/deploy.yaml) (Kubernetes deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Deployment entry"]
  node_playbook["Deployment playbook<br/>[playbook.yaml]"]
end

subgraph group_cluster["Cluster preparation"]
  node_baseline["Cluster baseline<br/>[main.yaml]"]
  node_ingress["Ingress controller<br/>[contour.yaml]"]
  node_nfs["NFS provisioning"]
  node_storage["Storage classes"]
  node_certs["Certificate management<br/>[cert-manager.yaml]"]
end

subgraph group_viya["Viya deployment"]
  node_vdm["Viya deployment workflow<br/>[main.yaml]"]
  node_assets["Deployment assets<br/>[assets.yaml]"]
  node_kustomize["Manifest generation<br/>[kustomize.yaml]"]
  node_deploy["Kubernetes deployment<br/>[deploy.yaml]"]
  node_postgres["PostgreSQL setup<br/>[postgres.yaml]"]
  node_cas["CAS configuration<br/>[cas.yaml]"]
end

subgraph group_extensions["Deployment extensions"]
  node_multi_tenant["Multi-tenancy<br/>[main.yaml]"]
  node_multi_zone["Multi-zone distribution"]
  node_istio["Istio integration<br/>[main.yml]"]
  node_jump["Jump server management<br/>[main.yml]"]
  node_singlestore["SingleStore deployment<br/>[deploy.yaml]"]
end

subgraph group_helpers["Internal helpers"]
  node_tfstate["Terraform state lookup<br/>[tfstate.py]"]
  node_overlay_scan["Site-config discovery<br/>[siteconfig_info.py]"]
  node_overlay_order["Overlay selection<br/>[overlay_facts.py]"]
end

node_operator(("Operator"))
node_kubernetes[("Kubernetes cluster")]

node_operator -->|"runs"| node_playbook
node_playbook -.->|"prepares cluster"| node_baseline
node_baseline -.->|"configures ingress"| node_ingress
node_baseline -.->|"sets up NFS"| node_nfs
node_baseline -.->|"manages classes"| node_storage
node_baseline -.->|"sets up TLS"| node_certs
node_playbook -.->|"deploys Viya"| node_vdm
node_vdm -->|"retrieves assets"| node_assets
node_vdm -.->|"reads cloud state"| node_tfstate
node_vdm -.->|"discovers overlays"| node_overlay_scan
node_vdm -.->|"selects overlays"| node_overlay_order
node_vdm -->|"generates manifest"| node_kustomize
node_vdm -->|"deploys order"| node_deploy
node_deploy -->|"applies manifests"| node_kubernetes
node_vdm -.->|"configures PostgreSQL"| node_postgres
node_vdm -.->|"configures CAS"| node_cas
node_vdm -.->|"supports tenant setup"| node_multi_tenant
node_vdm -.->|"supports zone distribution"| node_multi_zone
node_playbook -.->|"supports Istio"| node_istio
node_playbook -.->|"manages jump server"| node_jump
node_vdm -.->|"supports deployment"| node_singlestore

click node_playbook "https://github.com/sassoftware/viya4-deployment/blob/main/playbooks/playbook.yaml"
click node_baseline "https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/main.yaml"
click node_ingress "https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/contour.yaml"
click node_nfs "https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/nfs-csi-provisioner.yaml"
click node_storage "https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/storage-classes.yaml"
click node_certs "https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/cert-manager.yaml"
click node_vdm "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/main.yaml"
click node_assets "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/assets.yaml"
click node_tfstate "https://github.com/sassoftware/viya4-deployment/blob/main/roles/common/lookup_plugins/tfstate.py"
click node_overlay_scan "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/library/siteconfig_info.py"
click node_overlay_order "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/library/overlay_facts.py"
click node_kustomize "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/kustomize.yaml"
click node_deploy "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/deploy.yaml"
click node_postgres "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/postgres/postgres.yaml"
click node_cas "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/cas.yaml"
click node_multi_tenant "https://github.com/sassoftware/viya4-deployment/blob/main/roles/multi-tenancy/tasks/main.yaml"
click node_multi_zone "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/multi_zone_distribution.yaml"
click node_istio "https://github.com/sassoftware/viya4-deployment/blob/main/roles/istio/tasks/main.yml"
click node_jump "https://github.com/sassoftware/viya4-deployment/blob/main/roles/jump-server/tasks/main.yml"
click node_singlestore "https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/deploy.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_playbook toneBlue
class node_baseline,node_ingress,node_nfs,node_storage,node_certs,node_kubernetes toneAmber
class node_vdm,node_assets,node_kustomize,node_deploy,node_postgres,node_cas toneMint
class node_multi_tenant,node_multi_zone,node_istio,node_jump,node_singlestore toneRose
class node_tfstate,node_overlay_scan,node_overlay_order,node_operator toneIndigo
```

## Components

### Deployment entry

- [Deployment playbook](https://github.com/sassoftware/viya4-deployment/blob/main/playbooks/playbook.yaml): `playbooks/playbook.yaml`

### Cluster preparation

- [Cluster baseline](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/main.yaml): `roles/baseline/tasks/main.yaml`
- [Ingress controller](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/contour.yaml): `roles/baseline/tasks/contour.yaml`
- [NFS provisioning](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/nfs-csi-provisioner.yaml): `roles/baseline/tasks/nfs-csi-provisioner.yaml`
- [Storage classes](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/storage-classes.yaml): `roles/baseline/tasks/storage-classes.yaml`
- [Certificate management](https://github.com/sassoftware/viya4-deployment/blob/main/roles/baseline/tasks/cert-manager.yaml): `roles/baseline/tasks/cert-manager.yaml`

### Viya deployment

- [Viya deployment workflow](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/main.yaml): `roles/vdm/tasks/main.yaml`
- [Deployment assets](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/assets.yaml): `roles/vdm/tasks/assets.yaml`
- [Manifest generation](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/kustomize.yaml): `roles/vdm/tasks/kustomize.yaml`
- [Kubernetes deployment](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/deploy.yaml): `roles/vdm/tasks/deploy.yaml`
- [PostgreSQL setup](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/postgres/postgres.yaml): `roles/vdm/tasks/postgres/postgres.yaml`
- [CAS configuration](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/cas.yaml): `roles/vdm/tasks/cas.yaml`

### Deployment extensions

- [Multi-tenancy](https://github.com/sassoftware/viya4-deployment/blob/main/roles/multi-tenancy/tasks/main.yaml): `roles/multi-tenancy/tasks/main.yaml`
- [Multi-zone distribution](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/multi_zone_distribution.yaml): `roles/vdm/tasks/multi_zone_distribution.yaml`
- [Istio integration](https://github.com/sassoftware/viya4-deployment/blob/main/roles/istio/tasks/main.yml): `roles/istio/tasks/main.yml`
- [Jump server management](https://github.com/sassoftware/viya4-deployment/blob/main/roles/jump-server/tasks/main.yml): `roles/jump-server/tasks/main.yml`
- [SingleStore deployment](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/deploy.yaml): `roles/vdm/tasks/deploy.yaml`

### Internal helpers

- [Terraform state lookup](https://github.com/sassoftware/viya4-deployment/blob/main/roles/common/lookup_plugins/tfstate.py): `roles/common/lookup_plugins/tfstate.py`
- [Site-config discovery](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/library/siteconfig_info.py): `roles/vdm/library/siteconfig_info.py`
- [Overlay selection](https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/library/overlay_facts.py): `roles/vdm/library/overlay_facts.py`

### Other components

- **Operator**
- **Kubernetes cluster**

## Connections

- Operator → Deployment playbook: runs (evidence: `README.md`)
- Deployment playbook → Cluster baseline: prepares cluster
- Cluster baseline → Ingress controller: configures ingress
- Cluster baseline → NFS provisioning: sets up NFS
- Cluster baseline → Storage classes: manages classes
- Cluster baseline → Certificate management: sets up TLS
- Deployment playbook → Viya deployment workflow: deploys Viya
- Viya deployment workflow → Deployment assets: retrieves assets (evidence: `README.md`)
- Viya deployment workflow → Terraform state lookup: reads cloud state
- Viya deployment workflow → Site-config discovery: discovers overlays
- Viya deployment workflow → Overlay selection: selects overlays
- Viya deployment workflow → Manifest generation: generates manifest (evidence: `README.md`)
- Viya deployment workflow → Kubernetes deployment: deploys order (evidence: `README.md`)
- Kubernetes deployment → Kubernetes cluster: applies manifests (evidence: `README.md`)
- Viya deployment workflow → PostgreSQL setup: configures PostgreSQL
- Viya deployment workflow → CAS configuration: configures CAS
- Viya deployment workflow → Multi-tenancy: supports tenant setup
- Viya deployment workflow → Multi-zone distribution: supports zone distribution
- Deployment playbook → Istio integration: supports Istio
- Deployment playbook → Jump server management: manages jump server
- Viya deployment workflow → SingleStore deployment: supports deployment
