prod fixes
This commit is contained in:
30
bin/init
30
bin/init
@@ -107,8 +107,13 @@ if [[ "$ENV" == "dev" ]]; then
|
|||||||
else
|
else
|
||||||
# Prod: prompt for credentials
|
# Prod: prompt for credentials
|
||||||
read -p "Admin email: " USER_EMAIL
|
read -p "Admin email: " USER_EMAIL
|
||||||
read -s -p "Admin password (min 8 chars): " USER_PASSWORD
|
read -rs -p "Admin password (min 8 chars): " USER_PASSWORD
|
||||||
echo ""
|
echo ""
|
||||||
|
echo -e "${BLUE}Password captured: ${#USER_PASSWORD} characters${NC}"
|
||||||
|
if [[ ${#USER_PASSWORD} -lt 8 ]]; then
|
||||||
|
echo -e "${RED}✗ Password must be at least 8 characters${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
read -p "Admin display name: " USER_NAME
|
read -p "Admin display name: " USER_NAME
|
||||||
read -p "License type [free|pro|enterprise] (default: pro): " LICENSE_TYPE
|
read -p "License type [free|pro|enterprise] (default: pro): " LICENSE_TYPE
|
||||||
LICENSE_TYPE="${LICENSE_TYPE:-pro}"
|
LICENSE_TYPE="${LICENSE_TYPE:-pro}"
|
||||||
@@ -131,18 +136,35 @@ else
|
|||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
echo -e "${GREEN}→${NC} Registering user via API..."
|
echo -e "${GREEN}→${NC} Registering user via API..."
|
||||||
|
PAYLOAD=$(jq -n \
|
||||||
|
--arg email "$USER_EMAIL" \
|
||||||
|
--arg password "$USER_PASSWORD" \
|
||||||
|
--arg name "$USER_NAME" \
|
||||||
|
'{email: $email, password: $password, name: $name}')
|
||||||
|
|
||||||
HTTP_CODE=$(curl -s -o /tmp/dexorder-init-response.json -w "%{http_code}" \
|
HTTP_CODE=$(curl -s -o /tmp/dexorder-init-response.json -w "%{http_code}" \
|
||||||
-X POST "$BASE_URL/api/auth/register" \
|
-X POST "$BASE_URL/api/auth/register" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"email\":\"$USER_EMAIL\",\"password\":\"$USER_PASSWORD\",\"name\":\"$USER_NAME\"}")
|
-d "$PAYLOAD")
|
||||||
|
|
||||||
if [[ "$HTTP_CODE" == "200" || "$HTTP_CODE" == "201" ]]; then
|
if [[ "$HTTP_CODE" == "200" || "$HTTP_CODE" == "201" ]]; then
|
||||||
echo -e "${GREEN}✓ User registered via API${NC}"
|
echo -e "${GREEN}✓ User registered via API${NC}"
|
||||||
elif [[ "$HTTP_CODE" == "400" ]]; then
|
elif [[ "$HTTP_CODE" == "400" ]]; then
|
||||||
echo -e "${YELLOW}⚠️ API returned 400 (user may already exist), continuing...${NC}"
|
RESPONSE=$(cat /tmp/dexorder-init-response.json 2>/dev/null)
|
||||||
|
# Check if this is a "user already exists" 400 vs a validation error
|
||||||
|
if echo "$RESPONSE" | grep -qi "already exist\|user already\|duplicate"; then
|
||||||
|
echo -e "${YELLOW}⚠️ User already exists, continuing...${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${RED}✗ Registration failed (400):${NC}"
|
||||||
|
echo "$RESPONSE"
|
||||||
|
rm -f /tmp/dexorder-init-response.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${YELLOW}⚠️ API returned HTTP $HTTP_CODE${NC}"
|
echo -e "${RED}✗ API returned HTTP $HTTP_CODE${NC}"
|
||||||
cat /tmp/dexorder-init-response.json 2>/dev/null || true
|
cat /tmp/dexorder-init-response.json 2>/dev/null || true
|
||||||
|
rm -f /tmp/dexorder-init-response.json
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -f /tmp/dexorder-init-response.json
|
rm -f /tmp/dexorder-init-response.json
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,9 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: gateway-ingress
|
name: gateway-ingress
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- dexorder.ai
|
|
||||||
secretName: gateway-tls
|
|
||||||
rules:
|
rules:
|
||||||
- host: dexorder.ai
|
- host: dexorder.ai
|
||||||
http:
|
http:
|
||||||
|
|||||||
@@ -26,5 +26,5 @@ iceberg_table_prefix: "market"
|
|||||||
hadoop_conf_dir: "/etc/hadoop/conf"
|
hadoop_conf_dir: "/etc/hadoop/conf"
|
||||||
|
|
||||||
# Flink configuration
|
# Flink configuration
|
||||||
flink_parallelism: 2
|
flink_parallelism: 1
|
||||||
flink_checkpoint_interval_ms: 60000
|
flink_checkpoint_interval_ms: 60000
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ data:
|
|||||||
sandbox_image: git.dxod.org/dexorder/dexorder/ai-sandbox:latest
|
sandbox_image: git.dxod.org/dexorder/dexorder/ai-sandbox:latest
|
||||||
sidecar_image: git.dxod.org/dexorder/dexorder/ai-lifecycle-sidecar:latest
|
sidecar_image: git.dxod.org/dexorder/dexorder/ai-lifecycle-sidecar:latest
|
||||||
image_pull_policy: Always
|
image_pull_policy: Always
|
||||||
|
storage_class: ceph-block
|
||||||
|
|
||||||
# DragonflyDB (Redis-compatible, for hot storage and session management)
|
# DragonflyDB (Redis-compatible, for hot storage and session management)
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ ingestor_work_port: 5555 # PUB - Distribute work with exchange prefix
|
|||||||
ingestor_response_port: 5556 # ROUTER - Receive responses from ingestors
|
ingestor_response_port: 5556 # ROUTER - Receive responses from ingestors
|
||||||
|
|
||||||
# Flink connection
|
# Flink connection
|
||||||
flink_market_data_endpoint: "tcp://flink-jobmanager:5557" # XSUB - Subscribe to Flink market data
|
flink_market_data_endpoint: "tcp://flink-jobmanager:5558" # XSUB - Subscribe to Flink market data
|
||||||
|
|
||||||
# Timeouts and limits
|
# Timeouts and limits
|
||||||
request_timeout_secs: 30 # Timeout for pending client requests
|
request_timeout_secs: 30 # Timeout for pending client requests
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: kafka
|
app: kafka
|
||||||
spec:
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
containers:
|
containers:
|
||||||
- name: kafka
|
- name: kafka
|
||||||
image: apache/kafka:3.9.0
|
image: apache/kafka:3.9.0
|
||||||
@@ -153,7 +155,7 @@ spec:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
CLUSTER_ID="dexorder-prod-cluster"
|
CLUSTER_ID="dexorder-prod-cluster"
|
||||||
LOG_DIR="/var/lib/kafka/data"
|
LOG_DIR="/var/lib/kafka/data/kraft-logs"
|
||||||
|
|
||||||
# Ensure log directory exists
|
# Ensure log directory exists
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
@@ -240,6 +242,8 @@ spec:
|
|||||||
key: password
|
key: password
|
||||||
- name: POSTGRES_DB
|
- name: POSTGRES_DB
|
||||||
value: iceberg
|
value: iceberg
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: postgres-data
|
- name: postgres-data
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: /var/lib/postgresql/data
|
||||||
|
|||||||
Reference in New Issue
Block a user