sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
70 stars 64 forks source link

feat: (IAC-1014) Add Ability to Generate the site.yaml file #448

Closed jarpat closed 1 year ago

jarpat commented 1 year ago

Changes

Experimental: Adds the ability to generate the site.yaml for kubernetes commands based deployments.

To generate the site.yaml, you must first the opt to use the sas-orchestration deploy deployment method by setting our existing variable, V4_DEPLOYMENT_OPERATOR_ENABLED:false in your ansible-vars.yaml. Additionally, you must set the V4_SAS_ORCHESTRATION_USE_SITE_YAML:true variable in your ansible-vars.yaml to enable the site.yaml generation.

NOTE: At this point in time we are ONLY generating the site.yaml file so a user could potentially perform a deployment using the "kubernetes commands" method. Changes are planned to make use of the site.yaml later.

Tests

Scenario Provider K8s Version Deployment Method Order Cadence DEPLOY V4_DEPLOYMENT_OPERATOR_ENABLED V4_SAS_ORCHESTRATION_USE_SITE_YAML MT Tasks Notes
1 GCP v1.26.4-gke.500 Docker * fast:2020 true false true n/a site.yaml generated
2 GCP v1.26.4-gke.500 Ansible * fast:2020 true false true n/a site.yaml generated
3 GCP v1.26.4-gke.500 Docker * fast:2020 true false false n/a site.yaml not generated since V4_SAS_ORCHESTRATION_USE_SITE_YAML:false
4 GCP v1.26.4-gke.500 Docker * fast:2020 true true true n/a site.yaml not generated since user opted to use DO with V4_DEPLOYMENT_OPERATOR_ENABLED:true
5 GCP v1.26.4-gke.500 Ansible * fast:2020 true false true onboard,cas-onboard site.yaml regenerated after tenant resources added to kustomization.yaml
6 GCP v1.26.4-gke.500 Docker * fast:2020 false false false n/a Nothing was deployed into the cluster, mimics the workflow a user would take if they wanted to perform the kubernetes commands themselves
jarpat commented 1 year ago

Same tests table as above, putting a markdown table in the comments vs the PR description doesn't have a word wrap issue and uses a scroll bar instead.

Scenario Provider K8s Version Deployment Method Order Cadence DEPLOY V4_DEPLOYMENT_OPERATOR_ENABLED V4_SAS_ORCHESTRATION_USE_SITE_YAML MT Tasks Notes
1 GCP v1.26.4-gke.500 Docker 0B2F9L fast:2020 true false true n/a site.yaml generated
2 GCP v1.26.4-gke.500 Ansible 0B2F9L fast:2020 true false true n/a site.yaml generated
3 GCP v1.26.4-gke.500 Docker 0B2F9L fast:2020 true false false n/a site.yaml not generated since V4_SAS_ORCHESTRATION_USE_SITE_YAML:false
4 GCP v1.26.4-gke.500 Docker 0B2F9L fast:2020 true true true n/a site.yaml not generated since user opted to use DO with V4_DEPLOYMENT_OPERATOR_ENABLED:true
5 GCP v1.26.4-gke.500 Ansible 0B2F9L fast:2020 true false true onboard,cas-onboard site.yaml regenerated after tenant resources added to kustomization.yaml
6 GCP v1.26.4-gke.500 Docker 0B2F9L fast:2020 false false false n/a Nothing was deployed into the cluster, mimics the workflow a user would take if they wanted to perform the kubernetes commands themselves
jarpat commented 1 year ago

Closing this since I'm reworking the code. This is an experimental orchestration feature so it will exist in a dev branch and will be released once fully internally tested.