Skip to content
Snippets Groups Projects
Commit dc4af48b authored by William E Warriner's avatar William E Warriner
Browse files

Initial Commit

parents
No related branches found
No related tags found
No related merge requests found
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux,macos,python,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,linux,macos,python,windows
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff
.ruff_cache/
# LSP config files
pyrightconfig.json
### VisualStudioCode ###
.vscode/*
.vscode/settings.json
.vscode/tasks.json
.vscode/launch.json
.vscode/extensions.json
.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux,macos,python,windows
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
*openrc*.sh
# OpenStack Client
How to setup and use the OpenStack Client for project observation.
Any command with `conda` can also use `mamba`, which has faster environment installation.
Some of the data produced by these commands, especially user lists, may be sensitive. It is recommended to use the OpenStack Client on Cheaha rather than a local machine.
Anaconda and Mamba are available as modules on Cheaha. Use `module load Anaconda` or `module load Mamba` to use them.
## Setup
1. Enter `conda env create --file env.yml` to build the environment.
- <https://anaconda.org/conda-forge/python-openstackclient>
- <https://docs.openstack.org/releasenotes/python-openstackclient/ussuri.html>
- We have OpenStack series `Ussuri` which uses `python-openstackclient=5.2.2` but `5.8.0` is backwards compatible.
2. Download the `<project>-openrc.sh` file from the OpenStack Horizon Dashboard for Cloud.rc at `https://dashboard.cloud.rc.uab.edu/project/`.
- Select the project you're interested in first.
- Each project will create a distinct file.
- If you wish to observe more than one project, you'll need to access and download each project's `<project>-openrc.sh` file.
**Do NOT** store your password in an `openrc.sh` file and do not put these files on the internet or in git! If you think you might lose track of the file, you can always get it again using the dashboard.
## Use
Each session, start with
1. Enter `. <project>-openrc.sh` to source the file for the project you wish to observe.
- If you downloaded the file from the OpenStack Horizon Dashboard, you will be prompted for your password.
2. Enter `conda activate openstack-cli` to activate the Anaconda environment with the client.
### Show Project Limits
`openstack limits show --absolute`
### Show Aggregate Resource Usage over Time
`openstack usage show`
### Observation Commands
The `<command> list` commands are used to get an overview. If you need more details on a specific entity, use `<command> show $ID`.
- Instances: `openstack server list`
- Images: `openstack image list`
- Networks: `openstack network list`
- Routers: `openstack router list`
- Ports: `openstack port list`
- Floating IPs: `openstack floating ip list`
- Security Groups: `openstack security group list`
- Security Group Rules: `openstack security group rule list`
- Keypairs: `openstack keypair list`
- Volumes: `openstack volume list`
- Volume Snapshots: `openstack volume snapshot list`
- Users: `openstack user list` (may be restricted)
#### Formatting Outputs
By default, output is formatted as a pretty-printed ASCII table. You can select a different format using the `--format` flag with a suitable choice. For list commands, you can use `csv,json,value,yaml`. For `show` commands you can use `json,shell,value,yaml`. The formatter `value` will output a Python structure, and `shell` will output a comma separated list of `key=value`.
#### Help
Use `<full-command> --help` to get more information about possible flags.
### Management Commands
In principle it is possible to use the OpenStack Client to do anything you can do with the Horizon Dashboard, and more. There is a considerable learning curve to doing things this way and, while it is powerful, it is not recommended for novice users. If you have a use case that requires the SDK (this is unusual) please contact support and we can work with you.
### Potentially Useful Links
- Command list: <https://docs.openstack.org/python-openstackclient/ussuri/cli/command-list.html>
- Anaconda page: <https://anaconda.org/conda-forge/python-openstackclient>
name: openstack-cli
channels:
- anaconda
- conda-forge
dependencies:
- python-openstackclient=5.8.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment