Skip to content

Setup

Local development runs directly on your machine (no Docker). You need Python 3.8, AWS credentials, and network access to staging secrets.

Prerequisites

Requirement Why
Python 3.8 Production and deploy scripts use python3.8 (see scripts/after_install).
AWS CLI credentials secretsmanager:GetSecretValue on /stg/*, /prd/*, /common/*
GitHub SSH access requirements.txt pulls private deps (fs_config, skynet-common-functions, …)
Disk space Luigi state under luigi/default/; temp files in /tmp/

One-time venv setup

cd skynet-sources-harvester
python3.8 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt

For development against the staging provider API pin:

pip install -r requirements-dev.txt   # adds skynet-provider-api@stage

Production deploys install requirements-prd.txt instead (@master pin).

Verify AWS access

aws sts get-caller-identity
python -c "from fs_config import get_secret; print('ok')"

Environment label

export ENVIRONMENT=local
ENVIRONMENT Secrets from Default if unset
local /stg/... (staging) —
stg /stg/... —
prd /prd/... yes (deploy-safe default)

Unset defaults to production

If ENVIRONMENT is not set, config/cfg.py selects production secret paths. Always export ENVIRONMENT=local for laptop work.

Optional: prod MySQL from local

Use only when you intentionally need production data (read carefully):

export ENVIRONMENT=local
export LOCAL_PROD_DB=1

This keeps non-MySQL secrets on /stg/... but points MYSQL_SETTINGS at /prd/mysql/skynet-harvester.

Deploy layout (reference)

On EC2, CodeDeploy writes /srv/skynet-sources-harvester/.env with ENVIRONMENT=stg|prd, creates /srv/skynet-sources-harvester/env/, and installs cron from crontab/. Local development mirrors the same venv pattern under env/ in the repo checkout.