Task 0.5 of clean-analyst-bootstrap. Greenfield rewrite — no fallback, no aliases. Existing dev environments lose their cached PAT and must re-authenticate. Env var renames (hard cutover): - DA_CONFIG_DIR -> AGNES_CONFIG_DIR - DA_SERVER -> AGNES_SERVER - DA_SERVER_URL -> AGNES_SERVER_URL (test-only stale ref, not in spec) - DA_NO_UPDATE_CHECK -> AGNES_NO_UPDATE_CHECK - DA_LOCAL_DIR -> AGNES_LOCAL_DIR - DA_TOKEN -> AGNES_TOKEN - DA_STREAM_RETRIES -> AGNES_STREAM_RETRIES Config dir rename: ~/.config/da/ -> ~/.config/agnes/ (across code, comments, docstrings, error messages, install templates, dev scripts). Stale `da X` references in CLI source (and adjacent app/, tests/): swept docstrings, comments, help text, and error messages where the verb survives the rewrite (init, pull, push, catalog, status, diagnose, auth, admin, skills, query, schema, describe, explore, disk-info, snapshot, login, logout, whoami, server, setup) and replaced `da X` with `agnes X`. Intentionally kept `da sync`, `da fetch`, `da analyst`, `da metrics` — those verbs are removed in later tasks; the legacy strings will be detected by `_LEGACY_STRINGS` (added in Task 2). Test fixes: - TestCLIVersion now asserts output starts with `agnes ` (was `da `). Test results: 2675 passed, 25 skipped (full pytest run, excluding 9 pre-existing test_db.py / test_user_management.py / test_e2e_extract.py / test_cli_binary_rename.py failures unrelated to this rename).
58 lines
1.3 KiB
Markdown
58 lines
1.3 KiB
Markdown
# Setup — Complete guide for deploying a new instance
|
|
|
|
## Prerequisites
|
|
- Docker and Docker Compose installed
|
|
- Domain name pointing to server IP (for SSL)
|
|
- Data source credentials (Keboola token OR BigQuery service account)
|
|
|
|
## Steps
|
|
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone <repo-url>
|
|
cd data-analyst
|
|
```
|
|
|
|
2. Create configuration:
|
|
```bash
|
|
cp config/instance.yaml.example config/instance.yaml
|
|
# Edit instance.yaml with your settings
|
|
```
|
|
|
|
3. Create environment file:
|
|
```bash
|
|
cp config/.env.template .env
|
|
# Fill in: JWT_SECRET_KEY, KEBOOLA_STORAGE_TOKEN (or BIGQUERY_PROJECT), etc.
|
|
```
|
|
|
|
4. Start services:
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
5. Verify health:
|
|
```bash
|
|
agnes status --server http://your-server:8000
|
|
```
|
|
|
|
6. Create first admin user:
|
|
```bash
|
|
agnes login --email admin@company.com --server http://your-server:8000
|
|
agnes admin add-user admin@company.com --role admin
|
|
```
|
|
|
|
7. Trigger initial data sync:
|
|
```bash
|
|
agnes admin trigger-sync
|
|
```
|
|
|
|
8. Verify data:
|
|
```bash
|
|
agnes status
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
- **Cannot connect:** Check `docker compose ps`, verify port 8000 is exposed
|
|
- **Auth fails:** Verify JWT_SECRET_KEY is set in .env
|
|
- **No data:** Check data source credentials, run `agnes diagnose`
|