Skip to content

Commit

Permalink
docs: (PSKD-615) Documenting upcoming sas-data-server-operator change (
Browse files Browse the repository at this point in the history
…#568)

* docs: Adding section about 2024.06 db changes

* docs: Adding troubleshooting section

* docs: Adding ToC link
  • Loading branch information
saschjmil authored Aug 13, 2024
1 parent b740636 commit 6096f45
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/CONFIG-VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ V4_CFG_POSTGRES_SERVERS:
```
Several SAS Viya platform offerings require a second internal Postgres instance referred to as SAS Common Data Store or CDS PostgreSQL. See details [here](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=dplyml0phy0dkr&docsetTarget=n08u2yg8tdkb4jn18u8zsi6yfv3d.htm#p0wkxxi9s38zbzn19ukjjaxsc0kl). The list of software offerings that include CDS PostgreSQL is located at [SAS Common Data Store Requirements (for SAS Planning and Retail Offerings)](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#n03wzanutmc6gon1val5fykas9aa) in System Requirements for the SAS Viya platform. To deploy and configure a CDS PostgreSQL instance in addition to the default internal platform Postgres instance, specify "cds-postgres" for your second Postgres instance as shown in the example below:

**Note**: Starting with 2024.06, the SharedServices database is not created automatically during the initial deployment of the SAS Viya platform. Instead, you must manually create it before you start the SAS Viya platform deployment.
Please refer to [this section](https://github.com/sassoftware/viya4-deployment/blob/main/docs/user/PostgreSQL.md##202406-sharedservices-database-updated-behavior
) in the PostgreSQL.md documentation



```bash
V4_CFG_POSTGRES_SERVERS:
default:
Expand Down
49 changes: 49 additions & 0 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Deploying with the SAS Orchestration Tool using a Provider Based Kubernetes Configuration File](#deploying-with-the-sas-orchestration-tool-using-a-provider-based-kubernetes-configuration-file)
- [Applying a New License for your SAS Viya Platform Deployment](#applying-a-new-license-for-your-sas-viya-platform-deployment)
- [Tagging the AWS EC2 Load Balancers](#tagging-the-aws-ec2-load-balancers)
- [Deploying with cadence versions > 2024.06 without creating the external PostgreSQL SharedServices database](#deploying-with-cadence-versions--202406-without-creating-the-external-postgresql-sharedservices-database)

## Debug Mode
Debug mode can be enabled by adding "-vvv" to the end of the docker or ansible commands
Expand Down Expand Up @@ -400,3 +401,51 @@ Based on this [Network Load Balancing documentation](https://docs.aws.amazon.com
terminationGracePeriodSeconds: 600
```
3. When the `baseline,install` ansible tasks are run and `ingress-nginx` is installed, the EC2 Load Balancer that gets provisioned by AWS will have those tags you specified.


## Deploying with cadence versions > 2024.06 without creating the external PostgreSQL SharedServices database

### Symptom

While deploying with a cadence version >= 2024.06 AND:

* you are targeting an IaC-provisioned cluster with an External PostgreSQL Database Server
* you didn't create the SharedServices database prior to running viya4-deployment
most pods will fail to initialize. The following error message can be found in the sas-data-server-operator pod:
```bash
$ kubectl logs deployment/sas-data-server-operator
{
"level":"error",
"source":"sas-data-server-operator-65c874585-xwzgr",
"messageParameters":{
"p1":"failed to connect to `host=example-default-flexpsql.postgres.database.azure.com user=pgadmin database=SharedServices`: server error (FATAL: database \"SharedServices\" does not exist (SQLSTATE 3D000))"
},
"messageKey":"failed to initialize database, got error %v",
"message":"failed to initialize database, got error %v"
}
{
"level":"error",
"source":"sas-data-server-operator-65c874585-xwzgr",
"messageKey":"Reconciler error",
"properties":{
"error":"database server is external and cannot connect to the SAS database",
"caller":"logr/logr.go:49"
},
"attributes":{
"DataServer":{
"name":"sas-platform-postgres",
"namespace":"deploy"
},
},
"message":"Reconciler error"
}
```
### Solution
Due to changes in the sas-data-server-operator, the SharedServices database is not created automatically during the initial deployment of the SAS Viya platform. Instead, you must manually create it before you start the SAS Viya platform deployment
For more information, please refer to the [External Postgres Requirements](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) documentation.
9 changes: 9 additions & 0 deletions docs/user/PostgreSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [Post Data Transfer Steps for viya4-deployment](#post-data-transfer-steps-for-viya4-deployment)
* [Crunchy Data 5](#crunchy-data-5)
* [Crunchy Data 4](#crunchy-data-4)
* [2024.06 SharedServices Database Updated Behavior](#202406-sharedservices-database-updated-behavior)

## Use IAC To Create an External PostgreSQL Database Cluster

Expand Down Expand Up @@ -55,3 +56,11 @@ The final step in the [PostgreSQL Data Transfer Guide](https://documentation.sas
4. Going back to the [PostgreSQL Data Transfer Guide](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=pgdatamig&docsetTarget=titlepage.htm) under "Post-transfer Steps for Crunchy Data 4" perform Step 8 and start the operator if your deployment is managed by the SAS Deployment Operator (if `V4_DEPLOYMENT_OPERATOR_ENABLED` was set to true in your `ansible-vars.yaml` file). Otherwise, skip this step.
5. Run the ansible-playbook again with the `viya,install` tags. This updates the `kustomization.yaml` by removing entries related to Crunchy Data 4 and adding entries for your external PostgreSQL cluster. The manifest will be rebuilt and reapplied to the cluster. This replaces step 9 from the "Post-transfer Steps for Crunchy Data 4" documentation.
6. Return to the [PostgreSQL Data Transfer Guide](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=pgdatamig&docsetTarget=titlepage.htm) under "Post-transfer Steps for Crunchy Data 4". Perform Steps 10 and the remainder of the steps to complete the data transfer.


## 2024.06 SharedServices Database Updated Behavior
Due to changes in the sas-data-server-operator, the SharedServices database is not created automatically during the initial deployment of the SAS Viya platform. Instead, you must manually create it before you start the SAS Viya platform deployment

Deployments performed on cadence versions before 2024.06 will not be impacted.

For more information, please refer to the [External Postgres Requirements](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) documentation.

0 comments on commit 6096f45

Please sign in to comment.