Odin Deployment
Version 2 · Replace workstation-specific absolute paths with portable repository-relative launcher references.
Historical versionOdin Deployment
Purpose
QWebHub and its sibling modules deploy to Odin through local Windows BAT launchers backed by the shared Python FTP helper. The FTP password is stored once in the Windows user environment and is never written into a repository, BAT file, wiki page, or deployment command.
One-time credential setup
Store the password for future processes with a placeholder command such as:
setx ODIN_FTP_PASSWORD "<password>"
Open a new terminal after running setx; it does not update terminals that are already open. Do not replace the placeholder in documentation or commit the real value anywhere.
The launchers map ODIN_FTP_PASSWORD to the generic helper environment, and the Python FTP helpers also read ODIN_FTP_PASSWORD directly. If it is unavailable, the helpers fall back to a secure interactive prompt.
Deployment launchers
| Project | Launcher |
|---|---|
| QWebHub | QWebHub: deploy_odin.bat`` |
| QProcess | QProcess: deploy_odin.bat`` |
| QDG KB Viewer | QDG KB Viewer: deploy_odin.bat`` |
| Hub, modules, and shared assets | QWebHub: deploy_all_to_odin.bat`` |
For each deployment launcher:
- Double-clicking uploads changed files.
- Passing
--dry-runlists files without uploading. - Passing
--applyexplicitly uploads changed files. - Passing
--apply --forceuploads all selected files even when server file sizes match.
Examples:
Set-Location <QWebHub repository>
.\deploy_odin.bat --dry-run
.\deploy_odin.bat --apply --force
The QWebHub launcher includes scripts\reload_qwebhub.py. QProcess deploys its active application package and templates with local diagnostic/test exclusions. QDG KB Viewer deploys its application package, templates, static source, manage.py, and requirements.
Verification
-
Open a new terminal and confirm the variable exists without printing its value:
if ($env:ODIN_FTP_PASSWORD) { 'ODIN_FTP_PASSWORD is available' } -
Run the intended launcher with
--dry-runand verify the destination and file list. -
Run the launcher normally or with
--apply. -
For QWebHub, confirm
/healthz/returns successfully after the server-side restart workflow. -
Confirm QDG KB Viewer cards and static styling render correctly after collection/restart.
Security rules
- Never put the password value in a BAT file, Python file, JSON configuration, Git history, prompt, log, or wiki page.
- Keep credential-bearing local launchers ignored with exact paths or narrow patterns.
- Before committing deployment changes, inspect every BAT and JSON configuration file for credentials and remove any tracked sensitive file from the Git index while preserving the local copy.
- Rotate the credential if it appears in source control, command output, or another exposed location.