Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
14d3b85
feat: enhance environment configuration for storage services
asadaaron Oct 8, 2025
334b8d1
Merge branch 'main' into feat/configure-storage-service-variables
asadaaron Oct 8, 2025
b789eec
feat: update backend and worker workflows to enhance storage service …
asadaaron Oct 8, 2025
c9fef15
fix: update STORAGE_SERVICE_ACCOUNT_KEY handling in backend workflows
asadaaron Oct 8, 2025
fb19a19
refactor: standardize STORAGE_SERVICE_ACCOUNT_KEY handling across wor…
asadaaron Oct 9, 2025
400e86a
Merge branch 'main' into feat/configure-storage-service-variables
asadaaron Oct 9, 2025
39721ab
refactor: streamline environment variable handling in backend workflows
asadaaron Oct 9, 2025
b28b95b
chore: update service-secrets-create.sh to include additional storage…
asadaaron Oct 10, 2025
b281934
Revert "refactor: streamline environment variable handling in backend…
asadaaron Oct 10, 2025
9051747
chore: update service-secrets configuration to require Base64 encodin…
asadaaron Oct 10, 2025
f3da1c6
Merge branch 'main' into feat/configure-storage-service-variables
asadaaron Oct 10, 2025
f4a6c9f
chore: update environment and workflow configurations for storage ser…
asadaaron Oct 10, 2025
f30da4c
chore: remove STORAGE_PROJECT_ID from workflow and configuration files
asadaaron Oct 10, 2025
130b5c2
Merge branch 'main' into feat/configure-storage-service-variables
asadaaron Oct 10, 2025
56cb4ac
feat: add storage service environment variables to deployment configu…
asadaaron Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ DATABASE_URL=postgresql://rhesis-user:your-secured-password@localhost:5432/rhesi

# Development paths (adjust as needed)
RHESIS_BASE_PATH=/path/to/your/rhesis/project/
LOCAL_STORAGE_PATH=/tmp/rhesis-files # fallback for local development
# Optional: set these if you want to access GCS locally
# STORAGE_SERVICE_URI=gs://sources-rhesis-dev
# STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'

#####################################################################################
# πŸ“š QUICK START GUIDE
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/backend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
FROM_EMAIL: ${{ secrets.FROM_EMAIL }}
STORAGE_SERVICE_URI: ${{ secrets.STORAGE_SERVICE_URI }}
STORAGE_SERVICE_ACCOUNT_KEY: ${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }}
LOCAL_STORAGE_PATH: ${{ secrets.LOCAL_STORAGE_PATH }}

services:
postgres:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ jobs:
FROM_EMAIL=${{ secrets.FROM_EMAIL }},
BROKER_URL=${{ secrets.BROKER_URL }},
CELERY_RESULT_BACKEND=${{ secrets.CELERY_RESULT_BACKEND }},
STORAGE_PROJECT_ID=${{ secrets.STORAGE_PROJECT_ID }}
STORAGE_SERVICE_URI=${{ secrets.STORAGE_SERVICE_URI }},
STORAGE_SERVICE_ACCOUNT_KEY=${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }},
LOCAL_STORAGE_PATH=${{ secrets.LOCAL_STORAGE_PATH }}
EOF
)"

Expand Down Expand Up @@ -373,7 +375,9 @@ jobs:
FROM_EMAIL=${{ secrets.FROM_EMAIL }},
BROKER_URL=${{ secrets.BROKER_URL }},
CELERY_RESULT_BACKEND=${{ secrets.CELERY_RESULT_BACKEND }},
STORAGE_PROJECT_ID=${{ secrets.STORAGE_PROJECT_ID }}
STORAGE_SERVICE_URI=${{ secrets.STORAGE_SERVICE_URI }},
STORAGE_SERVICE_ACCOUNT_KEY=${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }},
LOCAL_STORAGE_PATH=${{ secrets.LOCAL_STORAGE_PATH }}
EOF
)"

Expand Down Expand Up @@ -551,7 +555,9 @@ jobs:
FROM_EMAIL=${{ secrets.FROM_EMAIL }},
BROKER_URL=${{ secrets.BROKER_URL }},
CELERY_RESULT_BACKEND=${{ secrets.CELERY_RESULT_BACKEND }},
STORAGE_PROJECT_ID=${{ secrets.STORAGE_PROJECT_ID }}
STORAGE_SERVICE_URI=${{ secrets.STORAGE_SERVICE_URI }},
STORAGE_SERVICE_ACCOUNT_KEY=${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }},
LOCAL_STORAGE_PATH=${{ secrets.LOCAL_STORAGE_PATH }}
EOF
)"

Expand Down Expand Up @@ -616,7 +622,9 @@ jobs:
FROM_EMAIL=${{ secrets.FROM_EMAIL }},
BROKER_URL=${{ secrets.BROKER_URL }},
CELERY_RESULT_BACKEND=${{ secrets.CELERY_RESULT_BACKEND }},
STORAGE_PROJECT_ID=${{ secrets.STORAGE_PROJECT_ID }}
STORAGE_SERVICE_URI=${{ secrets.STORAGE_SERVICE_URI }},
STORAGE_SERVICE_ACCOUNT_KEY=${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }},
LOCAL_STORAGE_PATH=${{ secrets.LOCAL_STORAGE_PATH }}
EOF
)"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ jobs:
--from-literal=BACKEND_ENV="${{ secrets.BACKEND_ENV }}" \
--from-literal=WORKER_ENV="${{ secrets.WORKER_ENV }}" \
--from-literal=FRONTEND_URL="${{ secrets.FRONTEND_URL }}" \
--from-literal=STORAGE_PROJECT_ID="${{ secrets.STORAGE_PROJECT_ID }}" \
--from-literal=STORAGE_SERVICE_URI="${{ secrets.STORAGE_SERVICE_URI }}" \
--from-literal=STORAGE_SERVICE_ACCOUNT_KEY=${{ secrets.STORAGE_SERVICE_ACCOUNT_KEY }} \
--from-literal=LOCAL_STORAGE_PATH="${{ secrets.LOCAL_STORAGE_PATH }}" \
--dry-run=client -o yaml | kubectl apply -f -

- name: Deploy to GKE
Expand Down
16 changes: 16 additions & 0 deletions apps/worker/k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ spec:
name: rhesis-worker-secrets
key: worker_env
optional: true
# Storage service configuration
- name: STORAGE_SERVICE_URI
valueFrom:
secretKeyRef:
name: rhesis-worker-secrets
key: STORAGE_SERVICE_URI
- name: STORAGE_SERVICE_ACCOUNT_KEY
valueFrom:
secretKeyRef:
name: rhesis-worker-secrets
key: STORAGE_SERVICE_ACCOUNT_KEY
- name: LOCAL_STORAGE_PATH
valueFrom:
secretKeyRef:
name: rhesis-worker-secrets
key: LOCAL_STORAGE_PATH
ports:
- containerPort: 8080
name: health
Expand Down
16 changes: 16 additions & 0 deletions infrastructure/config/service-secrets-config.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export DEV_FROM_EMAIL="[email protected]"
export DEV_DEMO_USER_EMAIL="[email protected]"
export DEV_DEMO_USER_PASSWORD="PlatypusDemo!"
export DEV_BACKEND_ENV="development"
export DEV_STORAGE_SERVICE_URI="gs://sources-rhesis-dev"
# Note: STORAGE_SERVICE_ACCOUNT_KEY should be Base64 encoded JSON to avoid parsing issues with commas
export DEV_STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'
export DEV_LOCAL_STORAGE_PATH="/tmp/rhesis-files"
# Celery worker variables
export DEV_BROKER_URL="rediss://:your-redis-auth-string@your-redis-host:6378/0?ssl_cert_reqs=CERT_NONE"
export DEV_CELERY_RESULT_BACKEND="rediss://:your-redis-auth-string@your-redis-host:6378/1?ssl_cert_reqs=CERT_NONE"
Expand Down Expand Up @@ -98,6 +102,10 @@ export STG_SMTP_PASSWORD="smtp-password"
export STG_FROM_EMAIL="[email protected]"
export STG_DEMO_USER_EMAIL="[email protected]"
export STG_DEMO_USER_PASSWORD="PlatypusDemo!"
export STG_STORAGE_SERVICE_URI="gs://sources-rhesis-stg"
# Note: STORAGE_SERVICE_ACCOUNT_KEY should be Base64 encoded JSON to avoid parsing issues with commas
export STG_STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'
export STG_LOCAL_STORAGE_PATH="/tmp/rhesis-files"
# Celery worker variables
export STG_WORKER_ENV="staging"
export STG_BROKER_URL="rediss://:your-redis-auth-string@your-redis-host:6378/0?ssl_cert_reqs=CERT_NONE"
Expand Down Expand Up @@ -157,6 +165,10 @@ export PRD_SMTP_PASSWORD="smtp-password"
export PRD_FROM_EMAIL="[email protected]"
export PRD_DEMO_USER_EMAIL="[email protected]"
export PRD_DEMO_USER_PASSWORD="PlatypusDemo!"
export PRD_STORAGE_SERVICE_URI="gs://sources-rhesis-prd"
# Note: STORAGE_SERVICE_ACCOUNT_KEY should be Base64 encoded JSON to avoid parsing issues with commas
export PRD_STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'
export PRD_LOCAL_STORAGE_PATH="/tmp/rhesis-files"
# Celery worker variables
export PRD_WORKER_ENV="production"
export PRD_BROKER_URL="rediss://:your-redis-auth-string@your-redis-host:6378/0?ssl_cert_reqs=CERT_NONE"
Expand Down Expand Up @@ -210,6 +222,10 @@ export TEST_SMTP_PASSWORD="smtp-password"
export TEST_FROM_EMAIL="[email protected]"
export TEST_DEMO_USER_EMAIL="[email protected]"
export TEST_DEMO_USER_PASSWORD="PlatypusDemo!"
export TEST_STORAGE_SERVICE_URI="gs://sources-rhesis-test"
# Note: STORAGE_SERVICE_ACCOUNT_KEY should be Base64 encoded JSON to avoid parsing issues with commas
export TEST_STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'
export TEST_LOCAL_STORAGE_PATH="/tmp/rhesis-files"
export TEST_REDIS_URL="redis://localhost:6379"
export TEST_BROKER_URL="redis://localhost:6379/0"
export TEST_CELERY_RESULT_BACKEND="redis://localhost:6379/0"
Expand Down
12 changes: 12 additions & 0 deletions infrastructure/config/service-secrets-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ function show_usage() {
echo " FROM_EMAIL Email address to use as sender"
echo " DEMO_USER_EMAIL Demo user email address"
echo " DEMO_USER_PASSWORD Demo user password"
echo " STORAGE_SERVICE_URI Google Cloud Storage bucket URI"
echo " STORAGE_SERVICE_ACCOUNT_KEY Google Cloud Storage service account key (Base64 encoded JSON)"
echo " LOCAL_STORAGE_PATH Local storage path for temporary files"
echo ""
echo " # Celery worker variables"
echo " BROKER_URL Celery broker URL"
echo " CELERY_RESULT_BACKEND Celery result backend URL"
echo " CELERY_WORKER_CONCURRENCY Worker concurrency (number of processes)"
echo " CELERY_WORKER_PREFETCH_MULTIPLIER Worker prefetch multiplier"
echo " CELERY_WORKER_MAX_TASKS_PER_CHILD Max tasks per child process"
echo " STORAGE_SERVICE_URI Google Cloud Storage bucket URI"
echo " STORAGE_SERVICE_ACCOUNT_KEY Google Cloud Storage service account key (Base64 encoded JSON)"
echo " LOCAL_STORAGE_PATH Local storage path for temporary files"
echo ""
echo " # Frontend variables"
echo " NEXTAUTH_URL NextAuth URL"
Expand Down Expand Up @@ -218,13 +224,19 @@ SERVICE_VARS=(
"FROM_EMAIL"
"DEMO_USER_EMAIL"
"DEMO_USER_PASSWORD"
"STORAGE_SERVICE_URI"
"STORAGE_SERVICE_ACCOUNT_KEY"
"LOCAL_STORAGE_PATH"

# Celery worker variables
"BROKER_URL"
"CELERY_RESULT_BACKEND"
"CELERY_WORKER_CONCURRENCY"
"CELERY_WORKER_PREFETCH_MULTIPLIER"
"CELERY_WORKER_MAX_TASKS_PER_CHILD"
"STORAGE_SERVICE_URI"
"STORAGE_SERVICE_ACCOUNT_KEY"
"LOCAL_STORAGE_PATH"

# Frontend variables
"NEXTAUTH_URL"
Expand Down