generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from paulparkinson/main
update oci gen ai chat and digital double app
- Loading branch information
Showing
75 changed files
with
2,409 additions
and
239 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM openjdk:17-alpine | ||
#docker.io/library/openjdk:17-oracle | ||
|
||
ADD target/oracleai-0.0.1-SNAPSHOT.jar /usr/share/oracleai/oracleai-0.0.1-SNAPSHOT.jar | ||
ENTRYPOINT ["java", "-jar", "/usr/share/oracleai/oracleai-0.0.1-SNAPSHOT.jar"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
IMAGE_NAME=podsofkon | ||
#IMAGE_VERSION=latest | ||
IMAGE_VERSION=sustainableaijava | ||
#DOCKER_REGISTRY=us-ashburn-1.ocir.io/oradbclouducm/gd74087885 | ||
DOCKER_REGISTRY=us-ashburn-1.ocir.io/oradbclouducm/podsofkon | ||
|
||
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION} | ||
export IMAGE_VERSION=$IMAGE_VERSION | ||
|
||
mvn clean package | ||
|
||
#docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE . | ||
podman build -t=$IMAGE . | ||
#docker buildx build --platform=linux/amd64 -t=$IMAGE . | ||
|
||
#docker push --platform linux/amd64 "$IMAGE" | ||
podman push "$IMAGE" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
#simply copy this file to and run it from your wallet dir... | ||
if kubectl apply -f - ; then | ||
echo "secret applied for wallet." | ||
else | ||
echo "Error: Failure to create ragdb-wallet-secret." | ||
fi <<! | ||
apiVersion: v1 | ||
data: | ||
README: $(base64 -w0 README) | ||
cwallet.sso: $(base64 -w0 cwallet.sso) | ||
ewallet.p12: $(base64 -w0 ewallet.p12) | ||
keystore.jks: $(base64 -w0 keystore.jks) | ||
ojdbc.properties: $(base64 -w0 ojdbc.properties) | ||
sqlnet.ora: $(base64 -w0 sqlnet.ora) | ||
tnsnames.ora: $(base64 -w0 tnsnames.ora) | ||
truststore.jks: $(base64 -w0 truststore.jks) | ||
kind: Secret | ||
metadata: | ||
name: ragdb-wallet-secret | ||
! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# Simply copy this file to and run it from your wallet dir... | ||
if kubectl apply -f - ; then | ||
echo "secret applied for wallet in the msdataworkshop namespace." | ||
else | ||
echo "Error: Failure to create ragdb-wallet-secret." | ||
fi <<! | ||
apiVersion: v1 | ||
data: | ||
README: $(base64 -i ./README) | ||
cwallet.sso: $(base64 -i ./cwallet.sso) | ||
ewallet.p12: $(base64 -i ./ewallet.p12) | ||
keystore.jks: $(base64 -i ./keystore.jks) | ||
ojdbc.properties: $(base64 -i ./ojdbc.properties) | ||
sqlnet.ora: $(base64 -i ./sqlnet.ora) | ||
tnsnames.ora: $(base64 -i ./tnsnames.ora) | ||
truststore.jks: $(base64 -i ./truststore.jks) | ||
kind: Secret | ||
metadata: | ||
name: ragdb-wallet-secret | ||
namespace: msdataworkshop | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
kubectl create secret tls ssl-certificate-secret --key $MY_STATE/tls/tls.key --cert $MY_STATE/tls/tls.crt -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: oraclejavaai | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: oraclejavaai | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: oraclejavaai | ||
spec: | ||
volumes: | ||
- name: creds | ||
secret: | ||
secretName: ragdb-wallet-secret | ||
defaultMode: 420 | ||
containers: | ||
- name: oraclejavaai | ||
image: us-ashburn-1.ocir.io/oradbclouducm/podsofkon/podsofkon:sustainableai | ||
# image: us-ashburn-1.ocir.io/oradbclouducm/oraclejavaai/oraclejavaai:0.2 | ||
# image: us-ashburn-1.ocir.io/oradbclouducm/gd74087885/xr-admin:0.1 | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
env: | ||
- name: LOG_LEVEL | ||
value: DEBUG | ||
- name: server_port | ||
value: '8080' | ||
- name: spring.datasource.username | ||
value: admin | ||
- name: spring.datasource.url | ||
value: jdbc:oracle:thin:@ragdb_tp?TNS_ADMIN=/oraclejavaai/creds | ||
- name: spring.datasource.password | ||
value: Welcome123456 | ||
resources: {} | ||
volumeMounts: | ||
- name: creds | ||
mountPath: /oraclejavaai/creds | ||
imagePullPolicy: Always | ||
restartPolicy: Always | ||
imagePullSecrets: | ||
- name: regcred | ||
schedulerName: default-scheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: oraclejavaai | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8080 | ||
# nodePort: 32462 | ||
selector: | ||
app: oraclejavaai | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
java-ai/src/main/java/oracleai/common/FileUploadExceptionAdvice.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package oracleai.common; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.ControllerAdvice; | ||
import org.springframework.web.bind.annotation.ExceptionHandler; | ||
import org.springframework.web.multipart.MaxUploadSizeExceededException; | ||
|
||
@ControllerAdvice | ||
public class FileUploadExceptionAdvice { | ||
|
||
@ExceptionHandler(MaxUploadSizeExceededException.class) | ||
public ResponseEntity<String> handleMaxSizeException(MaxUploadSizeExceededException exc) { | ||
return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED).body("File too large!"); | ||
} | ||
} |
Oops, something went wrong.