{"id":18802129,"url":"https://github.com/oracle-quickstart/oci-sas-viya","last_synced_at":"2026-02-23T22:20:58.493Z","repository":{"id":49817901,"uuid":"332925645","full_name":"oracle-quickstart/oci-sas-viya","owner":"oracle-quickstart","description":"Terraform module to deploy SAS Viya on Oracle Cloud Infrastructure (OCI)","archived":false,"fork":false,"pushed_at":"2023-08-18T15:47:20.000Z","size":2483,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-21T21:40:37.710Z","etag":null,"topics":["oci","partner-led","sas"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-quickstart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-26T00:38:24.000Z","updated_at":"2023-01-29T15:35:02.000Z","dependencies_parsed_at":"2024-11-07T22:30:47.618Z","dependency_job_id":"49fcc7e0-c8e4-4c62-b7ac-a66643ce6b71","html_url":"https://github.com/oracle-quickstart/oci-sas-viya","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oracle-quickstart/oci-sas-viya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foci-sas-viya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foci-sas-viya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foci-sas-viya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foci-sas-viya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-quickstart","download_url":"https://codeload.github.com/oracle-quickstart/oci-sas-viya/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-quickstart%2Foci-sas-viya/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601515,"owners_count":23183095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oci","partner-led","sas"],"created_at":"2024-11-07T22:26:39.625Z","updated_at":"2026-02-23T22:20:53.470Z","avatar_url":"https://github.com/oracle-quickstart.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAS Viya 4 Infrastructure as Code (IaC) for OCI\n\n## Overview\n\nThis project contains Terraform scripts to provision Oracle Cloud Infrastructure\n(OCI) resources required to deploy SAS Viya 4 products. Here is a list of resources this project will create -\n\n  \u003e- A VCN with subnets (optionally)\n  \u003e- An OKE cluster and 5 nodepools\n  \u003e- An NFS share using the OCI FSaaS\n  \u003e- A jump box\n\n## Prerequisites\nOperational knowledge of:\n\n- [Terraform](https://www.terraform.io/intro/index.html)\n- [Docker](https://www.docker.com/)\n- [OCI](https://www.oracle.com/cloud/)\n- [Kubernetes](https://kubernetes.io/docs/concepts/)\n\n### OCI\nFirst off you'll need to do some pre deploy setup to configure terraform detailed\n[here](https://github.com/oracle/oci-quickstart-prerequisites).\n\nYou will also need the OCI CLI installed and configured by following these\n[instructions](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm)\n\n### SAS Viya\n\nYou will need your order information and to generate an API key with the links below:\n- https://my.sas.com/en/my-orders.html\n- https://apiportal.sas.com/get-started\n\n## Draft Deploy Steps\n\n### Clone\n```\ngit clone https://github.com/oracle-quickstart/oci-sas-viya.git\ncd ./oci-sas-viya\n```\n\n### Deploy IaaS\nAll Terraform variables have defaults. All resources will be prefixed with\n`var.prefix` which by default is `viya` Simply:\n```\nterraform plan #optional, to see what resources will be created\nterraform apply\n```\n\nOnce complete the kubernetes config will be written to `viya-oke-kubeconfig.conf`.\nAny `kubectl` commands below assume you've copied this file to `~/.kube/config`.\n\n### Install Viya\n\nThe install of Viya 4 is done by following the steps detailed\n[here](https://github.com/sassoftware/viya4-deployment). Clone that repo and\ncomplete the prerequisite steps for docker [here](https://github.com/sassoftware/viya4-deployment/blob/main/docs/user/DockerUsage.md).\nThe docker method is recomended over ansible. If you are connecting to AutonomousDB\nyou will need to run commands outside of docker, binary version requirements are\n[here](https://github.com/sassoftware/viya4-deployment/blob/main/docs/user/Dependencies.md).\n\nCurrently the OCI CLI is not in the default docker build. Replace the Dockerfile from `viya-deployment` with the one in this\nrepo in `./deployment/Dockerfile`\n\nAn example/minimal `ansible-vars.yaml` can be found in `./deployment/ansible-vars.yaml.example`.\nReplace all `XXX` values with your values and copy that file to `viya-deployment`.\n\nThe ansible var `V4_CFG_INGRESS_FQDN: 'viya.viya.internal'` given in the example\nis intended to be set in you local hosts file, eg:\n```\ncat /etc/hosts | grep viya\n# viya\n129.158.X.Y viya.viya.internal # not actual ip\n```\n\nThis can be set to the public ip of the load balancer creating during the viya\ninstall below after it completes. Other DNS options are described [here](https://github.com/sassoftware/viya4-deployment#dns).\n\nYou can now run the commands below, or similar docker commands. Note the flag `--volume $HOME/.oci:/viya4-deployment/.oci \\`\nis OCI specific and allows the OCI CLI inside docker to auth using your user/credentials.\nAlso the paths defined in `.oci/config` should be relative, eg `key_file=~/.oci/oci_api_key.pem`\n\n```\ndocker build -t viya4-deployment .\n\ndocker run --rm \\\n  --group-add root \\\n  --user $(id -u):$(id -g) \\\n  --env GIT_CEILING_DIRECTORIES=/viya4-deployment \\\n  --volume $HOME:/data \\\n  --volume $HOME/repos/oci-sas-viya/viya-oke-kubeconfig.conf:/config/kubeconfig \\\n  --volume $HOME/repos/viya4-deployment/ansible-vars.yaml:/config/config \\\n  --volume $HOME/repos/oci-sas-viya/terraform.tfstate:/config/tfstate \\\n  --volume $HOME/.ssh/oci:/config/jump_svr_private_key \\\n  --volume $HOME/.oci:/viya4-deployment/.oci \\\n  viya4-deployment --tags \"baseline,viya,install\"\n```\n\nOnce the `docker run` command finishes you can query the readiness pod by running:\n```\nkubectl wait \\\n  --for=condition=ready pod \\\n  --selector=\"app.kubernetes.io/name=sas-readiness\" \\\n  --timeout=1800s\n```\nIf this returns success, you can log in as the `sasboot` user at: https://viya.viya.internal/SASLogon/login\n\n### Connection to AutonomousDB\n\nConnecting Viya to an instance of ADW requires using kustomize and overlays outside\nof docker. Be sure to pay attention to the requiired versions of binarires [here](https://github.com/sassoftware/viya4-deployment/blob/main/docs/user/Dependencies.md)\n, and the `yq` helper commands use v4 syntax. Doc for overlays with Viya in general is [here](https://github.com/sassoftware/viya4-deployment#customize-deployment-overlays)\n\nGeneral documentation can be found in doc downloaded at install at path `file://$HOME/viya-oke/viyanamespace/sas-bases/docs/configuring_sasaccess_and_data_connectors_for_sas_viya_4.htm`.\n\nExample commands are included below for conveinence, but fundamentally what we're\ndoing is:\n- mounting the NFS on a pod\n- setting required env vars\n- making sure the ADW FQDN is resolvable\n\n```\ncd $HOME/viya-oke/viyanamespace\ncp kustomization.yaml kustomization.yaml.bak\ncp site.yaml site.yaml.bak\n\n# pwd -\u003e $HOME/viya-oke/viyanamespace/\nmkdir site-config/data-access\ncp sas-bases/examples/data-access/data-mounts-cas.sample.yaml ~/viya-oke/viyanamespace/site-config/data-access/data-mounts-cas.yaml\ncp sas-bases/examples/data-access/data-mounts-job.sample.yaml ~/viya-oke/viyanamespace/site-config/data-access/data-mounts-job.yaml\ncp sas-bases/examples/data-access/data-mounts-deployment.sample.yaml ~/viya-oke/viyanamespace/site-config/data-access/data-mounts-deployment.yaml\n\nchmod 644 site-config/data-access/data*.yaml\n\n# edit each file to add NFS example with correct hostname,\n# correctly formatted examples with dummy FQDNs are in oci-sas-viya/deployment\nnano site-config/data-access/data-mounts-cas.yaml\nnano site-config/data-access/data-mounts-job.yaml\nnano site-config/data-access/data-mounts-deployment.yaml\n\nyq -i eval '.transformers += [\"site-config/data-access/data-mounts-cas.yaml\"]' kustomization.yaml\nyq -i eval '.transformers += [\"site-config/data-access/data-mounts-deployment.yaml\"]' kustomization.yaml\nyq -i eval '.transformers += [\"site-config/data-access/data-mounts-job.yaml\"]' kustomization.yaml\n\n# needed env vars\n# ORACLE=$(PATH_TO_ORACLE_LIBS)\n# ORACLE_BIN=$(PATH_TO_ORACLE_BIN)\n# ORACLE_HOME=$(PATH_TO_ORACLE_HOME)\n\necho \"ORACLE=/access-clients/oracle/instantclient_21_6\" \\\n \u003e ./site-config/data-access/sas-access.properties\n\necho \"ORACLE_HOME=/access-clients/oracle/instantclient_21_6\" \\\n \u003e\u003e ./site-config/data-access/sas-access.properties\n\necho \"ORACLE_BIN=/access-clients/oracle/instantclient_21_6\" \\\n \u003e\u003e ./site-config/data-access/sas-access.properties\n\n# Just append\nprintf \"configMapGenerator:\n  - name: sas-access-config\n    behavior: merge\n    envs:\n      - site-config/data-access/sas-access.properties\n\" \u003e\u003e kustomization.yaml\n\nyq -i eval '.transformers += [\"sas-bases/overlays/data-access/data-env.yaml\"]' kustomization.yaml\n\nmkdir -p site-config/network\n\n# BOTH ip and FQDN of the ADW need to be defined in the files below\n# The ips or FQDNS with XXX, X, or Y below are placeholders to be replaced wiith your values\n\nprintf 'apiVersion: builtin\nkind: PatchTransformer\nmetadata:\n  name: etc-hosts-cas\npatch: |-\n  - op: add\n    path: /spec/controllerTemplate/spec/hostAliases\n    value:\n      - ip: 192.168.X.Y\n        hostnames:\n        - \"XXX.adb.us-ashburn-1.oraclecloud.com\"\ntarget:\n  kind: CASDeployment\n  annotationSelector: sas.com/sas-access-config=true\n' \u003e site-config/network/etc-host-cas.yaml\n\n\nprintf 'apiVersion: builtin\nkind: PatchTransformer\nmetadata:\n  name: etc-hosts-job\npatch: |-\n  - op: add\n    path: /template/spec/hostAliases\n    value:\n      - ip: 192.168.X.Y\n        hostnames:\n        - \"XXX.adb.us-ashburn-1.oraclecloud.com\"\ntarget:\n  kind: PodTemplate\n  annotationSelector: sas.com/sas-access-config=true\n' \u003e site-config/network/etc-host-job.yaml\n\n\n# check yaml\nyq e site-config/network/etc-host-cas.yaml \u0026\u0026 echo \"\\n\\n\\n\" \u0026\u0026 yq e site-config/network/etc-host-job.yaml\n\nyq -i eval '.transformers += [\"site-config/network/etc-host-cas.yaml\"]' kustomization.yaml\nyq -i eval '.transformers += [\"site-config/network/etc-host-job.yaml\"]' kustomization.yaml\n\n\n# generate site.yaml to include\nkustomize build -o site.yaml\n\n# apply site.yaml\nkubectl apply --kubeconfig=$HOME/repos/oci-sas-viya/viya-oke-kubeconfig.conf --selector=\"sas.com/admin=namespace\" -f site.yaml --prune\n```\n\nOnce these customizations have been applied you can sanity check hostnames/mounts\nwith the below commands:\n```\n# sanity check mount\nkubectl -n viyanamespace exec -it sas-cas-server-default-controller -- df -k\nkubectl -n viyanamespace exec -it sas-cas-server-default-controller -- ls -al /access-clients/oracle\n\n# sanity check db in /etc/hosts\nkubectl -n viyanamespace exec -it sas-cas-server-default-controller -- cat /etc/hosts\n\n# sanity check for $ORACLE_XXX in env?\nkubectl -n viyanamespace exec -it sas-cas-server-default-controller -- env | grep 'ORACLE\\|LIBRARY'\n```\n\nAdditionally, a user that is not `sasboot` should be created if one does not exist\nfor SAS Studio connections to ADW. In Studio the libname statment uses the coonnection\nstring from you ADW is a form like (replacing XXX values):\n```\nlibname autodb oracle user=\"admin\" password=\"XXX\" path=\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=XXX.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=XXX.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\";\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-quickstart%2Foci-sas-viya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-quickstart%2Foci-sas-viya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-quickstart%2Foci-sas-viya/lists"}