Skip to content

Commit c2a8892

Browse files
update versions of a jdk, helidon, and oracle jdbc, and add inventory-micronaut-native-image (graalvm) (#239)
* remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * remove sqlnet.ora edit work * recovery test work * recovery test work * recovery test work * recovery test work * replace postgres configmap with secret * replace postgres configmap with secret * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * TEQ setup and tracing * mongo, postgres, kafka crash tests * mongo, postgres, kafka crash tests * grafana work * grafana work * grafana work * grafana work * grafana work * grafana work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * observability work * dotnet work * dotnet work * dotnet work * dotnet work * dotnet work * observability, dotnet, go, etc. work - move kafka etc. build to nonjava * observability, dotnet, go, etc. work - move kafka etc. build to nonjava * observability, dotnet, go, etc. work - move kafka etc. build to nonjava * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * enable teq * observability * enable teq * enable teq * enable teq * enable teq * enable teq * observability work * observability work * enable teq * enable teq * enable teq * observ * enable teq * observability dash * observability * osbservability * enable teq * enable teq * enable teq * obs * obs * enable teq * obs * enable teq * observ * obs * converged wording change * fix k6 command * correct workshop link * update workshop link * modifiy python impl to conn.autocommit = False * enable teq * various including security fix in inventory-nodejs * various including security fix in inventory-nodejs * various including security fix in inventory-nodejs * enable teq * inventory-micronaut * inventory-micronaut * inventory-quarkus * inventory-micronaut-native-image * upgrade helidon and db versions * mn and quarkus build wrappers * mn native-image build and deploy fixes * mn native-image build and deploy fixes
1 parent f4c27dd commit c2a8892

27 files changed

+327
-208
lines changed

grabdish/inventory-helidon-se/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:11-jre-slim
1+
FROM ghcr.io/graalvm/graalvm-ce:21.3.0
22

33
ENTRYPOINT ["java", "-jar", "/usr/share/myservice/myservice.jar"]
44

grabdish/inventory-helidon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:11-jre-slim
1+
FROM ghcr.io/graalvm/graalvm-ce:21.3.0
22

33
ENTRYPOINT ["java", "-jar", "/usr/share/myservice/myservice.jar"]
44

grabdish/inventory-helidon/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>io.helidon.applications</groupId>
2525
<artifactId>helidon-mp</artifactId>
26-
<version>2.3.1</version>
26+
<version>2.4.0</version>
2727
<relativePath/>
2828
</parent>
2929

@@ -177,8 +177,8 @@
177177
</dependency>
178178
<dependency>
179179
<groupId>com.oracle.database.jdbc</groupId>
180-
<artifactId>ojdbc8-production</artifactId>
181-
<version>19.8.0.0</version>
180+
<artifactId>ojdbc11-production</artifactId>
181+
<version>21.3.0.0</version>
182182
<type>pom</type>
183183
</dependency>
184184
<dependency>

grabdish/inventory-micronaut/.gitignore

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
## Copyright (c) 2021 Oracle and/or its affiliates.
3+
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
4+
5+
6+
IMAGE_NAME=inventory-micronaut-native-image
7+
IMAGE_VERSION=0.1
8+
9+
10+
if [ -z "$DOCKER_REGISTRY" ]; then
11+
echo "DOCKER_REGISTRY not set. Will get it with state_get"
12+
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
13+
fi
14+
15+
if [ -z "$DOCKER_REGISTRY" ]; then
16+
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
17+
exit 1
18+
fi
19+
20+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
21+
echo IMAGE is $IMAGE
22+
echo set images value of dockerBuildNative task in build.gradle to $IMAGE ...
23+
24+
./gradlew clean
25+
./gradlew build
26+
./gradlew dockerBuildNative
27+
28+
docker push $IMAGE
29+
if [ $? -eq 0 ]; then
30+
docker rmi ${IMAGE}
31+
fi

grabdish/inventory-micronaut/build.gradle

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ repositories {
1111
}
1212

1313
micronaut {
14-
runtime("netty")
1514
testRuntime("junit5")
1615
processing {
1716
incremental(true)
@@ -28,16 +27,16 @@ dependencies {
2827
implementation("javax.transaction:jta:1.1")
2928
implementation("com.oracle.database.messaging:aqapi:19.3.0.0")
3029
implementation("javax.json.bind:javax.json.bind-api:1.0")
30+
// implementation("com.fasterxml.jackson.core:jackson-databind")
3131

32-
annotationProcessor(platform("io.micronaut:micronaut-bom:2.0.2")) // D1
33-
annotationProcessor("io.micronaut:micronaut-inject-java") // D2
34-
implementation(platform("io.micronaut:micronaut-bom:2.0.2")) // D3
35-
implementation("io.micronaut:micronaut-inject") // D4
36-
implementation("javax.inject:javax.inject:1") // D4
32+
annotationProcessor(platform("io.micronaut:micronaut-bom:2.0.2"))
33+
annotationProcessor("io.micronaut:micronaut-inject-java")
34+
implementation(platform("io.micronaut:micronaut-bom:2.0.2"))
35+
implementation("io.micronaut:micronaut-inject")
36+
implementation("javax.inject:javax.inject:1")
3737

3838
implementation("javax.annotation:javax.annotation-api")
3939
runtimeOnly("ch.qos.logback:logback-classic")
40-
// runtimeOnly("com.oracle.database.jdbc:ojdbc8")
4140
implementation("com.oracle.database.jdbc:ojdbc8-production:21.1.0.0")
4241
testImplementation("org.testcontainers:junit-jupiter")
4342
testImplementation("org.testcontainers:oracle-xe")
@@ -46,6 +45,21 @@ dependencies {
4645

4746
}
4847

48+
tasks.named("dockerBuildNative") {
49+
images = ["us-ashburn-1.ocir.io/maacloud/gdpaulsep27/inventory-micronaut-native-image:0.1"]
50+
}
51+
52+
nativeImage {
53+
imageName("inventory-micronaut")
54+
args = [
55+
'-H:+ReportExceptionStackTraces',
56+
'-H:+AddAllCharsets',
57+
'-H:IncludeResources=application.yaml',
58+
'--initialize-at-build-time=oracle.i18n.text.converter,oracle.xml.parser.v2,oracle.xml.util,oracle.sql',
59+
'--initialize-at-run-time=io.micronaut.oraclecloud.atp.jdbc.upc,oracle.xml.util.UnicodeUtil,oracle.jdbc,oracle.jdbc.pool,oracle.ucp.admin',
60+
'--report-unsupported-elements-at-runtime'
61+
]
62+
}
4963

5064
application {
5165
mainClass.set("io.micronaut.data.examples.Application")

grabdish/inventory-micronaut/build.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@ export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
2424
./gradlew dockerFile
2525
cd build/docker
2626
echo IMAGE is $IMAGE
27-
docker build -t $IMAGE .
2827
#./gradlew dockerBuild
29-
#./gradlew dockerPush
28+
docker build -t $IMAGE .
3029
cd ../../
3130

32-
#gu install native-image
33-
#./mvnw package -Dpackaging=native-image
34-
#run with ./target/application
35-
31+
#./gradlew dockerPush
3632
docker push $IMAGE
3733
if [ $? -eq 0 ]; then
3834
docker rmi ${IMAGE}
39-
fi
35+
fi
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
## Copyright (c) 2021 Oracle and/or its affiliates.
3+
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
4+
5+
SCRIPT_DIR=$(dirname $0)
6+
7+
if [ -z "$DOCKER_REGISTRY" ]; then
8+
echo "DOCKER_REGISTRY not set. Will get it with state_get"
9+
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
10+
fi
11+
12+
if [ -z "$DOCKER_REGISTRY" ]; then
13+
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
14+
exit 1
15+
fi
16+
17+
if [ -z "$INVENTORY_PDB_NAME" ]; then
18+
echo "INVENTORY_PDB_NAME not set. Will get it with state_get"
19+
export INVENTORY_PDB_NAME=$(state_get INVENTORY_DB_NAME)
20+
fi
21+
22+
if [ -z "$INVENTORY_PDB_NAME" ]; then
23+
echo "Error: INVENTORY_PDB_NAME env variable needs to be set!"
24+
exit 1
25+
fi
26+
27+
echo create inventory-micronaut-native-image deployment and service...
28+
29+
export CURRENTTIME=$( date '+%F_%H:%M:%S' )
30+
echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployment yaml
31+
cp inventory-micronaut-native-image-deployment.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
32+
33+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
34+
mv -- /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
35+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
36+
mv -- /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
37+
sed -e "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
38+
mv -- /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
39+
sed -e "s|%OCI_REGION%|${OCI_REGION}|g" inventory-micronaut-native-image-deployment-${CURRENTTIME}.yaml > /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
40+
mv -- /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
41+
sed -e "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-micronaut-native-image-deployment-${CURRENTTIME}.yaml > /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
42+
mv -- /tmp/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml
43+
44+
if [ -z "$1" ]; then
45+
kubectl apply -f $SCRIPT_DIR/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml -n msdataworkshop
46+
else
47+
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/inventory-micronaut-native-image-deployment-$CURRENTTIME.yaml) -n msdataworkshop
48+
fi
49+
50+
#kubectl create -f inventory-service.yaml -n msdataworkshop
Binary file not shown.

grabdish/inventory-micronaut/inventory-micronaut-deployment-2021-11-07_19:20:37.yaml

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

0 commit comments

Comments
 (0)