{"id":20485001,"url":"https://github.com/SAP-archive/dwc-provisioner","last_synced_at":"2025-05-09T03:31:00.797Z","repository":{"id":53547551,"uuid":"518783389","full_name":"SAP-archive/dwc-provisioner","owner":"SAP-archive","description":"This sample tool shows how to programmatically create, update, and delete SAP Data Warehouse Cloud artifacts. The tool, referred to as **provisioner**, is written in Python and demonstrates how to automate various SAP Data Warehouse Cloud provisioning activities.","archived":true,"fork":false,"pushed_at":"2025-03-04T15:58:29.000Z","size":208,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-08T05:02:23.514Z","etag":null,"topics":["cli","provisioning","provisioning-scripts","sample","sample-code","sap-data-warehouse-cloud","sap-hana","sap-hana-cloud"],"latest_commit_sha":null,"homepage":"","language":"Python","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/SAP-archive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-07-28T09:32:05.000Z","updated_at":"2025-03-04T15:58:59.000Z","dependencies_parsed_at":"2025-03-08T05:02:25.230Z","dependency_job_id":"6929a60c-f33d-4e99-bdc7-94359a1b3a59","html_url":"https://github.com/SAP-archive/dwc-provisioner","commit_stats":null,"previous_names":["sap-samples/dwc-provisioner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fdwc-provisioner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fdwc-provisioner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fdwc-provisioner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fdwc-provisioner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-archive","download_url":"https://codeload.github.com/SAP-archive/dwc-provisioner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253183079,"owners_count":21867354,"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":["cli","provisioning","provisioning-scripts","sample","sample-code","sap-data-warehouse-cloud","sap-hana","sap-hana-cloud"],"created_at":"2024-11-15T16:26:59.036Z","updated_at":"2025-05-09T03:31:00.790Z","avatar_url":"https://github.com/SAP-archive.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Deprecation Notice\n\nThis public repository is read-only and no longer maintained.\n\n![](https://img.shields.io/badge/STATUS-NOT%20CURRENTLY%20MAINTAINED-red.svg?longCache=true\u0026style=flat)\n\n---\n# SAP Data Warehouse Cloud Provisioner\n\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/dwc-provisioner)](https://api.reuse.software/info/github.com/SAP-samples/dwc-provisioner)\n\n## Description\nThis sample tool provides an example of how to programmatically create, update, and delete SAP Data Warehouse Cloud artifacts. The tool, referred to as **provisioner**, is written in Python and demonstrates how to automate various SAP Data Warehouse Cloud provisioning activities. The **provisioner** can perform the following actions against SAP Data Warehouse Cloud tenants:\n\n- create and remove spaces with a simplified command line\n- bulk create and remove spaces using a CSV file\n- create and remove connections in one, or many spaces\n- create and remove shared objects from one space to another\n- create scripts of multiple commands\n- generate a HANA tables for monitoring and analytics\n\nThe syntax for **provisioner** commands can be found [here](commands.md).\n## Requirements\nBefore installing and running the **provisioner**, the following configurations and 3rd party components must be available.\n\n**Required**\n\n- SAP Data Warehouse Cloud administrator access, i.e., user with \u003cspan style=\"color: green\"\u003e**DW\u0026nbsp;Administrator**\u003c/span\u003e privilege\n- [Python version 3.8](https://www.python.org/downloads \"Download\") or higher\n\n**Optional**\n\n- [Git (latest version)](https://git.com \"Download\")\n- Access to an SAP HANA (on-prem or cloud) schema\n\n## Check the Environment\n\nTo ensure success running this tool, please use the following steps to validate the software requirements.\n\n**Python**\n\nThe **provisioner** tool requires Python 3.8 (or higher) to be available.  Use the following command to verify the Python installation.\n\n\u003e \u003cspan style=\"color: gray\"\u003e_Note_: the latest versions of Python include both \u003cspan style=\"color: white\"\u003e_python_\u003c/span\u003e and \u003cspan style=\"color: white\"\u003e_python3_\u003c/span\u003e versions of the command to start Python.\u003c/span\u003e\n\n```\nubuntu@ip-17-1-3-11:~$ python --version\nPython 3.10.4\nubuntu@ip-17-1-3-11:~$\n```\n\n```\nubuntu@ip-17-1-3-11:~$ python3 --version\nPython 3.10.4\nubuntu@ip-17-1-3-11:~$\n```\n\n**Git**\n\nTo retrieve the **provisioner** from GitHub, the command line version of Git is an easy way to download the project to a local directory. The project may also be downloaded from GitHub as a zip file using a browser.\n\n```\nC:\\\u003egit --version\ngit version 2.37.0.windows.1\nC:\\\u003e\n```\n\n## Download\n\nClone or download this repository to a directory. In all the examples in this README, a sub-directory named \"tools\" will be used as the starting location for all operations.\n\nThe commands to download the project are similar for all major operating systems, i.e., Linux, Windows, and Mac OS X.\n\n**GitHub Download**\n\nThe **provisioner** is available on the SAP-samples Github repository: [DWC Provisioner](https://github.com/SAP-samples/dwc-provisioner).  The tool can be downloaded as a zip file from Github or the tool can be cloned directly from Github using one of the following commands.\n\n_Ubuntu / Linux_:\n\nFrom the home directory of the user _ubuntu_:\n```bash\nubuntu@myhostname:~$ mkdir tools\nubuntu@myhostname:~$ cd tools\nubuntu@myhostname:~/tools$ git clone https://github.com/SAP-samples/dwc-provisioner\nCloning into 'dwc-provisioner'...\n```\n\n_Windows_\n\nOpen a command window (cmd):\n```bash\nc:\\\u003e mkdir c:\\tools\nc:\\\u003e cd c:\\tools\nc:\\\u003e git clone https://github.com/SAP-samples/dwc-provisioner\nCloning into 'dwc-provisioner'...\n```\n_MacOS_\n\nFrom a terminal session:\n```bash\nmyuser@mymachine ~ % mkdir tools\nmyuser@mymachine ~ % cd tools\nmyuser@mymachine tools % git clone https://github.com/SAP-samples/dwc-provisioner\nCloning into 'dwc-provisioner'...\nmyuser@mymachine tools % \n```\n\n**Browser Download**\n\nUsing a browser, navigate to the SAP-samples/dwc-provisioner repository and click the \"Download ZIP\" button.  Save or move the ZIP file to the \"tools\" sub-directory and unzip the contents.\n\n\n## Optional Python setup\nPython allows you to create \"virtual environments\" to help manage dependencies between installed packages and the versions of packages used in a specific project.  \u003cspan style=\"font-weight: bold; color: green\"\u003eIt is a best practice\u003c/span\u003e to create a virtual environment for each project.  Without a virtual enviroment, all Python packages are installed in the \"global\" space and all projects share the same package versions.\n\n\u003e https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/\n\n### Install the Python virtual environment tool.\n\nThe Python virtual environment tool uses the typical Python installation process, i.e., pip.\n\n_Ubuntu_\n```bash\nsudo apt install python3-venv\n```\n_Windows/MacOS_\n```\npython -m pip install --user virtualenv\n```\n### Configure a virtual environment\nPython virtual environments must be explicity created and activated.  The following command create a Python virtural environment in the dwc-provisioner directory.\n\n\u003cpre\u003e\nubuntu@ip-17-1-83-11:~/tools$ cd dwc-provisioner\nubuntu@ip-17-1-83-11:~/tools/dwc-provisioner$ python3 -m venv .venv\n\u003c/pre\u003e\n\n### Activate the virtual environment\nPython virtual enviroments must be activated each time in a command/terminal window before using Python.\n\n_Ubuntu / Linux / Mac OS_\n\nNon-windows platforms activate the virtual enviroment by \"sourcing in\" the necessary enviroment to the current shell.\n\n```bash\nubuntu@ip-17-1-83-11:~/tools/provisioner$ source .venv/bin/activate\n(.venv) ubuntu@ip-17-1-83-11:~/tools/provisioner$ \n```\n\n\u003e **Note**: the the (.venv) prefix has been added to the command line prompt.\n\n_Windows_\n\nWindows activates the virtual enviroment by executing a batch script.\n\n```bat\nc:\\devpath\\dwc-provisioning\u003e .venv\\scripts\\activate\n```\n\nIf the environment is activated correctly, a previx (.venv) is shown in the command line:\n```bat\n(.venv) c:\\devpath\\dwc-provisioning\u003e\n```\n\n## Install Python packages\n\nThe **provisioner** requires publically available Python packages to be installed before running the tool.  The packages are quickly installed using the following command:\n\n```bat\n(.venv) c:\\tools\\dwc-provisioner\u003e python -m pip install -r requirements/core.txt\n```\n\n## Configure HANA (optional)\n\nTo create and store information about SAP Data Warehouse Cloud in an SAP HANA Cloud instance, ensure the IP address where this tool runs is in the allow list for SAP HANA Cloud connections.  In the example below, an SAP Data Warehouse Cloud Data Access User (a.k.a., hash-tag (#) user) is the target, so in SAP Data Warehouse Cloud set the IP Allow list under the System / Configuration tab.\n\n![SAP Data Warehouse Cloud - IP Allowlist](images/allowlist.png)\n\n## Provisioner Configuration\nTo start using the **provisioner**, a configuration file is created to identify the target SAP Data Warehouse Cloud tenant and set the username and password values.\n\nRefer to the command sytax for additional information on the `config` command.\n\n```\nc:\\\u003e cd tools\\dwc-provisioner\n\nc:\\\u003e .venv\\scripts\\activate\n\n(.venv) c:\\tools\\dwc-provisioner\u003e provisioner config\n  --dwc-url https://{your-tenant}.{ds}.hcs.cloud.sap\n  --dwc-user user.name@domain.com\n  --dwc-password NotYourPassword!\n```\n\u003e **Notes**:\n\u003e \n\u003e1. Command options are listed on separate lines for clarity.\n\u003e2. The change directory and starting the Python virtual environment commands are included for completeness.\n\n## Uninstall\n\nTo uninstall simply remove the dwc-provisioner directory, including all sub-directories\n\n## Known Issues\n\nThis sample application is in an early stage of development, so:\n- don't store personal information because of missing access logging\n- don't store sensitive information because there is no access control\n- don't use the example application productively because users and passwords generated by the **config** command, while obfuscated, are not securely encrypted.\n- don't expect always meaningful error messages in reaction to erroneous input.\n\n## How to obtain support\n\nThis an example application not supported by SAP. However, you can \n[create an issue](https://github.com/SAP-samples/dwc-provisioner/issues) in this repository if you find a bug or have questions about the content.\n\n## Contributing\n\nIf you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).\n\n## Code of Conduct\n\nsee [here](CODE_OF_CONDUCT.md)\n\n## License\n\nCopyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fdwc-provisioner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSAP-archive%2Fdwc-provisioner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSAP-archive%2Fdwc-provisioner/lists"}