Deployment configuration tool for Octopize Avatar platform
Project description
Octopize Avatar Deployment Tool
Automated configuration tool for deploying Octopize Avatar platform using Docker Compose.
Overview
This tool simplifies Avatar deployment by:
- ๐ฆ Standalone package - No need to clone the entire repository
- โฌ๏ธ Downloads templates automatically from GitHub
- ๐ฏ Deployment presets - dev-mode, production, airgapped configurations
- ๐ Secure secrets generation - Automatic creation of encryption keys
- โ Stateless by design - Minimal bundled dependencies
- ๐ Resumable configuration - State management for interrupted setups
Architecture
What's Bundled vs Downloaded
Bundled in PyPI Package:
configure.py- Main configuration logicstate_manager.py- State management for resumingdownload_templates.py- Template downloaderdefaults.yaml- Default values and presets
Downloaded from GitHub (on-demand):
.env.template- Environment configuration templatenginx.conf.template- Nginx configuration templatedocker-compose.yml- Docker services definition.template-version- Template version information- Other deployment files
These templates are located in docker/templates/ in the avatar-deployment repository.
This design means you can install and run the tool without cloning the repository!
Quick Start
Option 1: Using uvx (Recommended - After PyPI Publication)
uvx octopize-avatar-deploy --output-dir /app/avatar
Option 2: Using pip
pip install octopize-avatar-deploy
octopize-avatar-deploy --output-dir /app/avatar
Option 3: From Source with uv
# Sparse clone (only deployment-tool directory)
git clone --depth 1 --filter=blob:none --sparse https://github.com/octopize/avatar-deployment
cd avatar-deployment
git sparse-checkout set deployment-tool
# Run with uv
cd deployment-tool
uv run configure.py --output-dir /app/avatar
Deployment Presets
Choose a preset to quickly configure for your environment:
default - Production Configuration
- Console logging: disabled (use structured logs)
- Sentry monitoring: enabled
- Telemetry: enabled
- Best for: Production deployments with monitoring
dev-mode - Development Configuration
- Console logging: enabled (see logs in terminal)
- Sentry monitoring: disabled
- Telemetry: disabled
- Best for: Local development and testing
airgapped - Air-Gapped Deployment
- Console logging: disabled
- Sentry monitoring: disabled (no external connections)
- Telemetry: disabled (no external connections)
- Best for: Secure, isolated environments
custom - Manual Configuration
- Configure all options interactively
- Best for: Specific requirements
Usage
Interactive Mode with Preset
octopize-avatar-deploy --output-dir /app/avatar --preset dev-mode
The tool will:
- Download latest templates from GitHub
- Apply preset configuration
- Prompt for required values (PUBLIC_URL, ENV_NAME)
- Generate configuration files
Non-Interactive Mode
# Create config file
cat > my-config.yaml << EOF
PUBLIC_URL: avatar.mycompany.com
ENV_NAME: mycompany-prod
AVATAR_API_VERSION: 2.20.1
AVATAR_WEB_VERSION: 0.40.0
MAIL_PROVIDER: smtp
SMTP_HOST: mail.mycompany.com
EOF
# Run with config
octopize-avatar-deploy \
--config my-config.yaml \
--preset default \
--non-interactive \
--output-dir /app/avatar
Advanced Options
octopize-avatar-deploy \
--output-dir /app/avatar \
--preset dev-mode \
--download-branch main \ # Git branch to download from
--skip-download \ # Use cached templates
--save-config \ # Save config to deployment-config.yaml
--verbose # Show detailed progress
Command Line Options
--output-dir DIR Output directory (default: current directory)
--preset NAME Use preset: default, dev-mode, airgapped
--config FILE YAML configuration file
--non-interactive Non-interactive mode (use config/defaults)
--auth-type TYPE Authentication: email or username (default: email)
--save-config Save config to deployment-config.yaml
--download-branch BRANCH Git branch for templates (default: main)
--skip-download Use cached templates
--verbose Detailed output
What Gets Generated
After running the tool, you'll have:
/app/avatar/
โโโ .env # Environment configuration
โโโ nginx.conf # Nginx reverse proxy config
โโโ .secrets/ # Generated secrets (gitignored)
โ โโโ db_password
โ โโโ authentik_secret_key
โ โโโ avatar_api_encryption_key
โ โโโ ...
โโโ docker-compose.yml # Downloaded from GitHub
โโโ .avatar-templates/ # Cached templates (auto-downloaded)
โโโ .env.template
โโโ nginx.conf.template
โโโ docker-compose.yml
โโโ .template-version
Configuration Presets in Detail
Presets are defined in defaults.yaml:
presets:
default:
description: "Production-ready with telemetry and monitoring"
application:
use_console_logging: "false"
sentry_enabled: "true"
telemetry:
enabled: true
dev-mode:
description: "Development with console logging"
application:
use_console_logging: "true"
sentry_enabled: "false"
telemetry:
enabled: false
airgapped:
description: "No external monitoring/telemetry"
application:
use_console_logging: "false"
sentry_enabled: "false"
telemetry:
enabled: false
You can override preset values during interactive configuration.
Template Download Mechanism
Templates are downloaded from GitHub on first run:
- Check cache -
.avatar-templates/directory - Download if needed - From
github.com/octopize/avatar-deployment - Use cached - On subsequent runs (unless
--skip-downloadis used)
This ensures:
- โ Always get latest templates (from specified branch)
- โ Offline support (once cached)
- โ No repository cloning required
- โ Minimal package size
State Management
The tool saves progress to .deployment-state.yaml allowing you to:
- Resume interrupted configurations
- Track which steps completed
- Avoid re-entering values
Steps:
- Collect required config
- Collect optional config
- Generate .env file
- Generate nginx.conf
- Generate secrets
- Prompt for user secrets (optional)
- Finalize
# If interrupted, just run again:
octopize-avatar-deploy --output-dir /app/avatar
# Tool will ask: "Continue from where you left off? [Y/n]"
Troubleshooting
Templates not downloading
# Force re-download
rm -rf .avatar-templates/
octopize-avatar-deploy --output-dir /app/avatar --verbose
Use specific Git branch
# Download from development branch
octopize-avatar-deploy \
--output-dir /app/avatar \
--download-branch develop \
--verbose
Offline mode
# Download templates once
octopize-avatar-deploy --output-dir /app/avatar
# Then use cached versions
octopize-avatar-deploy --output-dir /app/avatar --skip-download
Development
Project Structure
deployment-tool/
โโโ configure.py # Main script (bundled)
โโโ state_manager.py # State management (bundled)
โโโ download_templates.py # Template downloader (bundled)
โโโ defaults.yaml # Defaults and presets (bundled)
โโโ tests/ # Test suite
โโโ README.md
โโโ pyproject.toml # Package configuration
Running Tests
cd deployment-tool
pytest tests/
Building Package
pip install build
python -m build
Related Documentation
Support
For issues and questions:
- Email: help@octopize.io
- Documentation: https://docs.octopize.io
- Repository: https://github.com/octopize/avatar-deployment
License
Apache License v2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octopize_deploy_tool-0.1.0.tar.gz.
File metadata
- Download URL: octopize_deploy_tool-0.1.0.tar.gz
- Upload date:
- Size: 132.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814d7a2525f8ae7d69ae8016b01b5d596a4200f2ad51314b4d8732e6bdda7b60
|
|
| MD5 |
7c396a27f6adc05a6f24c515b7a7d7f9
|
|
| BLAKE2b-256 |
2480a075a80eb119d32b447a0089bc94d1f2af717767bbd85503315b0c7c49e6
|
File details
Details for the file octopize_deploy_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: octopize_deploy_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb720a51962a925f94e07ef8b1721b530894ba08fe5d6a6afa5bec8842e2f91
|
|
| MD5 |
26647f0fd9fd5cc09dd048df344ac793
|
|
| BLAKE2b-256 |
c70854d3938bba90d18131a184d8442e77704c6fe75ab4c663ed5e634e805343
|