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

Cadence Version Default and acceptable values #89

Closed Marc-sas closed 3 years ago

Marc-sas commented 3 years ago

Hello Experts!

Here's another issue I ran into while running the ansible-playbook to deploy SAS:

ansible-playbook \
  -e BASE_DIR=$HOME/clouddrive/project/aks/viya4-deployment/public \
  -e CONFIG=$HOME/clouddrive/project/aks/viya4-deployment/public/ansible-vars-iac-azure.yaml \
  -e TFSTATE=$HOME/clouddrive/project/aks/viya4-iac-azure/terraform.tfstate \
  -e JUMP_SVR_PRIVATE_KEY=$HOME/.ssh/azure/id_rsa \
  $HOME/clouddrive/project/aks/viya4-deployment/public/playbooks/playbook.yaml --tags "baseline,viya,cluster-logging,cluster-monitoring,viya-monitoring,install"

I receive the following return in JSON (formatted for convenience):

{
  "changed": true,
  "cmd": "/tmp/ansible.qml8fyd9/viya4-orders-cli license --file-path /r/ge.unx.sas.com/vol/vol620/u62/malepr/clouddrive/project/aks/viya4-deployment/public/malepr-viya4-aks/test1/site-config --file-name license 09WRHQ lts 2020.1",
  "delta": "0:00:00.493103",
  "end": "2021-05-07 11:27:11.068402",
  "msg": "non-zero return code",
  "rc": 1,
  "start": "2021-05-07 11:27:10.575299",
  "stderr": "2021/05/07 11:27:10 INFO: no config file found\n2021/05/07 11:27:11 ERROR: asset request failed: {\"version\":2,\"httpStatusCode\":400,\"message\":\"Bad Request\",\"errors\":[{\"message\":\"Cadence name=lts / cadence version=2020.1 is not valid for the order\"}]}",
  "stderr_lines": [
    "2021/05/07 11:27:10 INFO: no config file found",
    "2021/05/07 11:27:11 ERROR: asset request failed: {\"version\":2,\"httpStatusCode\":400,\"message\":\"Bad Request\",\"errors\":[{\"message\":\"Cadence name=lts / cadence version=2020.1 is not valid for the order\"}]}"
  ],
  "stdout": "",
  "stdout_lines": []
}

The roles/vdm/defaults/main.yaml file contains a default value on line 10 for the cadence version: V4_CFG_CADENCE_VERSION: 2020.1 which the https://github.com/sassoftware/viya4-deployment/blob/main/roles/vdm/tasks/assets.yaml inherits and uses in its command on line 15 resulting in the above error.

However, it is not clear that this is a variable meant to be modified for default deployment (in the readme file or otherwise) and finally when I look at the https://github.com/sassoftware/viya4-deployment/blob/main/docs/CONFIG-VARS.md for help, it does not list acceptable values or a format of acceptable values.

Please fix the default so that it works, or mention it needs editing in the readme. AND please also provide acceptable values/formats of values for the cadence version so that I can provide the proper input.

NormJohnIV commented 3 years ago

The cadence name and version are set by the Viya releases. Not this tool. Hence, we do not list any supported values as we are not directly aware of them. It's best to review the official Viya docs for cadence information. The error you received is the error we get back from the portal api.

Marc-sas commented 3 years ago

Hi John, If you do not list any supported values - can I at least get a link as a pointer to the correct documentation? I've tried googling and using various values, but none seem to work: https://go.documentation.sas.com/doc/en/itopscdc/v_001LTS/dplynotes/n0khx8seneiq06n1gpa8xsh3w3bs.htm

Any advice would be appreciated. -Marc

thpang commented 3 years ago

@Marc-sas are you familiar with how retrieve your order information? Asking as you've pointed to the SAS doc which does supply those bits. The doc in the repo has the information here Not quite sure what's causing the confusion.

Marc-sas commented 3 years ago

Hi, I did end up finding the order information. I didn't realize these orders still have a kind of "as of date". I thought you could pull any version of the Viya software once you had a valid software order. I suppose I'll ask someone else how to get a LTS version.

To find the correct versions you need to go to https://my.sas.com/en/my-orders.html and look at your software order and ensure your software order number, version and cadence all match what is listed. Though I haven't tested it, it seems you can also retrieve different versions in the select version dropdown. image

If you are having trouble with the APIs, you can test them out here: https://apiportal.sas.com/docs/mysasprod/1/routes/orders/%7BorderNum%7D/cadenceNames/%7BcadenceName%7D/cadenceVersions/%7BcadenceVersion%7D/license/get

I hope this helps someone in the future!

thpang commented 3 years ago

Yes you can simply choose lts as your version. The drop down is key and if you have not looked at the values you're missing vital information. This is documented in the link I provided earlier.

Marc-sas commented 3 years ago

My software order doesn’t have an LTS version and I can’t seem to get it. Viya4_softwaredropdown

I'm working with TS on track number 7613340756 - we can close this out.