Skip to content

fasrc/vast_coldfront_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vast-coldfront-plugin

ColdFront plugin that syncs VAST Data user quotas into allocations (management command pull_vast_quotas).

Install

pip install vast-coldfront-plugin

With a local checkout:

pip install -e path/to/vast_coldfront_plugin

Configure ColdFront (local_settings.py)

After coldfront.config.base is loaded (ColdFront’s split settings load local_settings.py last), add the following so the plugin is installed and the VAST client can connect.

1. Register the Django app

from coldfront.config.base import INSTALLED_APPS

INSTALLED_APPS += ["vast"]

Example of a minimal local_settings.py fragment (credentials are usually supplied via environment / .env, not hard-coded):

from coldfront.config.base import INSTALLED_APPS

INSTALLED_APPS += ["vast"]

# Optional: set secrets here instead of in the environment (discouraged for production)
# import os
# os.environ.setdefault("VASTADDRESS", "https://vast.example.com")
# os.environ.setdefault("VASTUSER", "...")
# os.environ.setdefault("VASTPASS", "...")

2. Environment variables

The plugin reads configuration from the process environment via ColdFront’s django-environ setup (coldfront.config.env). Define these in your deployment environment, in a .env file that ColdFront loads, or by setting os.environ[...] early in local_settings.py before the vast app is imported.

Variable Required Default Purpose
VASTADDRESS Yes (for pull_vast_quotas / API client) VAST cluster API address (hostname or URL as expected by vastpy).
VASTUSER Yes (for password-based auth) API username.
VASTPASS Yes (for password-based auth) API password.
VASTTOKEN No Reserved for token-based auth if you extend or configure the client to use it; not read by the bundled VASTClient wrapper in vast.utils today.
VASTAPI No v6 VAST API version string (exposed for parity with typical VAST env layout; not used by the current vast.utils client).
VASTAUTHORIZER No AD When set to AD, pull_vast_quotas resolves VAST GIDs to Active Directory group names via coldfront.plugins.ldap.utils.LDAPConn. The ColdFront LDAP plugin must be installed, enabled, and configured. Use another value only if you have adapted the command for a different identity backend.

If any required variable is missing, connection or management commands may fail at runtime.

3. Optional shortcut (split-settings)

If you prefer not to duplicate the ENV.str(...) assignments, you can instead import the bundled fragment after coldfront.config.base is available:

from vast.coldfront_config import *  # noqa: F403 — sets the same env-backed names and appends `vast` to INSTALLED_APPS

Do not combine that import with a second INSTALLED_APPS += ["vast"] or you will register the app twice.

4. PLUGIN_VAST (optional)

If your deployment enables plugins through ColdFront’s PLUGIN_* env flags, you can keep PLUGIN_VAST=true and a one-line coldfront/config/plugins/vast.py that re-exports vast.coldfront_config, or rely solely on local_settings.py as above and leave PLUGIN_VAST unset.

Operations

  • Management command: python manage.py pull_vast_quotas — syncs quotas from VAST into ColdFront allocations (see command module for resource naming such as vast-holylabs).

About

ColdFront plugin for interaction with VAST storage systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages