Skip to content

Commit 01815a5

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents bfa0977 + 8f14cd6 commit 01815a5

File tree

74 files changed

+1806
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1806
-289
lines changed

Dockerfile

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

java-ai/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:17-alpine
2+
#docker.io/library/openjdk:17-oracle
3+
4+
ADD target/oracleai-0.0.1-SNAPSHOT.jar /usr/share/oracleai/oracleai-0.0.1-SNAPSHOT.jar
5+
ENTRYPOINT ["java", "-jar", "/usr/share/oracleai/oracleai-0.0.1-SNAPSHOT.jar"]

java-ai/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
IMAGE_NAME=podsofkon
6+
#IMAGE_VERSION=latest
7+
IMAGE_VERSION=sustainableaijava
8+
#DOCKER_REGISTRY=us-ashburn-1.ocir.io/oradbclouducm/gd74087885
9+
DOCKER_REGISTRY=us-ashburn-1.ocir.io/oradbclouducm/podsofkon
10+
11+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
12+
export IMAGE_VERSION=$IMAGE_VERSION
13+
14+
mvn clean package
15+
16+
#docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE .
17+
podman build -t=$IMAGE .
18+
#docker buildx build --platform=linux/amd64 -t=$IMAGE .
19+
20+
#docker push --platform linux/amd64 "$IMAGE"
21+
podman push "$IMAGE"

java-ai/k8s/createSecretFromWallet.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
#simply copy this file to and run it from your wallet dir...
3+
if kubectl apply -f - ; then
4+
echo "secret applied for wallet."
5+
else
6+
echo "Error: Failure to create ragdb-wallet-secret."
7+
fi <<!
8+
apiVersion: v1
9+
data:
10+
README: $(base64 -w0 README)
11+
cwallet.sso: $(base64 -w0 cwallet.sso)
12+
ewallet.p12: $(base64 -w0 ewallet.p12)
13+
keystore.jks: $(base64 -w0 keystore.jks)
14+
ojdbc.properties: $(base64 -w0 ojdbc.properties)
15+
sqlnet.ora: $(base64 -w0 sqlnet.ora)
16+
tnsnames.ora: $(base64 -w0 tnsnames.ora)
17+
truststore.jks: $(base64 -w0 truststore.jks)
18+
kind: Secret
19+
metadata:
20+
name: ragdb-wallet-secret
21+
!
22+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# Simply copy this file to and run it from your wallet dir...
3+
if kubectl apply -f - ; then
4+
echo "secret applied for wallet in the msdataworkshop namespace."
5+
else
6+
echo "Error: Failure to create ragdb-wallet-secret."
7+
fi <<!
8+
apiVersion: v1
9+
data:
10+
README: $(base64 -i ./README)
11+
cwallet.sso: $(base64 -i ./cwallet.sso)
12+
ewallet.p12: $(base64 -i ./ewallet.p12)
13+
keystore.jks: $(base64 -i ./keystore.jks)
14+
ojdbc.properties: $(base64 -i ./ojdbc.properties)
15+
sqlnet.ora: $(base64 -i ./sqlnet.ora)
16+
tnsnames.ora: $(base64 -i ./tnsnames.ora)
17+
truststore.jks: $(base64 -i ./truststore.jks)
18+
kind: Secret
19+
metadata:
20+
name: ragdb-wallet-secret
21+
namespace: msdataworkshop
22+
!

java-ai/k8s/createTLSSecret.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
kubectl create secret tls ssl-certificate-secret --key $MY_STATE/tls/tls.key --cert $MY_STATE/tls/tls.crt -n

java-ai/k8s/java-ai-deployment.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: oraclejavaai
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: oraclejavaai
10+
template:
11+
metadata:
12+
creationTimestamp: null
13+
labels:
14+
app: oraclejavaai
15+
spec:
16+
volumes:
17+
- name: creds
18+
secret:
19+
secretName: ragdb-wallet-secret
20+
defaultMode: 420
21+
containers:
22+
- name: oraclejavaai
23+
image: us-ashburn-1.ocir.io/oradbclouducm/podsofkon/podsofkon:sustainableai
24+
# image: us-ashburn-1.ocir.io/oradbclouducm/oraclejavaai/oraclejavaai:0.2
25+
# image: us-ashburn-1.ocir.io/oradbclouducm/gd74087885/xr-admin:0.1
26+
ports:
27+
- name: http
28+
containerPort: 8080
29+
protocol: TCP
30+
env:
31+
- name: LOG_LEVEL
32+
value: DEBUG
33+
- name: server_port
34+
value: '8080'
35+
- name: spring.datasource.username
36+
value: admin
37+
- name: spring.datasource.url
38+
value: jdbc:oracle:thin:@ragdb_tp?TNS_ADMIN=/oraclejavaai/creds
39+
- name: spring.datasource.password
40+
value: Welcome123456
41+
resources: {}
42+
volumeMounts:
43+
- name: creds
44+
mountPath: /oraclejavaai/creds
45+
imagePullPolicy: Always
46+
restartPolicy: Always
47+
imagePullSecrets:
48+
- name: regcred
49+
schedulerName: default-scheduler

java-ai/k8s/java-ai-services.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+
name: oraclejavaai
5+
spec:
6+
ports:
7+
- protocol: TCP
8+
port: 80
9+
targetPort: 8080
10+
# nodePort: 32462
11+
selector:
12+
app: oraclejavaai
13+
type: LoadBalancer

pom.xml renamed to java-ai/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@
3232
<artifactId>json</artifactId>
3333
<version>20231013</version>
3434
</dependency>
35+
<dependency>
36+
<groupId>commons-io</groupId>
37+
<artifactId>commons-io</artifactId>
38+
<version>2.8.0</version>
39+
</dependency>
3540
<dependency>
3641
<groupId>com.oracle.cloud.spring</groupId>
3742
<artifactId>spring-cloud-oci-starter</artifactId>
38-
<version>1.0.0</version>
43+
<version>1.2.0</version>
3944
</dependency>
4045
<dependency>
4146
<groupId>com.oracle.oci.sdk</groupId>

java-ai/src/main/java/oracleai/AIApplication.java

Whitespace-only changes.

0 commit comments

Comments
 (0)