Skip to content

Commit ab328c0

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 0270c86 + 9f5f92f commit ab328c0

File tree

69 files changed

+3358
-0
lines changed

Some content is hidden

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

69 files changed

+3358
-0
lines changed

java-ai-before-aiholo/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-before-aiholo/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
#The following is temporary until release is available in maven and only required to be called once...
4+
#mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=lib/oci-java-sdk-generativeai-3.25.1-preview1-20230906.204234-1.jar
5+
6+
mvn clean package

java-ai-before-aiholo/build0.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"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
export `cat env.properties`
4+
#export `cat ~/Downloads/env.properties`
5+
6+
mvn clean package ; java -jar target/oracleai-0.0.1-SNAPSHOT.jar

java-ai-before-aiholo/build_docker.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
export IMAGE_NAME=oracleai
4+
export IMAGE_VERSION=0.1
5+
6+
7+
if [ -z "$DOCKER_REGISTRY" ]; then
8+
echo "DOCKER_REGISTRY not set. Will set it to 'test"
9+
export DOCKER_REGISTRY=test
10+
fi
11+
12+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
13+
14+
docker build -t=$IMAGE .
15+
16+
#docker push "$IMAGE"
17+
#if [ $? -eq 0 ]; then
18+
# docker rmi "$IMAGE"
19+
#fi
20+

java-ai-before-aiholo/env.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
OCICONFIG_FILE=~/.oci/config
2+
OCICONFIG_PROFILE=DEFAULT
3+
COMPARTMENT_ID=ocid1.compartment.oc1..mycompartmentvalue
4+
OBJECTSTORAGE_NAMESPACE=myobjectstorenamespacename
5+
OBJECTSTORAGE_BUCKETNAME=myobjectstorebucketname
6+
ORDS_ENDPOINT_URL=https://myordsendpointurl
7+
OCI_VISION_SERVICE_ENDPOINT=https://vision.aiservice.myregion.oci.oraclecloud.com
8+
OCI_SPEECH_SERVICE_ENDPOINT=https://speech.aiservice.myregion.oci.oraclecloud.com
9+
OCI_GENAI_SERVICE_ENDPOINT=https://inference.generativeai.us-chicago-1.oci.oraclecloud.com
10+
OPENAI_KEY=mykeyfordalleifused
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+
!
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
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

0 commit comments

Comments
 (0)