text
stringlengths
26
1.5k
same as the number of CPU cores on the machine. Use the --workers option to set the number of threads. 5Return to “Required Flags” on page 144 for information about the SAS Mirror Manager commands. Consider whether you want to use any of the “Optional Flags” on page 145. Then proceed to “Deploy the Software from the Registry” on page 147 for additional deployment instructions. Create and Populate a Mirror Registry in Google Cloud Platform SAS Mirror Manager requires additional configuration when the target container registry is hosted in GCP. Additional Requirements In order to support Google Cloud Platform as the mirror destination, make sure you have fulfilled the following additional requirements:150 Appendix 1 / (Optional) Using a Mirror Registry
nTo create a mirror registry in GCP, the GCP SDK is required. For instructions to download and install the GCP SDK, see https://cloud.google.com/sdk/docs/ quickstart-linux . nIn order to create a mirror registry in GCP using SAS Mirror Manager on a Windows system, you must have Microsoft PowerShell. Create the Registry Create a container registry in your GCP account before you run SAS Mirror Manager. Follow these instructions: https://cloud.google.com/container-registry/docs/ quickstart?hl=en_US . Grant Permissions to the SAS Mirror Manager User You must explicitly grant two storage-related permissions that enable SAS Mirror Manager to access your GCP environment. To change required storage permissions: 1Log in to your Google Cloud Platform account, and select Cloud Storage from the side panel. 2Expand artifacts.$PROJECT.appspot.com and select permissions . 3In the Add Members field, enter the user name that you want to use to run SAS Mirror Manager commands. This account can be your user account or a service account. 4Grant the following permissions to the account that you specified: nStorage Object Creator nStorage Object Viewer Using SAS Mirror Manager on GCP The command to run SAS Mirror Manager is slightly different in GCP environments. Use the gcloud
Using SAS Mirror Manager on GCP The command to run SAS Mirror Manager is slightly different in GCP environments. Use the gcloud command to fetch your access token. Here is an example:mirror registry --deployment-data SASViyaV4_order-number_certs.zip --latest --destination gcr.io/$GCP_PROJECT/$NAMESPACE --username oauth2accesstoken --password $(gcloud auth print-access-token) Note: The value for username is always oauth2accesstoken . The value for $NAMESPACE must start with a letter and can contain only lowercase letters, numbers, hyphens, underscores, and forward slashes. Using a double hyphen, an underscore, or a forward slash is not supported.Create and Populate a Mirror Registry in Google Cloud Platform 151
Return to “Required Flags” on page 144 for information about the SAS Mirror Manager commands. “Optional Flags” on page 145. Consider whether you want to use any of the “Optional Flags” on page 145. Then proceed to “Deploy the Software from the Registry” on page 147 for additional deployment instructions. Create and Populate a Mirror Registry in Red Hat OpenShift When the target container registry is hosted in Red Hat OpenShift, SAS Mirror Manager creates a mirror of the SAS Viya platform software from your software order in the OpenShift Container Platform internal image registry. Note: Before the SAS mirror registry can be created, a cluster administrator must configure the image registry for VMware vSphere and verify that a storage location is available. For more information, see Configuring the registry for vSphere . Take the following steps to create a mirror registry for an OpenShift deployment: 1Create a namespace on the OpenShift cluster. You must specify the namespace where you will later deploy the SAS Viya platform: oc create namespace name-of-namespace 2A password is required to upload content to the image registry. Use one of the following methods to retrieve the password: nUsing the oc whoami command 1Issue the following command: oc whoami -t 2Store the access token as an environment variable: export password=token For token , substitute the token value that was returned in the previous step. nExtracting the password from an existing secret
For token , substitute the token value that was returned in the previous step. nExtracting the password from an existing secret 1When the namespace is created, several secrets should get created automatically:oc -n name-of-namespace get secrets | grep builder-dockercfg The command output should resemble the following:builder-dockercfg-##### kubernetes.io/dockercfg 2Run the following command to display the connection information in a specified secret:kubectl get secret -n namespace builder-dockercfg-##### --output="jsonpath={.data.\.dockercfg}" | base64 --decode 152 Appendix 1 / (Optional) Using a Mirror Registry
For builder-dockercfg-##### , specify the name of the secret from the previous step. 3Store the password token as an environment variable: export password=password For password , use the long string value that was found for password in the output from the previous step. 3Create the registry using SAS Mirror Manager. Run the command and append the token variable. The command should resemble the following example: ./mirrormgr mirror registry --destination path-to-openshift-image-registry/project-name --flatten --deployment-data SASViyaV4_order-ID_certs.zip --latest --username user-name --password $password --path /path-to-local-image-cache If you generated an access token, specify your login ID as the user-name . If you extracted the password from the secret, specify the user name that was provided in the output. For example, specify serviceaccount for the user-name . Note: The --flatten flag is required for a deployment into OpenShift. Additional flags are optional. For example, you could add the --deployment-assets or --cadence flags in order to mirror only the content that you require, rather than mirroring the latest versions of all supported cadences. For more information, see “Optional Flags” on page 145. A transformer that is applicable only to "flattened" registries has been provided in your deployment assets. You must add it to your base kustomization.yaml file just after overlays/required/transformers.yaml . Proceed to “Deploy the Software
after overlays/required/transformers.yaml . Proceed to “Deploy the Software from the Registry” on page 147 for instructions. If you are using the SAS Viya Platform Deployment Operator to manage your SAS Viya platform deployment, verify that the data from the local mirror copy is accessible by the operator. Create and Populate a Mirror Registry in JFrog Artifactory Artifactory is a supported option for a private or internal Docker registry. SAS has tested using the local docker registry option from a self-hosted Artifactory. Authentication to the registry can use either a user ID and password combination or authentication tokens. 1Generate an API token through the JFrog Platform Access Token UI. 2Export the token as an environment variable:export accessToken=token-string 3Run SAS Mirror Manager to create the mirror registry:Create and Populate a Mirror Registry in JFrog Artifactory 153
mirrormgr mirror registry --remove-after-upload --platform platform-filter --destination registry-name.mydomain.com --username user-name --password $accessToken --deployment-data path-to-certs-zip-file --deployment-assets SASViyaV4_order-number_cadence_release_deploymentAssets_order-ID.tgz --path /path-to-repositories 4Return to “Required Flags” on page 144 for information about the SAS Mirror Manager commands. Consider whether you want to use any of the “Optional Flags” on page 145. Then proceed to “Deploy the Software from the Registry” on page 147 for additional deployment instructions. Create a Mirror Registry at a Dark Site You can use SAS Mirror Manager to enable deployment of the SAS Viya platform to an air-gapped network or to a network where systems are not allowed to communicate with hosts on the internet. SAS Mirror Manager enables you to download content to a local directory, from which you can copy the content to the isolated network. From there, you can upload SAS Viya platform content to an internal registry. To deploy the SAS Viya platform to a dark site: 1Follow the steps in “Download Required Files” on page 142 to obtain the SAS Viya platform software and entitlements and to download SAS Mirror Manager. 2Mirror the software to a local directory. mirrormgr mirror registry --path ./sas_repos --deployment-data SASViyaV4_order-number_certs.zip If you do not provide a destination to the mirrormgr mirror registry
If you do not provide a destination to the mirrormgr mirror registry command, all files are downloaded to the directory that is specified by the --path flag. If you do not specify a path, ~/sas_repos is used by default. TIP Be sure to include any cadence version filters that you want to use in order to limit the software that is downloaded. For more information, see “Optional Flags” on page 145. 3Mirror the local directory to an internal registry. mirrormgr mirror registry --deployment-data SASViyaV4_order-number_certs.zip --path ./sas_repos --destination registry.example.com--username registry-user-name --password registry-password --push-only Specifying the --destination flag along with the --push-only flag mirrors the local copy to the specified registry without connecting to the SAS Entitlement Service or to the SAS Container Registry. Return to “Required Flags” on page 144 for more information about the SAS Mirror Manager commands. Consider whether you want to use any of the “Optional Flags” on page 145. Then proceed to “Deploy the Software from the Registry” on page 147 for additional deployment instructions.154 Appendix 1 / (Optional) Using a Mirror Registry
Appendix 2 SAS Viya Deployment Operator Fields and Messages Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Fields in the SASDeployment Custom Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Primary Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 User File Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Secret Key Selector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Repository Warehouse Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Deployment User Content Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Manage Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Environment Variables for the Operator Pod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Communications from the Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Communications from the Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Status Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Deployment Condition Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Deployment Release Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Deployment Release Details Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Overview This appendix contains lists of fields and variables that can be included in the files to configure the SAS Viya Platform Platform Deployment Operator or that are included in its status messages.155
Fields in the SASDeployment Custom Resource Primary Fields The following fields can be added to the SASDeployment custom resource in the spec (specification) block. Note: Apply the indention rules from the preceding examples to new resources that you createTable A2.1 Fields in the spec Block FieldDescriptioncaCertificateOptional. Information about the certificate authority. See “User File Options” on page 157 for more information about the format.clientCertificateOptional. Information about the client certificate. See “User File Options” on page 157 for more information about the format.cadenceNameRequired. The name of the cadence to deploy.cadenceReleaseOptional. The release of the cadence to deploy.cadenceVersionRequired. The version of the cadence to deploy.deploymentTypeOptional. The type of deployment to use.imageRegistryOptional. The image registry to deploy from.licenseOptional. The license to apply to the deployment. For more information about the format, see “User File Options” on page 157repositoryWarehouseOptional. Information about the repository warehouse. See “Repository Warehouse Options” on page 158 for more information about the options.156 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
FieldDescriptionuserContentRequired. The user customizations. See “Deployment User Content Options” on page 158 for information about the options. User File Options A field that requires a user file can have one of three values:Table A2.2 User File Options FieldDescriptioncontentA nested map.secretKeyRefA secret in the namespace of this SASDeployment. See “Secret Key Selector Fields” on page 157 for more information.urlA go-getter URL from which to fetch content. See GitHub for more information about go-getters. Note: If you use a go-getter URL for any of the values in this command, that go-getter should reference a Git repository. If it is a private Git repository, the URL must include the user ID and the personal access token (PAT). If it is a public Git repository, the user ID and PAT are not required. The URL must use the git::https protocol. Do not use a go-getter URL to refer to local files. Secret Key Selector Fields A field that requires a secret key selector has two parts:Table A2.3 Secret Key Selector Fields FieldDescriptionnameRequired. The name of the secret.keyRequired. The name of the secret key. Fields in the SASDeployment Custom Resource 157
Here is an example of the format:spec:... caCertificate: secretKeyRef: name: secret-name key: key-name... Repository Warehouse Options The repository warehouse field has two options. For an example of the format, see “Manage Updates” on page 159.Table A2.4 Repository Warehouse Options FieldDescriptionupdatePolicyOptional. The policy by which the operator automatically applies content changes to the repository warehouse. See “Manage Updates” on page 159 for details of the possible values.urlOptional. The repository warehouse URL from which to deploy your SAS Viya platform. The default is https://ses.sas.download/ses . Deployment User Content Options Deployment user content must use one of these two options:Table A2.5 Deployment User Content Options FieldDescriptionfilesA nested map.urlA go-getter URL from which to fetch content. See GitHub for more information about go-getters. Note: If you use a go-getter URL for any of the values in this command, that go-getter should reference a Git repository. If it is a private Git repository, the URL must include the user ID and the personal access token (PAT). If it is a public Git repository, the user ID and PAT are not required. The URL must use the git::https protocol.158 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
FieldDescriptionDo not use a go-getter URL to refer to local files. Manage Updates The SAS Viya Platform Deployment Operator can automatically download and apply updates to your SAS Viya platform with the addition of the updatePolicy field in the custom resource....spec: cadenceName: "LTS" cadenceVersion: "2020.1" cadenceRelease: "20200817.1597696671121" repositoryWarehouse: updatePolicy: {{ VALUE }} Replace the {{ VALUE }} variable with one of the following values: Never The operator performs no updates. This is the default. Alternatively, if you do not want the operator to perform updates, you can omit the updatePolicy field entirely. Releases The operator automatically applies any cadenceRelease updates within the selected cadenceName and cadenceVersion. This setting restricts the updates to software with two decimal places in their version numbers. For example, if you choose "Releases" with the version/name/release in the example above, then the operator would update the deployment for each stable release in 2020.1 (2021.1.1, 2021.1.2, and so on) and any patch releases of these versions. It would not update to 2020.2. Updates are checked once every 24 hours by a cronjob that is created in the SAS Viya platform namespace at deployment time. The exact start time is randomized with each deployment in an attempt to keep all of the deployments in a given time zone from updating at the same time. The schedule can be modified for all SAS
zone from updating at the same time. The schedule can be modified for all SAS Viya platform deployments managed by an operator by setting the AUTOUPDATE_SCHEDULE environment variable on the SAS Deployment Operator’s Deployment resource. The schedule can also be modified for a specific deployment by setting the environment.orchestration.sas.com/AUTOUPDATE_SCHEDULE annotation on the SASDeployment custom resource for that deployment. To prevent updates from occurring when building and applying changes to the SASDeployment custom resource, set the custom resource‘s cadence variables to their current values. When you are ready to perform an update or re-enable automatic updates, modify and apply the custom resource again to remove these settings. An example of when this strategy is useful is making permanent changes to the base kustomization.yaml file after having made other, ad hoc, changes.Manage Updates 159
Environment Variables for the Operator Pod The following variable is required in the pod specification of the file that deploys the operator. SERVICE_ACCOUNT_NAME Specifies the name of the service account under which the operator is running. This value is typically provided by the Downward API in Kubernetes. The following variables are optional in the pod specification of the file that deploys the operator. AUTOUPDATE_SCHEDULE Specifies the schedule for the automatic update job, in CRON format. The default is daily. SAS recommends not setting this schedule to more often than once a day. DEBUG_LOG_LOCATION Enables debug logging to a file at the specified path. The directory that houses the file must exist and be writable. The special values stdout and stderr enable debug logging to standard output and standard error, respectively. DISABLE_APPLY Disables the application of the results of generation when the value is true . When combined with DISABLE_CLEANUP, this variable enables the user to test the operator results without making any changes to their cluster. DISABLE_AUTO_RBAC Disables the creation of the service accounts and associated RBAC resources that the operator normally creates for the autoupdate and reconcile workloads. When the variable is set to true , the Kubernetes administrator is responsible for ensuring that the service accounts for these two workloads have been created
, the Kubernetes administrator is responsible for ensuring that the service accounts for these two workloads have been created and have the appropriate permissions. This variable is usually used with SERVICE_ACCOUNT_AUTOUPDATE_NAME and SERVICE_ACCOUNT_RECONCILE_NAME to define the names of the service accounts the administrator created. DISABLE_CLEANUP Disables cleanup of the work directory when the variable is set to true . The operator writes temporary files to the work directory. Users can mount persistent storage to this location and set this variable to true to test operator results. DISABLE_LEADER_ELECTION Disables leader election when the variable is set to true . The user must ensure that no more than one instance of the operator is managing the same namespace. DISABLE_LIVENESS_PROBE Disables the liveness endpoint when the variable is set to true . Otherwise, the operator starts a liveness endpoint and creates a Service resource in Kubernetes for that endpoint.160 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
DISABLE_METRICS_SERVICE Disables the metrics service when the variable is set to true . Otherwise, the operator starts a metrics endpoint and creates a Service resource in Kubernetes for that endpoint. FLATTENED_IMAGE_REGISTRY Excludes the deployable unit's unit path in the calculation of the image path when the variable is set to true . HTTP_PROXY When a forward proxy server is in use, the HTTP_PROXY environment variable defines the proxy URL for HTTP requests. HTTPS_PROXY When a forward proxy server is in use, the HTTPS_PROXY environment variable defines the proxy URL for HTTPS requests. KUBECONFIG When the operator is running outside of a Kubernetes cluster, this variable can be set to identify and provide access to a Kubernetes cluster. By default, the ~/.kube/config file is used. MINIMUM_UPDATE_INTERVAL This variable is deprecated with version Stable 2020.1.1. While this variable is still supported, you should use AUTOUPDATE_SCHEDULE instead. See “AUTOUPDATE_SCHEDULE ” on page 160 for more information. NO_PROXY When a forward proxy server is in use, the NO_PROXY environment variable defines requests that the proxy should ignore. SAS_UPDATE_CHECK_INTERVAL This variable is deprecated with version Stable 2020.1.1. While this variable is still supported, you should use AUTOUPDATE_SCHEDULE instead. See “AUTOUPDATE_SCHEDULE ” on page 160 for more information. SERVICE_ACCOUNT_AUTOUPDATE_NAME Defines the name of the service account that is used by the autoupdate
SERVICE_ACCOUNT_AUTOUPDATE_NAME Defines the name of the service account that is used by the autoupdate job launched by the operator. SERVICE_ACCOUNT_NAMESPACE When the operator is running outside of a Kubernetes cluster, this variable can be set to specify the namespace of the service account under which the operator is running. SERVICE_ACCOUNT_RECONCILE_NAME Defines the name of the service account that is used by the reconcile job launched by the operator. WATCH_NAMESPACE Specifies the namespace to manage. If this variable is not set, or is set to an empty string, then the operator functions across the cluster and watches all namespaces. WORK_DIRECTORY Specifies an override for the work directory that is used by the operator. To revise these settings, you should modify the deplyment operator manifest file. The manifest file is located at $operator-deploy/operator-base/deployment.yaml . The variables should be listed in the env block using the indentation already present in the file. Here is an example using the proxy variables: containers: Environment Variables for the Operator Pod 161
- args: - reconcile command: [] env: - name: HTTP_PROXY value: "http://webproxy.example.com:5000" - name: HTTPS_PROXY value: "http://webproxy.example.com:5000" - name: NO_PROXY value: "localhost,noproxy.example.com,apiserver.example.com"... Communications from the Operator Overview When the operator performs tasks, descriptions of actions and results are added to the status block in the SASDeployment custom resource. The following tables describe the format and content of the status block. Here is an example of a status block for reference:apiVersion: orchestration.sas.com/v1alpha1kind: SASDeployment...status: conditions: - lastTransitionTime: "2020-10-06T13:19:24Z" message: Reconcile succeeded reason: ReconcileSucceeded status: "True" type: Ready displayName: Stable latest: releaseForCadence: cadenceName: stable cadenceRelease: "20201006.1601989747737" cadenceVersion: "2020" displayName: Stable matchesDeployedRelease: true supportEnd: "2030-03-15T04:00:00.000Z" supportLevel: SUPPORTED releaseForVersion: cadenceName: stable cadenceRelease: "20201006.1601989747737" cadenceVersion: "2020" displayName: Stable matchesDeployedRelease: true supportEnd: "2030-03-15T04:00:00.000Z" 162 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
supportLevel: SUPPORTED messages: - "" - "" - |- role.rbac.authorization.k8s.io/sas-deployment-operator-mickey-test-a-sas-deployment created... Status Fields The following fields can be added to the status block of the SASDeployment custom resource (referred to as resource in the table)..Table A2.6 Deployment Status Fields FieldDescriptionconditionsThe current state of this SASDeployment. See “Deployment Condition Fields” on page 163 for more information.displayNameThe display name of the cadence for this SASDeployment.messagesThe list of messages from the last operation that was performed by the operator on this SASDeployment.stateThe state of this SASDeployment. Valid values are PENDING , RECONCILING , SUCCEEDED , or FAILED .supportEndThe date on which support for this SASDeployment ends.supportLevelThe support level for this SASDeployment. Deployment Condition Fields The following fields are used to describe the condition of the SASDeployment custom resource.Table A2.7 Deployment Condition Fields FieldDescriptiontypeThe type of this condition. Communications from the Operator 163
FieldDescriptionstatusThe status of this condition.lastTransitionTimeThe timestamp that corresponds to the last status change of this condition.reasonThe reason for this condition's last transition.messageThe description of the last transition. Deployment Release Fields The following fields are used to describe the cadence release and version.Table A2.8 Deployment Release Fields FieldDescriptionreleaseForVersionThe latest available release for the version of this SASDeployment.releaseForCadenceThe latest available release for the cadence of this SASDeployment. For more information about either of these fields, see “Deployment Release Details Fields” on page 164. Deployment Release Details Fields The following fields are used to provide details about the cadence release and version.Table A2.9 Deployment Release Details Fields FieldDescriptioncadenceNameThe name of this available release.cadenceReleaseThe release of this available release.cadenceVersionThe version of this available release.displayNameThe displayName of this available release. 164 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
FieldDescriptionmatchesDeployedReleaseThe value is True if this available release is currently deployed by this SASDeployment.supportEndThe date on which support for this available release ends.supportLevelThe support level of this available release. Communications from the Operator 165
166 Appendix 2 / SAS Viya Deployment Operator Fields and Messages
Appendix 3 Change Deployment Methods Kubernetes Commands to SAS Viya Platform Deployment Operator . . . . . . . . . . . 167 Deploy the SAS Viya Platform Deployment Operator . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Create the $license Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Create the SASDeployment Custom Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Deploy the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Kubernetes Commands to sas-orchestration Command . . . . . . . . . . . . . . . . . . . . . . . 169 SAS Viya Platform Deployment Operator to Any Other Method . . . . . . . . . . . . . . . . 169 Kubernetes Commands to SAS Viya Platform Deployment Operator Note: Changing your deployment method requires an outage for your SAS Viya platform software. Deploy the SAS Viya Platform Deployment Operator If you have not already deployed the SAS Viya Platform Deployment Operator, follow the instructions in “Deploy the SAS Viya Platform Deployment Operator” on page 10.167
Create the $license Directory The SAS Viya Platform Deployment Operator needs an explicit location for the license file and the zip file that contains the certificates for your software order. To create this directory, see step 6 in “Retrieve Required Files” on page 18. Create the SASDeployment Custom Resource To create the custom resources required by the SAS Viya Platform Deployment Operator, follow the instructions in “Create the SASDeployment Custom Resource” on page 78. When you reach the step to issue the create sas-deployment-cr command, you must enter the correct values for the --cadence-* fields. To find those values, run the following command:kubectl -n name-of-namespace get cm -o yaml | grep ' SAS_CADENCE' Use the output of this command to determine the correct values for the create sas-deployment-cr command. Note: If you have manually modified any of the resources since the SAS Viya platform was last deployed, those changes are overwritten and replaced with their original values when this command is run. Deploy the Software To avoid updating your SAS Viya platform software while changing the deployment method, ensure that the updatePolicy field in the custom resource is set to “never” or that the cadence variables are set to their current values. For more information, see “Manage Updates” on page 159. Follow the instructions in “Deployment Using the SAS Viya Platform Deployment
see “Manage Updates” on page 159. Follow the instructions in “Deployment Using the SAS Viya Platform Deployment Operator” on page 85 to deploy the software using the SAS Viya Platform Deployment Operator. If you did not update your software while changing deployment methods, after you have confirmed that the operator is working as you expect, follow the instructions at “Update to a New Version Using the Deployment Operator” in SAS Viya Platform Operations: Updating Software to update your software.168 Appendix 3 / Change Deployment Methods
Kubernetes Commands to sas- orchestration Command Note: Changing your deployment method requires an outage for your SAS Viya platform software. Follow the instructions at “Deployment Using the sas-orchestration Command” on page 88 to deploy or update your software using the sas-orchestration command. Be sure to install the orchestration tool, described at that link, as part of the process of changing deployment methods. SAS Viya Platform Deployment Operator to Any Other Method To change deployment methods from the SAS Viya Platform Deployment Operator to anything else requires dissociating the SAS Viya deployment from the operator. 1Dissociate the deployment from the operator by following the steps in the README located at $deploy/sas-bases/examples/deployment-operator/disassociate/README.md (for Markdown format) or at $deploy/sas-bases/docs/disassociate_a_sas_viya_platform_deployment_from_the_sas_viya_platform_deployment_operator.htm (for HTML format). 2(Optional) If all the deployments deployed by the operator have been dissociated from the operator, you can remove the operator. For the steps to remove the operator, see “Remove the SAS Viya Platform Deployment Operator Only” on page 133. 3After the dissociation, administer and update your deployment according to the procedures described for your chosen deployment method.SAS Viya Platform Deployment Operator to Any Other Method 169
170 Appendix 3 / Change Deployment Methods
Appendix 4 Troubleshooting Deployment Operator Custom Resource Is Too Large . . . . . . . . . . . . . . . . . . . . . . . . . 171 Error Checking Database Connection Error Message . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Certframe Container Fails at init Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Issues with External PostgreSQL Server Size and Connections . . . . . . . . . . . . . . . . 173 SAS Viya Platform Deployment Operator Reconcile Failures . . . . . . . . . . . . . . . . . . . 174 Performing Updates Produces Many Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Failure to Create Symbolic Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Long Delay for SAS/CONNECT Server Sign-on from SAS Studio . . . . . . . . . . . . . . . 175 "Operation not permitted" Error in SAS Configurator for Open Source Logs . . . 176 Uninstall Leaves the Deployment Namespace in a Terminating State . . . . . . . . . . 176 Deployment Operator Custom Resource Is Too Large Error When you are performing a deployment with the SAS Viya Deployment Operator and you attempt to apply the SASDeployment custom resource, either of the following error messages is displayed:Error from server (RequestEntityTooLarge)The SASDeployment "sas-viya" is invalid: metadata.annotations: Too long: must have at most 262144 bytes Explanation
Explanation Applying the custom resource requires that it not exceed a size limit. The RequestEntityTooLarge and Too long errors indicate that the custom resource exceeds that limit.171
Resolution When the custom resource is created, it consumes the content of the $deploy directory. To minimize the size of the custom resource, ensure that only the files that are needed are included in the $deploy directory. For example, site.yaml files from earlier manual deployments and old or duplicate kustomization.yaml files should be moved from the $deploy directory or deleted. Error Checking Database Connection Error Message Error The following error message is displayed:Error checking database connection: x509: certificate signed by unknown authority Explanation The SAS Viya platform cannot connect securely with a database during deployment. Resolution For instructions to provide CA certificates to the SAS Viya platform, see the "Incorporating Additional CA Certificates into the SAS Viya Deployment" section of the README file at $deploy/sas-bases/examples/security/README.md (for Markdown format) or at $deploy/sas-bases/docs/configure_network_security_and_encryption_using_sas_security_certificate_framework.htm (for HTML format). Certframe Container Fails at init Stage Error The certframe container on one or more pods fails with the following log entries:[ERROR] - Certificate failed to show a status of 'Ready' with a new resource version after retrying for 300 seconds or[ERROR] - Could not find a CertificateRequest in 'Ready=False' state associated with Certificate Explanation A pod has not completed initialization, and the certframe init container is moving
Explanation A pod has not completed initialization, and the certframe init container is moving into a failed state. Resolution 1If a pod has not completed pod initialization due to the certframe container, search the logs of the certframe container for an error message such as the following:[ERROR] - Could not find a CertificateRequest in 'Ready=False' state associated with 172 Appendix 4 / Troubleshooting
Certificate sas-risk-management-8d2d37cz42-p7rj9 2If you find the error message, check the certificaterequests resource to determine whether there are multiple requests.kubectl -n name-of-namespace --kubeconfig kubeconfig get certificaterequests | grep search-term For search-term , use part of the pod name. From the example error message, risk or management is a good search term. Any part of the pod name can be used, but the more uncommon the search term is, the fewer pod names there are to search through. Here is an example command that uses the sample error message in a namespace named test1:kubectl -n test1 --kubeconfig kubeconfig get certificaterequests | grep risk Here is sample output from the command:sas-risk-management-app-8d2d37cz42-p7rj9-5xpr7 True 123msas-risk-management-app-8d2d37cz42-p7rj9-j6g5c True 126m 3If you find multiple certificaterequests, delete the oldest ones until only one is left.kubectl -n name-of-namespace --kubeconfig kubeconfig delete certificaterequest full-pod-name Here is an example that uses output from the preceding steps.kubectl -n test1 --kubeconfig kubeconfig delete certificaterequest sas-risk-management-app-8d2d37cz42-p7rj9-j6g5c 4Check the pod status. Issues with External PostgreSQL Server Size and Connections Note: If your deployment uses an internal instance of PostgreSQL, skip this topic. Error Deployments with an external instance of PostgreSQL have any of the following messages in the logs.
Error Deployments with an external instance of PostgreSQL have any of the following messages in the logs. nError messages associated with sas-transfer that include the following:GenericJDBCException: Unable to acquire JDBC Connection nError messages associated with sas-backupjob:The backup agent encountered an error for the "postgres" data source.The "backup" job for the "postgres" data source finished with the status "Failed". nThe sas-readiness service shows the sas-database-ready check going in and out of the ready state with the following message:Issues with External PostgreSQL Server Size and Connections 173
Connection failed: pq: remaining connection slots are reserved for non-replication superuser connections Explanation These error messages indicate that the PostgreSQL database, which is required to support SAS Infrastructure Data Server, has exhausted its pool of available connections. Resolution Verify that you have met all the requirements for an external PostgreSQL database in “External PostgreSQL Requirements” in System Requirements for the SAS Viya Platform . An external PostgreSQL server should support max_connections and max_prepared_transactions of at least 1024. However, in some environments, particularly multi-tenant SAS Viya platform deployments, this value might not be sufficient. For more information, see “PostgreSQL Requirements for a Multi- Tenant Deployment” in System Requirements for the SAS Viya Platform . SAS Viya Platform Deployment Operator Reconcile Failures Error After you apply the SASDeployment custom resource, checking the status results in a FAILED state. Explanation The state of the content modified for deployment, such as the kustomization.yaml file or any of the example YAML files used for configuration, is not what the SAS Viya Platform Deployment Operator expects. The result is a conflict that causes the deployment to fail. Resolution See “Initial Troubleshooting” on page 86 for information about determining the cause of failure. The .status.messages field contains the actual messages from
cause of failure. The .status.messages field contains the actual messages from Kustomize and may prove the most useful in diagnosing problems. Performing Updates Produces Many Error Messages Error During the update process, you see many errors messages in the logs. Explanation A number of error messages come from timing issues that resolve themselves in the course of the update. Some might come from third-party software and are 174 Appendix 4 / Troubleshooting
more like warnings or information messages. But since they originate with third- party software, SAS cannot change the content of the messages. Resolution The error messages should begin to diminish after 30 minutes. If more errors continue to appear in the logs, then you need to investigate. Failure to Create Symbolic Link SAS Configurator for Open Source requires a PVC for Python builds. If you want to use Microsoft Azure File Services (azurefile) as a storage class for the PVC, mfsymlinks must be supplied as a mount option to the azurefile storage class in order to enable the update functionality. Here is an example:kubectl describe storageclass azurefile -n productionName: azurefileIsDefaultClass: NoAnnotations: noneProvisioner: kubernetes.io/azure-file Parameters: skuName=Standard_LRS AllowVolumeExpansion: True MountOptions: mfsymlinks actimeo=30 ReclaimPolicy: Delete VolumeBindingMode: Immediate Events: none If the option is not supplied, a non-fatal message is generated in the SAS Configurator for Open Source pod log that reports a failure to create a symbolic link on the file system. The message provides the target of the link to be referenced. The target can be used to reference the Python install. Long Delay for SAS/CONNECT Server Sign-on from SAS Studio You might see a long (2–minute) delay during sign-on to a SAS/CONNECT server from an internal SAS Viya platform client, such as SAS Studio. You can work around this issue by setting TCPNOIPADDR to 1.
from an internal SAS Viya platform client, such as SAS Studio. You can work around this issue by setting TCPNOIPADDR to 1. This problem has been observed on Microsoft Azure, AWS, and GCP. The delay is caused by an errant connection back to the SAS/CONNECT spawner. The spawner hangs until time-out, at which point a successful connection is made to the launched SAS/CONNECT server. A fix is planned. In the meantime, run your programs with TCPNOIPADDR=1 to work around the issue that causes the delay.Long Delay for SAS/CONNECT Server Sign-on from SAS Studio 175
"Operation not permitted" Error in SAS Configurator for Open Source Logs Error When a pod ends up in an error state, searching the logs reveals that the following fatal error is included for SAS Configurator for Open Source:install: cannot change permissions of '/opt/sas/viya/home/sas-pyconfig/...': Operation not permitted Explanation SAS Configurator for Open Source performs a number of operations in the PVC. To use Microsoft Azure File Services (azurefile) as a storage class for the PVC, add the noperm mount option to the azurefile storage class. The noperm mount option allows client-side permissions checks to pass if options such as file_mode or dir_mode are set on the PVC mount in the pod. Resolution Add the noperm mount option to the azurefile storage class:Name: azurefileIsDefaultClass: NoAnnotations: noneProvisioner: kubernetes.io/azure-file Parameters: skuName=Standard_LRS AllowVolumeExpansion: True MountOptions: noperm actimeo=30 ReclaimPolicy: Delete VolumeBindingMode: Immediate Events: none Uninstall Leaves the Deployment Namespace in a Terminating State Note: If you have uninstalled your software using the SAS Viya Platform Deployment Operator, you should skip this note. Also, if your deployment did not have an internal instace of PostgreSQL, you should skip this note. Error When you perform an uninstall, the namespace in which your software was deployed is left in an unending Terminating state.176 Appendix 4 / Troubleshooting
Explanation When you uninstalled your software, the PostgreSQL resources were not removed prior to uninstalling your deployment. Resolution 1Create a list of the PostgresClusters in your deployment:kubectl -n name-of-namespace get postgresclusters 2Run the following command for each PostgresCluster returned in step 1, replacing PostgresCluster-name with the name of the PostgresCluster.kubectl -n name-of-namespace patch postgrescluster PostgresCluster-name -p '{"metadata":{"finalizers":[]}}' --type=merge Uninstall Leaves the Deployment Namespace in a Terminating State 177
178 Appendix 4 / Troubleshooting