Skip to content

Commit ec3e167

Browse files
committed
Comprehensive health platform updates: synthetic data, operational tooling, and architecture reorganization
SYNTHETIC DATA GENERATION: - Complete cancer_open_research_synthetic.sql with 300+ realistic cancer research records (2019-2022) - Expand annual_death_cause_synthetic.sql with comprehensive death cause statistics - Cover breast cancer, lung cancer, immunotherapy, AI/ML research, COVID-19 impact studies OPERATIONAL TOOLING: - Add health/flutter-frontend/deletepod.sh for healthai-frontend pod management with monitoring - Add health/springboot-backend/deletepod.sh for healthai-backend-springboot pod management - Add health/springboot-backend/logpod.sh for backend pod log retrieval and analysis - Add health/springboot-backend/all.sh for complete build-deploy-monitor workflow - All scripts include comprehensive kubectl operations, pod recreation monitoring, and log display ARCHITECTURE REORGANIZATION: - Move Kubernetes YAML files from k8s/ subdirectories to parent directories for simplified deployment - Remove deprecated React frontend components (Dockerfile, build.sh, deploy.sh, undeploy.sh) - Remove nodejs-backend README (consolidated documentation) - Repurpose React deployment template for Flutter frontend template INFRASTRUCTURE UPDATES: - Update Flutter Dockerfile and build scripts for improved container builds - Update Spring Boot Dockerfile, pom.xml, and deployment configurations - Enhance HealthDataController.java for better API functionality - Update build_and_push.sh scripts for both frontend and backend - Update deploy.sh scripts with improved deployment logic ENVIRONMENT CONFIGURATION: - Update financial/.env.example with current configuration patterns All changes maintain security standards with no hardcoded credentials, only operational scripts and synthetic data.
1 parent bad7c53 commit ec3e167

26 files changed

+695
-166
lines changed

financial/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export REACT_APP_STOCK_SERVICE_URL=http://localhost:8080/accounts
2222
export REACT_APP_KAFKA_TXEVENTQ_SERVICE_URL=http://localhost:8080/accounts
2323
export REACT_APP_AIAGENT_VECTOR_ADVISOR_SERVICE_URL=http://localhost:8080/accounts
2424
export REACT_APP_SPEECH_SELECTAI_QUERY_SERVICE_URL=http://localhost:8080/accounts
25-
export REACT_APP_ORDS_BASE_URL=http://localhost:8080/accounts
25+
export REACT_APP_ORDS_BASE_URL=https://asdf-financialdb.adb.eu-frankfurt-1.oraclecloudapps.com/ords
2626

2727
# Display all set environment variables
2828
echo "=== Environment Variables Set ==="

health/flutter-frontend/Dockerfile

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,54 @@
1-
# Install Operating system and dependencies
2-
FROM ubuntu:20.04
3-
4-
ARG DEBIAN_FRONTEND=noninteractive
5-
RUN apt-get update
6-
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3
7-
RUN apt-get clean
8-
9-
# download Flutter SDK from Flutter Github repo
10-
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
11-
#COPY chrome.dart /usr/local/flutter/packages/flutter_tools/lib/src/web/chrome.dart
12-
#edit /usr/local/flutter/packages/flutter_tools/lib/src/web/chrome.dart
13-
#after '--disable-popup-blocking',
14-
# include '--disable-web-security',
15-
16-
# Set flutter environment path
17-
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
18-
19-
# Run flutter doctor
20-
RUN flutter doctor
1+
# Use Ubuntu base and install Flutter manually for better control
2+
FROM ubuntu:22.04
3+
4+
# Set environment variables
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ENV FLUTTER_HOME=/opt/flutter
7+
ENV PATH="$FLUTTER_HOME/bin:$PATH"
8+
9+
# Install dependencies
10+
RUN apt-get update && apt-get install -y \
11+
curl \
12+
git \
13+
wget \
14+
unzip \
15+
xz-utils \
16+
zip \
17+
libglu1-mesa \
18+
python3 \
19+
psmisc \
20+
&& apt-get clean \
21+
&& rm -rf /var/lib/apt/lists/*
22+
23+
# Download and install Flutter
24+
RUN git clone https://github.com/flutter/flutter.git $FLUTTER_HOME && \
25+
cd $FLUTTER_HOME && \
26+
git checkout stable
27+
28+
# Pre-download Flutter dependencies
29+
RUN flutter precache --web
2130

2231
# Enable flutter web
23-
RUN flutter channel master
24-
RUN flutter upgrade
2532
RUN flutter config --enable-web
26-
COPY chrome.dart /usr/local/flutter/packages/flutter_tools/lib/src/web/chrome.dart
2733

28-
# Copy files to container and build
29-
RUN mkdir /app/
34+
# Create app directory
35+
WORKDIR /app
36+
37+
# Copy the app source code
3038
COPY . /app/
31-
WORKDIR /app/
39+
40+
# Copy custom chrome configuration if needed
41+
RUN if [ -f "chrome.dart" ]; then \
42+
cp chrome.dart $FLUTTER_HOME/packages/flutter_tools/lib/src/web/chrome.dart; \
43+
fi
44+
45+
# Build the Flutter web app
3246
RUN flutter build web
3347

3448
# Record the exposed port
3549
EXPOSE 5000
3650

37-
# make server startup script executable and start the web server
38-
RUN ["chmod", "+x", "/app/server/server.sh"]
51+
# Make server startup script executable and start the web server
52+
RUN chmod +x /app/server/server.sh
3953

40-
ENTRYPOINT [ "/app/server/server.sh"]
54+
ENTRYPOINT ["/app/server/server.sh"]

health/flutter-frontend/build_and_push.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ export IMAGE_VERSION=0.1
55
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
66

77

8-
docker build -t=$IMAGE .
8+
podman build -t=$IMAGE .
99

10-
docker push "$IMAGE"
10+
podman push "$IMAGE"
1111
if [ $? -eq 0 ]; then
12-
docker rmi "$IMAGE"
12+
podman rmi "$IMAGE"
1313
fi
1414

1515

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/bash
2+
3+
# deletepod.sh - Find and delete healthai-frontend pod(s) in the health namespace
4+
5+
echo "🔍 Finding healthai-frontend pods in health namespace..."
6+
7+
# Get pods matching healthai-frontend pattern in health namespace
8+
PODS=$(kubectl get pods -n health --no-headers | grep "healthai-frontend" | awk '{print $1}')
9+
10+
if [ -z "$PODS" ]; then
11+
echo "❌ No healthai-frontend pods found in health namespace"
12+
exit 0
13+
fi
14+
15+
echo "📋 Found healthai-frontend pods:"
16+
echo "$PODS"
17+
echo ""
18+
19+
# Delete each pod
20+
for POD in $PODS; do
21+
echo "🗑️ Deleting pod: $POD"
22+
kubectl delete pod "$POD" -n health
23+
if [ $? -eq 0 ]; then
24+
echo "✅ Successfully deleted pod: $POD"
25+
else
26+
echo "❌ Failed to delete pod: $POD"
27+
fi
28+
done
29+
30+
echo ""
31+
echo "🔄 Checking remaining healthai-frontend pods..."
32+
kubectl get pods -n health | grep "healthai-frontend" || echo "✅ No healthai-frontend pods remaining"
33+
34+
echo ""
35+
echo "📊 Current pods in health namespace:"
36+
kubectl get pods -n health
37+
38+
echo ""
39+
echo "⏳ Waiting for new healthai-frontend pod to be created..."
40+
sleep 5
41+
42+
# Wait for new pod to be created and get its name
43+
NEW_POD=""
44+
for i in {1..30}; do
45+
NEW_POD=$(kubectl get pods -n health --no-headers | grep "healthai-frontend" | grep "Running\|ContainerCreating" | head -1 | awk '{print $1}')
46+
if [ ! -z "$NEW_POD" ]; then
47+
echo "✅ Found new healthai-frontend pod: $NEW_POD"
48+
break
49+
fi
50+
echo "⏳ Waiting for pod creation... (attempt $i/30)"
51+
sleep 2
52+
done
53+
54+
if [ ! -z "$NEW_POD" ]; then
55+
echo ""
56+
echo "📊 Updated pods in health namespace:"
57+
kubectl get pods -n health
58+
59+
echo ""
60+
echo "📋 Getting logs from new pod: $NEW_POD"
61+
echo "----------------------------------------"
62+
kubectl logs "$NEW_POD" -n health --tail=50
63+
64+
echo ""
65+
echo "🔍 Pod status details:"
66+
kubectl describe pod "$NEW_POD" -n health | head -20
67+
else
68+
echo "❌ No new healthai-frontend pod found after waiting"
69+
echo "📊 Current pods in health namespace:"
70+
kubectl get pods -n health
71+
fi

health/flutter-frontend/deploy.sh

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
#!/bin/bash
2-
## Copyright (c) 2021 Oracle and/or its affiliates.
2+
## Copyright (c) 2025 Oracle and/or its affiliates.
33
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
44

5-
kubectl apply -f k8s/healthai-frontend-flutter-deployment.yaml -n healthai
6-
kubectl apply -f k8s/healthai-frontend-service.yaml -n healthai
5+
export TAG=0.1.$(date +%s)
6+
echo TAG = $TAG
7+
8+
export IMAGE_NAME=healthai-frontend-flutter
9+
export IMAGE_VERSION=$TAG
10+
export DOCKER_REGISTRY=$DOCKER_REGISTRY
11+
if [ -z "$DOCKER_REGISTRY" ]; then
12+
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
13+
exit 1
14+
fi
15+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
16+
echo ${IMAGE}
17+
18+
# ./build_and_push ...
19+
20+
export IMAGE_NAME=healthai-frontend-flutter
21+
export IMAGE_VERSION=0.1
22+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
23+
24+
25+
podman build -t=$IMAGE .
26+
27+
podman push "$IMAGE"
28+
if [ $? -eq 0 ]; then
29+
podman rmi "$IMAGE"
30+
fi
31+
32+
33+
# ./deploy.sh...
34+
35+
36+
#kubectl delete deployment healthai-frontend-flutter-deployment -n financial
37+
38+
cp healthai-frontend-flutter-deployment_template.yaml healthai-frontend-flutter-deployment.yaml
39+
sed -i '' "s|IMAGE_PLACEHOLDER|$IMAGE|g" healthai-frontend-flutter-deployment.yaml
40+
kubectl apply -f healthai-frontend-flutter-deployment.yaml -n health
41+
42+
43+
kubectl apply -f healthai-frontend-service.yaml -n health
44+

health/flutter-frontend/k8s/healthai-frontend-flutter-deployment.yaml renamed to health/flutter-frontend/healthai-frontend-flutter-deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ spec:
2323
mountPath: /usr/local/bin
2424
containers:
2525
- name: healthai-frontend
26-
# image: us-ashburn-1.ocir.io/oradbclouducm/gd74087885/healthai-frontend-flutter:0.1
27-
image: ${DOCKER_REGISTRY}/healthai-frontend-flutter:0.1
26+
image: eu-frankfurt-1.ocir.io/oradbclouducm/health/healthai-frontend-flutter:0.1
2827
imagePullPolicy: Always
2928
env:
3029
- name: LOG_LEVEL

health/react-frontend/healthai-frontend-react-deployment.yaml renamed to health/flutter-frontend/healthai-frontend-flutter-deployment_template.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ spec:
2323
mountPath: /usr/local/bin
2424
containers:
2525
- name: healthai-frontend
26-
image: us-ashburn-1.ocir.io/oradbclouducm/gd74087885/healthai-frontend-flutter:0.1
27-
# image: ${DOCKER_REGISTRY}/healthai-frontend-flutter:0.1
26+
image: IMAGE_PLACEHOLDER
2827
imagePullPolicy: Always
2928
env:
3029
- name: LOG_LEVEL
File renamed without changes.

health/nodejs-backend/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

health/react-frontend/Dockerfile

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)