Minimal local dev setup with one db node (adjust accordingly if needed more nodes)
- Python >=3.10.0 (system-wide or pyenv)
- NodeJS >=16 (with npm)
- Yarn (can be installed globally with
npm -g install yarn
) - poetry
- docker-compose
poetry install --with dev,web-backend,docker-image
yarn install
Create a argus.local.yaml
configuration file (used to configure database connection) and a argus_web.yaml
(used for webapp secrets) in your application install directory.
contact_points:
- 172.18.0.2
username: cassandra
password: cassandra
keyspace_name: argus
Replace all <> with your values. Find instructions below.
BASE_URL: "https://argus.scylladb.com"
SCYLLA_CONTACT_POINTS:
- 172.18.0.2
SCYLLA_USERNAME: cassandra
SCYLLA_PASSWORD: cassandra
SCYLLA_KEYSPACE_NAME: argus
APP_LOG_LEVEL: INFO
SECRET_KEY: MUSTBEUNIQUE
GITHUB_CLIENT_ID: <>
GITHUB_CLIENT_SECRET: <>
GITHUB_ACCESS_TOKEN: unknown
# List of required organization names (Comment out to disable organization requirement)
#GITHUB_REQUIRED_ORGANIZATIONS:
JENKINS_URL: https://jenkins.scylladb.com
JENKINS_USER: <your username>
JENKINS_API_TOKEN_NAME: argus-dev
JENKINS_API_TOKEN: <jenkins api token>
EMAIL_SENDER: "[email protected]"
EMAIL_SENDER_USER: ""
EMAIL_SENDER_PASS: ""
EMAIL_SERVER: "smtp.gmail.com"
EMAIL_SERVER_PORT: "587"
JOB_VALIDITY_PERIOD_DAYS: 30
- GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
- go to your Account Settings (top right corner) -> Developer settings (left pane) -> OAuth Apps
- Click Create New OAuth App button
- Fill the fields (app name:
argus-dev
, homepage URLhttp://localhost:5000
, Auth callback URL:http://localhost:5000/profile/oauth/github
) - Confirm and get the tokens/ids required for config - visible on the page
- Click your username in top right corner
- write down user id
- Go to
Configure
from left panel - Click
Add new Token
and name itargus-dev
- Get it and paste to config to
JENKINS_API_TOKEN
param
docker-compose -f dev-db/docker-compose.yaml up -d
docker exec -it argus_alpha_1 cqlsh --user cassandra --password cassandra -e "CREATE KEYSPACE argus WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor' : 1};"
FLASK_DEBUG=1 FLASK_ENV=development FLASK_APP=argus_backend:argus_app poetry run flask cli sync-models
FLASK_DEBUG=1 FLASK_ENV=development FLASK_APP=argus_backend:argus_app poetry run flask cli scan-jenkins
- From S3
aws s3 cp s3://argus-utilities/sample_data.tar.zst .
- From prod db
- Configure prod db (setup argus.local.yaml) by creating a ssh tunnel:
argus.local.yaml# get argus-web details from the tribe ssh argus-web -L 127.0.0.10:9042:10.10.2.62:9042 -L 127.0.0.11:9042:10.10.2.157:9042 -L 127.0.0.12:9042:10.10.2.74:9042 -L 127.0.0.10:19042:10.10.2.62:19042 -L 127.0.0.11:19042:10.10.2.157:19042 -L 127.0.0.12:19042:10.10.2.74:19042
# SCYLLA_CONTACT_POINTS: - 127.0.0.10 - 127.0.0.11 - 127.0.0.12 # get db details from the tribe
Modify release
variable in dev-db/export_data.py
and glob paths to your need.
Run multiple times to download all the releases you need.
python dev-db/export_data.py
python dev-db/import_data.py
Sporadical errors like Test entity missing for key "enterprise-2023.1/upgrade-with-raft/rolling-upgrade-centos8-with-raft-test", run won't be visible until this is corrected
can be ignored.
Compile frontend files from /frontend
into /public/dist
. Add --watch to recompile files on change.
WEBPACK_ENVIRONMENT=development yarn webpack --watch
FLASK_ENV="development" FLASK_APP="argus_backend:start_server" FLASK_DEBUG=1 CQLENG_ALLOW_SCHEMA_MANAGEMENT=1 flask run
Omit FLASK_DEBUG
if running your own debugger (pdb, pycharm, vscode)
Open browser at http://localhost:5000
(use localhost as Github OAuth setup instead of 127.0.0.1 )