Skip to content

Commit 09d9bd7

Browse files
inventory-micronaut (#237)
* dotnet docker work and password/url fix * dotnet docker work and password/url fix * 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 * 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
1 parent 35cd0a9 commit 09d9bd7

29 files changed

+1189
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Thumbs.db
2+
.DS_Store
3+
.gradle
4+
build/
5+
target/
6+
out/
7+
.idea
8+
*.iml
9+
*.ipr
10+
*.iws
11+
.project
12+
.settings
13+
.classpath
14+
.factorypath
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
plugins {
2+
id("com.github.johnrengelman.shadow") version "7.1.0"
3+
id("io.micronaut.application") version "2.0.8"
4+
}
5+
6+
version = "0.1"
7+
group = "io.micronaut.data.examples"
8+
9+
repositories {
10+
mavenCentral()
11+
}
12+
13+
micronaut {
14+
runtime("netty")
15+
testRuntime("junit5")
16+
processing {
17+
incremental(true)
18+
annotations("io.micronaut.data.examples.*")
19+
}
20+
}
21+
22+
dependencies {
23+
annotationProcessor("io.micronaut:micronaut-http-validation")
24+
implementation("io.micronaut:micronaut-http-client")
25+
implementation("io.micronaut:micronaut-runtime")
26+
implementation("io.micronaut.sql:micronaut-jdbc-ucp")
27+
implementation("io.micronaut.jms:micronaut-jms-core")
28+
implementation("javax.transaction:jta:1.1")
29+
implementation("com.oracle.database.messaging:aqapi:19.3.0.0")
30+
implementation("javax.json.bind:javax.json.bind-api:1.0")
31+
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
37+
38+
implementation("javax.annotation:javax.annotation-api")
39+
runtimeOnly("ch.qos.logback:logback-classic")
40+
// runtimeOnly("com.oracle.database.jdbc:ojdbc8")
41+
implementation("com.oracle.database.jdbc:ojdbc8-production:21.1.0.0")
42+
testImplementation("org.testcontainers:junit-jupiter")
43+
testImplementation("org.testcontainers:oracle-xe")
44+
testImplementation("org.testcontainers:testcontainers")
45+
implementation("io.micronaut:micronaut-validation")
46+
47+
}
48+
49+
50+
application {
51+
mainClass.set("io.micronaut.data.examples.Application")
52+
}
53+
java {
54+
sourceCompatibility = JavaVersion.toVersion("11")
55+
targetCompatibility = JavaVersion.toVersion("11")
56+
}
57+
58+
59+

grabdish/inventory-micronaut/build.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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
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+
21+
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
22+
23+
./gradlew build
24+
./gradlew dockerFile
25+
cd build/docker
26+
echo IMAGE is $IMAGE
27+
docker build -t $IMAGE .
28+
#./gradlew dockerBuild
29+
#./gradlew dockerPush
30+
cd ../../
31+
32+
#gu install native-image
33+
#./mvnw package -Dpackaging=native-image
34+
#run with ./target/application
35+
36+
docker push $IMAGE
37+
if [ $? -eq 0 ]; then
38+
docker rmi ${IMAGE}
39+
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 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-deployment.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
32+
33+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-micronaut-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml
34+
mv -- /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
35+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-micronaut-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml
36+
mv -- /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
37+
sed -e "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-micronaut-deployment-$CURRENTTIME.yaml > /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml
38+
mv -- /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
39+
sed -e "s|%OCI_REGION%|${OCI_REGION}|g" inventory-micronaut-deployment-${CURRENTTIME}.yaml > /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml
40+
mv -- /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
41+
sed -e "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-micronaut-deployment-${CURRENTTIME}.yaml > /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml
42+
mv -- /tmp/inventory-micronaut-deployment-$CURRENTTIME.yaml inventory-micronaut-deployment-$CURRENTTIME.yaml
43+
44+
if [ -z "$1" ]; then
45+
kubectl apply -f $SCRIPT_DIR/inventory-micronaut-deployment-$CURRENTTIME.yaml -n msdataworkshop
46+
else
47+
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/inventory-micronaut-deployment-$CURRENTTIME.yaml) -n msdataworkshop
48+
fi
49+
50+
#kubectl create -f inventory-service.yaml -n msdataworkshop
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
micronautVersion=3.1.3
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)