From 2de5a1d1b486011c1218a6d1579a15ffa042fa3d Mon Sep 17 00:00:00 2001 From: Ritika Patil Date: Wed, 16 Aug 2023 14:29:04 -0500 Subject: [PATCH] feat: (IAC-1108) Update Multi-tenancy.md document to indicate the updates --- docs/user/Multi-Tenancy.md | 16 ++++++++++++---- roles/multi-tenancy/defaults/main.yml | 10 ++++++++++ .../multi-tenancy/tasks/multi-tenant-setup.yaml | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/user/Multi-Tenancy.md b/docs/user/Multi-Tenancy.md index ce1780f0..b12aeaf9 100644 --- a/docs/user/Multi-Tenancy.md +++ b/docs/user/Multi-Tenancy.md @@ -106,12 +106,19 @@ Step 3. Onboard tenants. Run the following command: -e JUMP_SVR_PRIVATE_KEY=$HOME/.ssh/id_rsa \ playbooks/playbook.yaml --tags "multi-tenancy,onboard" ``` -**Note:** As part of setup in the above `Onboard tenants` step, for every onboarded tenant, +**Notes:** +- As part of the setup in the above `Onboard tenants` step, for every onboarded tenant, -- A CAS server directory containing the configuration artifacts is created under the `/site-config` folder. -For example,if you have tenant with the ID `acme`, then a CAS server directory named `cas-acme-default` will be created. + >- A CAS server directory containing the configuration artifacts is created under the `/site-config` folder. +For example, if you have tenant with the ID `acme`, then a CAS server directory named `cas-acme-default` will be created. + > + >- Starting with SAS Viya Platform cadence 2023.03, each tenant will require their own copy of certain Kubernetes resources. Hence a new directory for each tenant containing all the `sas-programming-environment` files will be created under `$deploy/site-config/multi-tenant/`. For example, if you have a tenant with the ID `acme`, then a directory named `$deploy/site-config/multi-tenant/acme` will be created. + > + >- The base `kustomization.yaml` file will be updated to add a reference to the tenant directories in the resources block. And the changes will be applied to create the tenant-specific resources before running the `sas-tenant-onboard` job. A short delay is introduced here to allow the apply commands to finish. -- Starting with SAS Viya Platform cadence 2023.03, each tenant will require their own copy of certain Kubernetes resources. Hence a new directory for each tenant containing all the `sas-programming-environment` files will be created under `$deploy/site-config/multi-tenant/`. For example, if you have a tenant with the ID `acme`, then a directory named `$deploy/site-config/multi-tenant/acme` will be created. +- Starting with SAS Viya Platform cadence 2023.07, the `sas-tenant-onboard-job` continues to run until the conclusion of the rolling restart of all SAS Viya services. The `Onboard tenants` command run above does not wait for the conclusion of the rolling restart of all SAS Viya services. The action concludes after the `sas-tenant-onboard-job` has reached `Running` state. User should continue to monitor the status of `sas-tenant-onboard-job` manually. + +- It is recommended that User proceeds with the `cas-onboard` command below if it was not applied together with the `multi-tenancy,onboard` action. Step 4. Add or update CAS customizations for tenants as needed and then run following command to onboard the CAS servers: @@ -128,6 +135,7 @@ Step 4. Add or update CAS customizations for tenants as needed and then run foll **Note:** - If there are no additional CAS customizations required for tenants then run 'onboard' and 'cas-onboard' tags together in Step 3 and skip Step 4. - The tenant CAS servers might take several mins to stabilize after the cas-onboard command above has completed successfully. +- The successful conclusion of the `sas-tenant-onboard-job` is a clear indication that administrators can sign on to the new tenant, or run another instance of the sas-tenant-job. ## Log In and Validate an Onboarded Tenant After the onboard and cas-onboard steps are complete see the steps [here](https://go.documentation.sas.com/doc/en/itopscdc/default/caltenants/p0emzq13c0zbhxn1hktsdlmig934.htm#n05u0e3vmr5lcqn1l5xa2rhkdu6x) to login and validate an onboarded tenant. diff --git a/roles/multi-tenancy/defaults/main.yml b/roles/multi-tenancy/defaults/main.yml index e6c8f2c5..b5f81c13 100644 --- a/roles/multi-tenancy/defaults/main.yml +++ b/roles/multi-tenancy/defaults/main.yml @@ -11,6 +11,16 @@ V4_CFG_CR_HOST: '{{ V4_CFG_CR_URL | regex_replace("^https?:\/\/(.*)\/?", "\1") } V4_CFG_CR_USER: null V4_CFG_CR_PASSWORD: null +# Deployment Operator +V4_DEPLOYMENT_OPERATOR_ENABLED: true +V4_DEPLOYMENT_OPERATOR_SCOPE: cluster +V4_DEPLOYMENT_OPERATOR_NAMESPACE: sasoperator +V4_DEPLOYMENT_OPERATOR_CRB: sasoperator + +## Below the line deployment -- internal use only +## Setting true enables using custom du for below the line testing +V4_CFG_BELOW_THE_LINE: false + # Multi-tenant is enabled within SAS Viya deployment V4MT_ENABLE: false diff --git a/roles/multi-tenancy/tasks/multi-tenant-setup.yaml b/roles/multi-tenancy/tasks/multi-tenant-setup.yaml index 6f835b88..33dce2ff 100644 --- a/roles/multi-tenancy/tasks/multi-tenant-setup.yaml +++ b/roles/multi-tenancy/tasks/multi-tenant-setup.yaml @@ -188,6 +188,7 @@ - V4_CFG_CADENCE_VERSION is version('2023.03', ">=") or V4_CFG_CADENCE_NAME|lower == "fast" tags: - onboard + - offboard - name: Add env variable for pod templates in sas-tenant-job lineinfile: