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
71 stars 64 forks source link

feat: (IAC-552) (IAC-664) Integrate with the Deployment Operator and Orchestration tooling for SAS Viya deployments #276

Closed jarpat closed 2 years ago

jarpat commented 2 years ago

Changes

Adds support for the sas-orchestration cli and deployment operator

Tests

See the internal tickets for additional details and artifacts.

IAC-552

Non-MT Scenarios

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_PRESERVE Install Successful Deployment Stabilized Uninstall Successful
1 v1.23.8 Azure * Fast:2020 Ansible FALSE N/A N/A Yes Yes Yes
2 v1.23.8 Azure * Stable:2022.1.2 Docker FALSE N/A N/A Yes Yes Yes
3 v1.21.14-gke.2100 GCP * LTS:2021.1 Ansible FALSE N/A N/A Yes Yes Yes
4 v1.21.14-gke.2100 GCP * Fast:2020 Docker FALSE N/A N/A Yes Yes Yes

Extra # 1

GCP with an external postgres database to test out the updated gcloud version. We are not setting the V4_CFG_CR_USER, V4_CFG_CR_PASSWORD, & V4_CFG_CR_URL values to ensure that the playbook sources the correct credentials and is able to pull/download the sas-orchestration image.

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_PRESERVE Install Successful Deployment Stabilized Uninstall Successful
Extra # 1 1.22.10-gke.600 GCP * Stable:2022.1.3 Docker FALSE N/A N/A Yes Yes Yes

MT Scenarios

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_PRESERVE Install Successful Deployment Stabilized Tenant & CAS Onboard Successful Offboard Successful Uninstall Successful
1 v1.23.8 Azure * Fast:2020 Docker FALSE n/a n/a Yes Yes yes (separately) Yes Yes
2 v1.22.10-gke.600 GCP * Fast:2020 Ansible FALSE n/a n/a Yes Yes yes (simultaneously) Yes Yes

IAC-664

Non-MT Scenarios

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_SCOPE V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_CRB Install Successful Deployment Stabilized Uninstall Successful
1 v1.23.8-gke.1900 GCP * Fast:2020 Ansible TRUE cluster sasoperator (default) sasoperator (default) yes yes yes
2 v1.23.8-gke.1900 GCP * Stable:2022.1.4 Docker TRUE namespace N/A sasoperatortestcrb yes yes yes
3 v1.21.14 Azure * LTS:2021.1 Ansible TRUE cluster sasoperator (default) sasoperator (default) yes yes yes

Extra # 1

This was an additional scenario appended on top of scenario 1 above. While using cluster-mode I performed a second deployment into the cluster so that there were 2 active Viya deployments being managed by the deployment operator. I verified that both were in a stable condition. When I performed the "uninstall" task I verified the deployment operator deletion logic. We essentially check that there exist no other Viya deployments in the cluster that is utilizing the deployment operator, if there is we skip the operator deletion, if there isn't then we do.

Message when deployment operator deletion is skipped: "A SAS Viya deployment that relies on the Deployment Operator still exists in cluster in the following namespaces: deploy. Skipping Deployment Operator deletion"

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_SCOPE V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_CRB Install Successful Deployment Stabilized Uninstall Successful
Extra # 1 v1.23.8-gke.1900 GCP * Fast:2020 Ansible TRUE cluster sasoperator (default) sasoperator (default) yes yes yes

MT Scenarios

Scenario K8s Version Provider Order Cadence Deployment Method V4_DEPLOYMENT_OPERATOR_ENABLED V4_DEPLOYMENT_OPERATOR_NAMESPACE V4_DEPLOYMENT_OPERATOR_PRESERVE Install Successful Deployment Stabilized Tenant & CAS Onboard Successful Offboard Successful Uninstall Successful
1 v1.23.8 Azure * Fast:2020 Ansible TRUE sasoperatortestns sasoperatortestcrb Yes Yes yes (simultaneously) Yes Yes
thpang commented 2 years ago

ok where are all the comments? I know this is a new branch, but having this in place of a working review is not what was expected. The note for branch vs fork was for the next time.

thpang commented 2 years ago

Once you answered the questions on the previous PR. I'll review.

thpang commented 2 years ago

LGTM, conflicts need to be resolved.

jarpat commented 2 years ago

Minor improvement while I revisiting this change to test kustomization generation.

See diff https://github.com/sassoftware/viya4-deployment/pull/276/commits/e0b337d566a1f396898064d0237402e5fbc0fbc8 Whenever the orchestration containers are spawned give them unique names in case a user is doing concurrent deployments on one machine.

jarpat commented 2 years ago

The latest commit, f1a6708, was to resolve merge conflicts into staging after the doc changes from PR #297 were merged into this branch.

jarpat commented 2 years ago

Last was to add some doc stating that Docker is required when running DaC with ansible directly on your workstation. Also resolved doc conflicts after other PRs were merged.

jarpat commented 2 years ago

Fixed merge conflicts after latest release 5.5.0

jarpat commented 2 years ago

Reopening, this was automatically closed.

jarpat commented 2 years ago

Fixed merge conflicts after latest release 5.6.0.