-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathrun-s3-gather-build
More file actions
executable file
·31 lines (27 loc) · 1.2 KB
/
run-s3-gather-build
File metadata and controls
executable file
·31 lines (27 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
set -e
cd "`dirname "$0"`"
export METRICS_UTILITY_REPORT_TYPE="CCSPv2"
export METRICS_UTILITY_SHIP_PATH="$$"
export METRICS_UTILITY_SHIP_TARGET="s3"
export METRICS_UTILITY_BUCKET_ACCESS_KEY="myuseraccesskey"
export METRICS_UTILITY_BUCKET_ENDPOINT="http://localhost:9000"
export METRICS_UTILITY_BUCKET_NAME="metricsutilitys3"
export METRICS_UTILITY_BUCKET_REGION="us-east-1"
export METRICS_UTILITY_BUCKET_SECRET_KEY="myusersecretkey"
if ! pg_isready -h localhost; then
echo "run-s3-gather-build: DB not ready, run make compose first"
exit 1
fi
minio-mc alias set local "$METRICS_UTILITY_BUCKET_ENDPOINT" "$METRICS_UTILITY_BUCKET_ACCESS_KEY" "$METRICS_UTILITY_BUCKET_SECRET_KEY"
echo
echo minio-mc ls -r local/"$METRICS_UTILITY_BUCKET_NAME"/"$METRICS_UTILITY_SHIP_PATH"
minio-mc ls -r local/"$METRICS_UTILITY_BUCKET_NAME"/"$METRICS_UTILITY_SHIP_PATH"
echo
uv run ./manage.py gather_automation_controller_billing_data --ship --since=2025-06-01 --until=2025-07-01 --force
echo
minio-mc ls -r local/"$METRICS_UTILITY_BUCKET_NAME"/"$METRICS_UTILITY_SHIP_PATH"/data
echo
uv run ./manage.py build_report --month=2025-06 --force
echo
minio-mc ls -r local/"$METRICS_UTILITY_BUCKET_NAME"/"$METRICS_UTILITY_SHIP_PATH"/reports