| name | weaver-install |
| description | Install Weaver from Docker or source for local development, testing, or production deployment.
Covers Docker deployment and conda environment setup using Makefile targets. Use when setting up a
new Weaver instance or development environment.
|
| license | Apache-2.0 |
| compatibility | Requires Python 3.10+, conda (recommended), Docker (for container deployment), Make. |
| metadata | {"author":"fmigneault"} |
Install Weaver
Install and set up Weaver for development, testing, or production use.
When to Use
- Setting up a new Weaver development environment
- Installing Weaver for local testing
- Deploying Weaver in production
- Contributing to Weaver development
- Running Weaver services locally
Prerequisites
System Requirements
- Python: 3.10 or higher
- Operating System: Linux, macOS, or Windows (with WSL)
- Make: Build tool for using Makefile targets (if using source installation instead of Docker)
Required Dependencies
- Git: For cloning repository
- Conda/Miniconda: For isolated environment management (recommended)
- Docker: For containerized deployment (portable production/testing)
Note: If you prefer to install directly in your current Python environment without conda, you can set CONDA_CMD=""
(empty string) before running make commands. This bypasses conda creation/activation/detection and installs using the
detected Python interpreter.
Installation Methods
Method 1: Docker (Recommended for Production)
Pull Pre-built Image
docker pull pavics/weaver:latest
docker pull pavics/weaver:latest-manager
docker pull pavics/weaver:latest-worker
docker pull pavics/weaver:X.Y.Z
docker pull pavics/weaver:X.Y.Z-manager
docker pull pavics/weaver:X.Y.Z-worker
Run Weaver Container
docker run -p 4001:4001 pavics/weaver:latest
docker run -p 4001:4001 \
-v $(pwd)/config:/config \
-e WEAVER_INI_FILE=/config/weaver.ini \
pavics/weaver:latest
cd docker
cp docker-compose.yml.example docker-compose.yml
docker-compose up -d
Available Docker Tags
pavics/weaver:latest - Latest development version
pavics/weaver:latest-manager - Manager service (latest)
pavics/weaver:latest-worker - Worker service (latest)
pavics/weaver:X.Y.Z - Specific stable version
pavics/weaver:X.Y.Z-manager - Manager service (specific version)
pavics/weaver:X.Y.Z-worker - Worker service (specific version)
Method 2: From Source with Makefile (Development)
Clone Repository
git clone https://github.com/crim-ca/weaver.git
cd weaver
git checkout X.Y.Z
Install with Makefile Targets
The Makefile provides several installation targets for different use cases:
Standard Installation (Recommended)
make install
This is sufficient for:
- Running Weaver CLI commands (
weaver deploy, weaver execute, etc.)
- Starting Weaver server locally
- Deploying and executing processes
- General usage and testing
This is an alias for make install-all and runs:
conda-env - Creates conda environment
conda-install - Installs conda packages (proj, etc.)
install-sys - Installs system dependencies
install-pkg - Installs application packages
install-pip - Installs application as editable package
install-dev - Installs development/test dependencies
Runtime-Only Installation (Minimal)
make install-run
Use this if you only need:
- To run Weaver server in production
- Minimal installation footprint
- No testing or development capabilities
This runs:
conda-install - Installs conda packages
install-sys - Installs system dependencies
install-pkg - Installs application packages
install-raw - Installs application without dependencies
Development-Specific Targets
These are only needed for Weaver development (not required for using Weaver):
make install-dev
make install-doc
make install-pip
Individual Component Targets
make conda-env
make install-sys
make install-pkg
make install-raw
Quick Installation
For most users (running Weaver commands and processes):
make install
conda activate weaver
weaver --version
pserve config/weaver.ini
Alternative: Without conda (use current Python environment):
CONDA_CMD="" make install
weaver --version
pserve config/weaver.ini
Manual Step-by-Step Installation
If you prefer to understand each step:
make conda-env
conda activate weaver
make install-sys
make install-pkg
make install-pip
make install-dev
Note: make install does all of the above automatically.
Configuration
Create Configuration File
cp config/weaver.ini.example config/weaver.ini
vim config/weaver.ini
Key Configuration Options
[app:main]
weaver.configuration = HYBRID
weaver.url = http://localhost:4001
weaver.wps_output_url = http://localhost:4001/wpsoutputs
weaver.wps_output_dir = /tmp/weaver-outputs
weaver.mongodb_connection = mongodb://localhost:27017/weaver
celery.broker_url = mongodb://localhost:27017/celery
celery.result_backend = mongodb://localhost:27017/celery
Configuration Modes
ADES (Application Deployment and Execution Service):
- Local process execution
- Direct access to data
- Single-node deployment
EMS (Execution Management Service):
- Orchestrates remote ADES
- Distributed workflow execution
- Multi-node deployment
HYBRID:
- Both ADES and EMS capabilities
- Most flexible configuration
Running Weaver
Development Mode
pserve config/weaver.ini --reload
Production Mode
gunicorn --paste config/weaver.ini -b 0.0.0.0:4001 --workers 4
docker-compose -f docker/docker-compose.yml up -d
Worker Process
celery -A pyramid_celery.celery_app worker \
--ini config/weaver.ini \
--loglevel INFO
Verification
Check Installation
conda activate weaver
python -c "import weaver; print(weaver.__version__)"
weaver --version
weaver info -u http://localhost:4001
curl http://localhost:4001/
Test Installation
make test
make test-unit
make test-functional
Verify Services
curl http://localhost:4001/ | jq
curl http://localhost:4001/processes | jq
curl http://localhost:4001/conformance | jq
weaver info -u http://localhost:4001
weaver capabilities -u http://localhost:4001
Common Installation Issues
Issue: Python Version Too Old
conda create -n weaver python=3.10
conda activate weaver
make install
Issue: Conda Not Found
make conda-base
CONDA_CMD="" make install
Issue: Missing System Dependencies
sudo apt-get update
sudo apt-get install -y build-essential python3-dev libproj-dev
brew install proj
make install-sys
make install-pkg
Issue: MongoDB Connection Failed
sudo apt-get install mongodb
sudo systemctl start mongodb
docker run -d -p 27017:27017 --name mongodb mongo:latest
weaver.mongodb_connection = mongodb://localhost:27017/weaver
Issue: Celery Worker Not Starting
sudo systemctl status mongodb
docker ps | grep mongo
celery.broker_url = mongodb://localhost:27017/celery
Issue: Docker Permission Denied
sudo usermod -aG docker $USER
newgrp docker
sudo docker pull pavics/weaver:latest
Issue: Make Target Fails
make conda-env
conda activate weaver
make install-sys
make install-pkg
make install-pip
Development Setup
Standard Setup (Using Weaver)
git clone https://github.com/crim-ca/weaver.git
cd weaver
make install
conda activate weaver
pserve config/weaver.ini --reload
conda activate weaver
celery -A pyramid_celery.celery_app worker --ini config/weaver.ini
Advanced Development Setup (Contributing to Weaver)
Only needed if you're modifying Weaver's code:
make lint
make check-types
make format
make install-doc
make docs
make clean
Updating Installation
git pull origin master
make install
make install-pkg
make install-pip
Docker Compose Deployment
Setup
cd docker
cp docker-compose.yml.example docker-compose.yml
cp ../config/weaver.ini.example ../config/weaver.ini
vim docker-compose.yml
vim ../config/weaver.ini
Deploy Services
docker-compose up -d
docker-compose logs -f weaver
docker-compose ps
docker-compose down
Services Included
- weaver-manager: API and job management
- weaver-worker: Job execution worker
- mongodb: Database
- nginx: Reverse proxy (optional)
Environment Variables
Common Variables
export WEAVER_URL=http://localhost:4001
export WEAVER_INI_FILE=/path/to/weaver.ini
export WEAVER_LOG_LEVEL=DEBUG
export WEAVER_WPS_OUTPUT_DIR=/tmp/weaver-outputs
export WEAVER_MONGODB_CONNECTION=mongodb://localhost:27017/weaver
Post-Installation
Deploy Sample Processes
conda activate weaver
weaver deploy -u $WEAVER_URL \
-p hello-world \
-b tests/functional/application-packages/DockerCopyImages/deploy.json
weaver capabilities -u $WEAVER_URL
weaver execute -u $WEAVER_URL \
-p hello-world \
-I tests/functional/application-packages/DockerCopyImages/execute.json
Configure Data Sources
cp config/data_sources.yml.example config/data_sources.yml
vim config/data_sources.yml
Set Up Vault (Optional)
cp config/request_options.yml.example config/request_options.yml
vim config/request_options.yml
Production Considerations
Security
- Use HTTPS in production
- Configure authentication (if needed)
- Secure MongoDB connections
- Isolate worker processes
- Restrict Docker socket access
Performance
- Use multiple workers for job execution
- Configure appropriate resource limits
- Use external MongoDB for persistence
- Enable result caching
- Monitor resource usage
Monitoring
- Set up log aggregation
- Configure health checks
- Monitor job queue
- Track resource usage
- Set up alerts
Makefile Reference
Installation Targets
make install
make install-all
make install-run
make install-dev
make install-doc
make install-pkg
make install-sys
make install-pip
make install-raw
Environment Targets
make conda-base
make conda-env
make conda-config
make conda-install
Testing Targets
make test
make test-unit
make test-functional
Development Targets
make start
make start-worker
make clean
make lint
make docs
Related Skills
Documentation
Quick Start Summary
docker pull pavics/weaver:latest
docker run -p 4001:4001 pavics/weaver:latest
git clone https://github.com/crim-ca/weaver.git
cd weaver
make install
conda activate weaver
pserve config/weaver.ini
weaver info -u http://localhost:4001
Choose the method that best fits your use case and environment!