Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3da7c8a
improvement: remove redundant operations and setup variables for limi…
DuGuYifei Jul 13, 2025
0046bcc
feat: add feat of normal qa in genai service
DuGuYifei Jul 16, 2025
cb2bfbc
fix: k8s-install.sh key
DuGuYifei Jul 16, 2025
7462fc6
fix: is_open_rag
DuGuYifei Jul 16, 2025
fb023c6
feat: ask question about company with rag
DuGuYifei Jul 16, 2025
e64c086
feat: json log in springboot services
DuGuYifei Jul 16, 2025
599c047
feat: json log in genai
DuGuYifei Jul 16, 2025
a53da69
feat: json for log format in promtail
DuGuYifei Jul 17, 2025
cbe5fa3
ci: auto scaling
DuGuYifei Jul 17, 2025
9b5a6fc
fix: database connection with genai-services
DuGuYifei Jul 17, 2025
f152001
ci: fix alertmanager datasource in grafana
DuGuYifei Jul 17, 2025
004cd9d
ci: fix alertmanager implementation in grafan and allow handle grafan…
DuGuYifei Jul 17, 2025
50ef612
ci: improve promtail pipeline
DuGuYifei Jul 17, 2025
5b8812e
feat: log in python same with springboot
DuGuYifei Jul 17, 2025
14d75cc
fix: module import name in main.py
DuGuYifei Jul 17, 2025
f20b188
ci: fix json in promtail
DuGuYifei Jul 17, 2025
9680d0b
ci: fix auto scaling
DuGuYifei Jul 18, 2025
399f0b1
fix: db secret
DuGuYifei Jul 18, 2025
aa97eb4
feat: add tests and put into cicd
DuGuYifei Jul 18, 2025
f96b0a1
ci: fix unit test in first step
DuGuYifei Jul 18, 2025
ba8f8c6
ci: give permission to gradlew in test
DuGuYifei Jul 18, 2025
6dd2265
ci: give permission to protobuf
DuGuYifei Jul 18, 2025
b673dd3
ci: update gradlew pipeline version in cicd
DuGuYifei Jul 18, 2025
3527a8b
fix: docker compose files
DuGuYifei Jul 18, 2025
984b99e
ci: fix aws
DuGuYifei Jul 18, 2025
6f0ec71
ci: use tag input for aws
DuGuYifei Jul 18, 2025
1dc48bc
ci: fix secrets of aws
DuGuYifei Jul 18, 2025
25efe48
ci: try fix disk space error
DuGuYifei Jul 18, 2025
03e784b
ci: fix aws
DuGuYifei Jul 18, 2025
a5eaa6c
fix: init.sql
DuGuYifei Jul 18, 2025
0fb7a20
fix: https in docker compose deploy and ansible and terraform with sc…
DuGuYifei Jul 18, 2025
3def359
fix: docker compose deploy aws
DuGuYifei Jul 18, 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
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ subprojects {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus:1.15.1'

implementation("net.logstash.logback:logstash-logback-encoder:8.1")

developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

Expand Down
22 changes: 22 additions & 0 deletions helm/aihr/charts/service-application/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "service-application.fullname" . }}
labels:
app: {{ include "service-application.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "service-application.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/aihr/charts/service-application/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
replicaCount: 1

autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 70

image:
# 默认拼接:ghcr.io/<user>/<repo>-service-application:<tag>
repository: ""
Expand Down
22 changes: 22 additions & 0 deletions helm/aihr/charts/service-auth/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "service-auth.fullname" . }}
labels:
app: {{ include "service-auth.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "service-auth.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/aihr/charts/service-auth/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
replicaCount: 1

autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 70

image:
# 默认拼接:ghcr.io/<user>/<repo>-service-auth:<tag>
repository: ""
Expand Down
22 changes: 22 additions & 0 deletions helm/aihr/charts/service-genai/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "service-genai.fullname" . }}
labels:
app: {{ include "service-genai.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "service-genai.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/aihr/charts/service-genai/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
replicaCount: 1

autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 70

image:
# 默认拼接:ghcr.io/<user>/<repo>-service-genai:<tag>
repository: ""
Expand Down
22 changes: 22 additions & 0 deletions helm/aihr/charts/service-job/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "service-job.fullname" . }}
labels:
app: {{ include "service-job.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "service-job.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
6 changes: 6 additions & 0 deletions helm/aihr/charts/service-job/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
replicaCount: 1

autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 70

image:
# 默认拼接:ghcr.io/<user>/<repo>-service-job:<tag>
repository: ""
Expand Down
1 change: 1 addition & 0 deletions helm/aihr/values-dev-promtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ promtail:
# 日志采集与推送配置
config:
logLevel: debug
logFormat: json
clients:
- url: http://ai-hr-dev-loki-gateway/loki/api/v1/push
tenant_id: "promtail"
Expand Down
1 change: 1 addition & 0 deletions helm/aihr/values-prod-promtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ promtail:
# 日志采集与推送配置
config:
logLevel: debug
logFormat: json
clients:
- url: http://ai-hr-prod-loki-gateway/loki/api/v1/push
tenant_id: "promtail"
Expand Down
12 changes: 6 additions & 6 deletions k8s-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ OLLAMA_MODEL=""
OLLAMA_API_KEY=""

# paste key as one line
private_key=""
public_key=""
echo "JWT_PRIV_KEY" > priv.pem
echo "JWT_PUB_KEY" > pub.pem

DISCORD_WEBHOOK=""

Expand Down Expand Up @@ -35,8 +35,8 @@ helm upgrade --install ai-hr-dev ./helm/aihr \
--set global.ghcrUser=aet-devops25 \
--set global.ghcrRepo=team-1 \
--set global.imageTag="$(git rev-parse --short HEAD)" \
--set-file global.jwt.privateKey="${private_key}" \
--set-file global.jwt.publicKey="${public_key}" \
--set-file global.jwt.privateKey=priv.pem \
--set-file global.jwt.publicKey=pub.pem \
--set global.ollama.ollamaBaseUrl="${OLLAMA_BASE_URL}" \
--set global.ollama.ollamaModel="${OLLAMA_MODEL}" \
--set global.ollama.ollamaApiKey="${OLLAMA_API_KEY}" \
Expand All @@ -59,8 +59,8 @@ helm upgrade --install ai-hr-prod ./helm/aihr \
--set global.ghcrUser=aet-devops25 \
--set global.ghcrRepo=team-1 \
--set global.imageTag="$(git rev-parse --short HEAD)" \
--set-file global.jwt.privateKey="${private_key}" \
--set-file global.jwt.publicKey="${public_key}" \
--set-file global.jwt.privateKey=priv.pem \
--set-file global.jwt.publicKey=pub.pem \
--set global.ollama.ollamaBaseUrl="${OLLAMA_BASE_URL}" \
--set global.ollama.ollamaModel="${OLLAMA_MODEL}" \
--set global.ollama.ollamaApiKey="${OLLAMA_API_KEY}" \
Expand Down
9 changes: 9 additions & 0 deletions proto/ai.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ message ChatReplyResponse {
string ai_message = 1;
}

// --------------------------- QA ---------------------------
message NormalQARequest {
string question = 1;
bool is_open_rag = 2;
}

// --------------------------- ScoreResume ---------------------------
message ScoreResumeRequest {
string job_title = 1;
Expand Down Expand Up @@ -71,6 +77,9 @@ service AIService {
// Streamed chat with AI assistant. Server streams incremental ai_message tokens.
rpc ChatReply(ChatReplyRequest) returns (stream ChatReplyResponse);

// Streamed chat with AI, normal QA
rpc NormalQA(NormalQARequest) returns (stream ChatReplyResponse);

// Scores a resume against job requirements.
rpc ScoreResume(ScoreResumeRequest) returns (ScoreResumeResponse);

Expand Down
2 changes: 1 addition & 1 deletion proto/cp2service.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cp proto/ai.proto service-genai/app/proto/ai.proto
cp proto/ai.proto service-genai/app/proto/ai.proto
cp proto/ai.proto service-application/src/main/proto/ai.proto
Loading