https://github.com/tacc/wma-tapis-templates
https://github.com/tacc/wma-tapis-templates
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tacc/wma-tapis-templates
- Owner: TACC
- Created: 2022-06-28T19:12:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T20:45:34.000Z (2 months ago)
- Last Synced: 2025-03-27T21:36:00.780Z (2 months ago)
- Language: Shell
- Size: 1.34 MB
- Stars: 4
- Watchers: 17
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WMA-Tapis-Templates
## Requirements
- [Tapipy](https://github.com/tapis-project/tapipy/tree/main/tapipy)
- (Optional) [pyenv](https://github.com/pyenv/pyenv)
- (Optional) [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)## Provisioning a Tenant
1. Create a `client_secrets.py` file with a `CLIENT_USERNAME` and `CLIENT_PASSWORD` (see client_secrets.example.py)
2. Adjust the tenants, systems, and apps you wish to create in `initialize_tenant.py`
3. Run `python initialize_tenant.py` to create/update the apps and systems in the tenants listed in `TENANT_BASE_URLS`## Creating a client
1. (Optional) Install Tapipy in a pyenv environemnt
a. `pyenv install 3.11`
b. `pyenv virtualenv 3.11 tapipy`
c. `pyenv local tapipy`
c. `pip install tapipy`
2. Install ipython
a. `pip install ipython`
3. Initiate an ipython session
a. `ipython`
4. Create a client
```
from tapipy.tapis import Tapis
client = Tapis(base_url='https://portals.tapis.io', username='$USER', password='******')
client.get_tokens()
```## Creating a credential
1. Create a keypair locally
a. `ssh-keygen -m PEM -t rsa -b 2048 -f ~/.ssh/$USER.frontera`
2. Copy the public key to your `~/.ssh/authorized_keys` file on the frontera host
```
ssh [email protected]
PUBKEY="PASTE PUBLIC KEY HERE"
echo $PUBKEY >> ~/.ssh/authorized_keys`
```
3. Copy the public and private key to the `USER_CREDENTIAL_PRIVATE_KEY` and `USER_CREDENTIAL_PUBLIC_KEY` values in `client_secrets.py`
4. Adjust the `systemId` and `base_url` values for your desired tenant/system and run the `create_client_credential.py` script
5. Test the keypair works by making a file listing on a system
a. `client.files.listFiles(systemId='frontera', path='/')`