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

Customization for relocating SASWORK is not treated properly #223

Closed sasbxs closed 1 year ago

sasbxs commented 2 years ago

This is further documented in tech support track: https://sirius.na.sas.com/Sirius/GSTS/ShowTrack.aspx?trknum=7613571759

I am trying to ensure that SASWORK is pointing to a hostPath rather than the emptyDir that it points to by default. The approach to this is supposed to be modification of the change-viya-volume-storage-class.yaml file located at: sas-bases/examples/sas-programming-environment/storage. FYI, I'm working from the documentation here: https://go.documentation.sas.com/doc/en/sasadmincdc/v_024/calsrvpgm/n0k315nlna2awln119phkhua1na2.htm on a 2021.2.4 deployment.

When I copy that file into a directory under site-config and modify it for my hostPath, site.yaml will not build. It appears that the VIya 4 Deployment project picks up the customization, but doesn't represent it properly in kustomization.yaml (it's treating a patch as a resource according to tech support).

What appears in kustomization.yaml is:

resources: ...   - site-config/sas-programming-environment/change-viya-volume-storage-class.yaml

But what it should be putting in kustomization.yaml (again, according to tech support) is:

patches:   - path: site-config/change-viya-volume-storage-class.yaml     target:       kind: PodTemplate       labelSelector: "sas.com/template-intent=sas-launcher"

I have been able to work around this (I think), as I have gotten site.yaml to build but I can't attempt applying it until tonight when my environment's users are finished for the day. I'm working around by doing the following:

  1. I moved the change-viya-volume-storage-class.yaml file out of the site-config directory so that it does not get picked up by the ansible job.
  2. I've changed my ansible-vars file so that deploy is set to false.
  3. I've created a bash script that run the ansible playbook, then appends the "patches" block from above to the end of the kustomization.yaml file that ansible has created, and finally rebuilds site.yaml based on this modified kustomization.yaml file.

While I'm optimistic that this approach will work, every customer deployment should be leveraging this patch as the emptyDir default can cause all sorts of problems and it seems like there should be an easier way. Relocating SASWORK should not require re-engineering of the whole deployment process. Is there a different approach I should be taking entirely?

thpang commented 2 years ago

Can you provide errors that are output from that keep the site.yaml from building. Thanks.

sasbxs commented 2 years ago

Thomas,

There is more information on this situation here that includes tech support's analysis of the problem: 7613571759 - Challenges relocating SASWORK on Viya 2021.2.4https://sirius.na.sas.com/Sirius/GSTS/ShowTrack.aspx?trknum=7613571759

The ansible log is available here: file://l10g725/Users/sasbxs/Downloads/Tech_Support_05MAY2022 (these are the same files that correspond to the tech support track) Thank link also contains the kustomization.yaml file that ansible produces as well as a tarball of the deployment directory. I've also just dropped into that location a copy of my current kustomization.yaml file - which builds correctly (manually), and is the product of my inserting the proper patch information after running the ansible playbook.

Please reach out if you have further questions.

Cheers, Brian

From: Thomas S. Pangborn @.> Sent: Thursday, May 19, 2022 9:08 AM To: sassoftware/viya4-deployment @.> Cc: Brian Stratton @.>; Author @.> Subject: Re: [sassoftware/viya4-deployment] Customization for relocating SASWORK is not treated properly (Issue #223)

You don't often get email from @.**@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

EXTERNAL

Can you provide errors that are output from that keep the site.yaml from building. Thanks.

- Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsassoftware%2Fviya4-deployment%2Fissues%2F223%23issuecomment-1131666505&data=05%7C01%7CBrian.Stratton%40sas.com%7Cd9432f4b4e37455183f808da3998928c%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637885624718820338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wGq32LE%2Bp2BuY%2BAhOFoffDqsqINNK3D03ZRtPiTGxHA%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARR6DGNCLZPC4QPAOZ3S5A3VKY4KHANCNFSM5VO5ANCA&data=05%7C01%7CBrian.Stratton%40sas.com%7Cd9432f4b4e37455183f808da3998928c%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637885624718820338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DrpjSy1m9IzeIg3Y6X7V9QMIIO3JaClRMb6LOsyz%2Bzo%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.**@.>>

thpang commented 1 year ago

Closing this one as well. Items was addressed in the support ticket and we'll be revisiting the storage classes for products in a future release of the DAC tooling.