Skip to content

Commit 6829744

Browse files
committed
remove deploy from gitignore
1 parent 299edfb commit 6829744

29 files changed

+1581
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Temporary Items
3333
.pem
3434

3535
#temp directory ignore
36-
deploy/
36+
# deploy/
3737
service/python/Dockerfile
3838

3939
.certs
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
spring:
2+
main:
3+
banner-mode: "off"
4+
profiles:
5+
active: production
6+
datasource:
7+
driver-class-name: oracle.jdbc.OracleDriver
8+
url: jdbc:oracle:thin:@{{{db_service}}}_high?TNS_ADMIN={{{path_to_wallet}}}
9+
username: ADMIN
10+
password: "{{{db_password}}}"
11+
type: oracle.ucp.jdbc.PoolDataSource
12+
oracleucp:
13+
sql-for-validate-connection: SELECT * FROM dual
14+
connection-pool-name: connectionPoolName1
15+
initial-pool-size: 5
16+
min-pool-size: 5
17+
max-pool-size: 10
18+
jpa:
19+
hibernate:
20+
use-new-id-generator-mappings: false
21+
ddl-auto: update
22+
oracle:
23+
jdbc:
24+
fanEnabled: true
25+
26+
genai:
27+
endpoint: "https://inference.generativeai.{{{region_name}}}.oci.oraclecloud.com"
28+
region: "{{{region_name}}}"
29+
compartment_id: "{{{compartment_ocid}}}"
30+
model_id: "{{{genai_model_ocid}}}"

deploy/k8s/backend/backend-svc.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
app: backend
6+
name: backend
7+
spec:
8+
ports:
9+
- port: 8080
10+
protocol: TCP
11+
targetPort: 8080
12+
selector:
13+
app: backend

deploy/k8s/backend/backend.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: backend
6+
name: backend
7+
spec:
8+
replicas: 1
9+
minReadySeconds: 60
10+
selector:
11+
matchLabels:
12+
app: backend
13+
strategy:
14+
type: RollingUpdate
15+
rollingUpdate:
16+
maxSurge: 1
17+
maxUnavailable: 1
18+
template:
19+
metadata:
20+
labels:
21+
app: backend
22+
spec:
23+
serviceAccountName: genai-sa
24+
automountServiceAccountToken: true
25+
initContainers:
26+
- name: unzip
27+
image: busybox
28+
command: ["unzip", "/walletzip/wallet.zip", "-d", "/wallet"]
29+
volumeMounts:
30+
- name: wallet-config
31+
mountPath: /walletzip
32+
- name: wallet-volume
33+
mountPath: /wallet
34+
containers:
35+
- image: backend
36+
imagePullPolicy: "Always"
37+
name: backend
38+
livenessProbe:
39+
httpGet:
40+
path: /actuator/health/liveness
41+
port: 8080
42+
initialDelaySeconds: 90
43+
periodSeconds: 5
44+
readinessProbe:
45+
httpGet:
46+
path: /actuator/health/readiness
47+
port: 8080
48+
initialDelaySeconds: 90
49+
periodSeconds: 5
50+
ports:
51+
- containerPort: 8080
52+
resources:
53+
requests:
54+
cpu: 250m
55+
memory: 512Mi
56+
limits:
57+
cpu: 500m
58+
memory: 1024Mi
59+
volumeMounts:
60+
- name: config-volume
61+
mountPath: /config
62+
- name: wallet-volume
63+
mountPath: /wallet
64+
volumes:
65+
- name: config-volume
66+
configMap:
67+
name: backend-properties
68+
- name: wallet-config
69+
configMap:
70+
name: wallet-zip
71+
- name: wallet-volume
72+
emptyDir:
73+
sizeLimit: 50Mi
74+
imagePullSecrets:
75+
- name: ocir-secret

deploy/k8s/backend/genai-sa.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: genai-sa

deploy/k8s/backend/kustomization.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resources:
2+
- genai-sa.yaml
3+
- backend.yaml
4+
- backend-svc.yaml
5+
configMapGenerator:
6+
- name: backend-properties
7+
files:
8+
- application.yaml
9+
- name: wallet-zip
10+
files:
11+
- wallet/wallet.zip

0 commit comments

Comments
 (0)