Skip to content

Commit 900fdcc

Browse files
Inventory springboot fixes (#268)
* 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 * mn native-image use JsonObject instead of Jackson * dotnet vault work, etc. * vault work, various languages * Go OCI Vault/Secrets client * displaysetuplogs util script * displaysetuplogs util script * displaysetuplogs util script * displaysetuplogs util script * createsecretfromwallet * createsecretfromwallet * createsecretfromwallet * set order and inventory helidon versions back to 2.4.0 * travelagency readme * createsecretfromwallet * fix and cleanup inventory-springboot
1 parent be6e8c1 commit 900fdcc

15 files changed

+162
-467
lines changed

grabdish/inventory-springboot/deploy-verrazzano.sh

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

grabdish/inventory-springboot/deploy.sh

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,41 @@
44

55
SCRIPT_DIR=$(dirname "$0")
66

7-
export DOCKER_REGISTRY="$(state_get DOCKER_REGISTRY)"
8-
export INVENTORY_PDB_NAME="$(state_get INVENTORY_DB_NAME)"
9-
export OCI_REGION="$(state_get OCI_REGION)"
10-
export VAULT_SECRET_OCID=""
117

12-
echo create inventory-springboot deployment...
8+
if [ -z "$DOCKER_REGISTRY" ]; then
9+
echo "DOCKER_REGISTRY not set. Will get it with state_get"
10+
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
11+
fi
12+
13+
if [ -z "$DOCKER_REGISTRY" ]; then
14+
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
15+
exit 1
16+
fi
17+
18+
if [ -z "$INVENTORY_PDB_NAME" ]; then
19+
echo "INVENTORY_PDB_NAME not set. Will get it with state_get"
20+
export INVENTORY_PDB_NAME=$(state_get INVENTORY_DB_NAME)
21+
fi
22+
23+
if [ -z "$INVENTORY_PDB_NAME" ]; then
24+
echo "Error: INVENTORY_PDB_NAME env variable needs to be set!"
25+
exit 1
26+
fi
27+
28+
echo create inventory-springboot deployment and service...
29+
1330
export CURRENTTIME=$( date '+%F_%H:%M:%S' )
1431
echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployment yaml
15-
1632
cp inventory-springboot-deployment.yaml inventory-springboot-deployment-$CURRENTTIME.yaml
1733

18-
IMAGE_NAME="inventory-springboot"
19-
IMAGE_VERSION="0.1"
20-
21-
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g;s|%IMAGE_NAME%|${IMAGE_NAME}|g;s|%IMAGE_VERSION%|${IMAGE_VERSION}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml
22-
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml
23-
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml
24-
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml
34+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-springboot-deployment-$CURRENTTIME.yaml > /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml
35+
mv -- /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml inventory-springboot-deployment-$CURRENTTIME.yaml
36+
sed -e "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-springboot-deployment-$CURRENTTIME.yaml > /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml
37+
mv -- /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml inventory-springboot-deployment-$CURRENTTIME.yaml
38+
sed -e "s|%OCI_REGION%|${OCI_REGION}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml > /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml
39+
mv -- /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml inventory-springboot-deployment-$CURRENTTIME.yaml
40+
sed -e "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-springboot-deployment-${CURRENTTIME}.yaml > /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml
41+
mv -- /tmp/inventory-springboot-deployment-$CURRENTTIME.yaml inventory-springboot-deployment-$CURRENTTIME.yaml
2542

2643
if [ -z "$1" ]; then
2744
kubectl apply -f "$SCRIPT_DIR"/inventory-springboot-deployment-${CURRENTTIME}.yaml -n msdataworkshop

grabdish/inventory-springboot/inventory-springboot-comp.yaml

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

grabdish/inventory-springboot/inventory-springboot-deployment.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: inventory
18-
image: %DOCKER_REGISTRY%/%IMAGE_NAME%:%IMAGE_VERSION%
18+
image: %DOCKER_REGISTRY%/inventory-springboot:0.1
1919
imagePullPolicy: Always
2020
env:
2121
- name: LOG_LEVEL
@@ -24,8 +24,12 @@ spec:
2424
value: "8080"
2525
- name: db_user
2626
value: "inventoryuser"
27+
- name: spring.datasource.username
28+
value: "inventoryuser"
2729
- name: db_url
2830
value: "jdbc:oracle:thin:@%INVENTORY_PDB_NAME%_tp?TNS_ADMIN=/msdataworkshop/creds"
31+
- name: spring.datasource.url
32+
value: "jdbc:oracle:thin:@%INVENTORY_PDB_NAME%_tp?TNS_ADMIN=/msdataworkshop/creds"
2933
- name: db_queueOwner
3034
value: "inventoryuser"
3135
- name: db_orderQueueName
@@ -42,6 +46,12 @@ spec:
4246
name: dbuser
4347
key: dbpassword
4448
optional: true #not needed/used if using VAULT_SECRET_OCID exists
49+
- name: spring.datasource.password
50+
valueFrom:
51+
secretKeyRef:
52+
name: dbuser
53+
key: dbpassword
54+
optional: true #not needed/used if using VAULT_SECRET_OCID exists
4555
volumeMounts:
4656
- name: creds
4757
mountPath: /msdataworkshop/creds

grabdish/inventory-springboot/inventory-springboot.yaml

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

grabdish/inventory-springboot/pom.xml

Lines changed: 11 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
<groupId>org.springframework.boot</groupId>
5656
<artifactId>spring-boot-starter-data-jpa</artifactId>
5757
</dependency>
58+
<dependency>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter-jdbc</artifactId>
61+
</dependency>
5862
<dependency>
5963
<groupId>org.springframework.boot</groupId>
6064
<artifactId>spring-boot-configuration-processor</artifactId>
@@ -103,11 +107,6 @@
103107
<artifactId>javax.jms-api</artifactId>
104108
<version>2.0</version>
105109
</dependency>
106-
<dependency>
107-
<groupId>javax.transaction</groupId>
108-
<artifactId>jta</artifactId>
109-
<version>1.1</version>
110-
</dependency>
111110
<dependency>
112111
<groupId>javax.transaction</groupId>
113112
<artifactId>javax.transaction-api</artifactId>
@@ -122,117 +121,22 @@
122121

123122

124123
<dependency>
125-
<groupId>com.oracle.database.messaging</groupId>
126-
<artifactId>aqapi</artifactId>
127-
<version>19.3.0.0</version>
128-
</dependency>
129-
<!-- Java8
130-
<dependency>
131-
<groupId>com.oracle</groupId>
132-
<artifactId>ojdbc8</artifactId>
133-
<version>18.4</version>
134-
</dependency> -->
135-
<dependency>
136-
<groupId>com.h2database</groupId>
137-
<artifactId>h2</artifactId>
124+
<groupId>javax.transaction</groupId>
125+
<artifactId>javax.transaction-api</artifactId>
126+
<version>1.2</version>
138127
<scope>runtime</scope>
139128
</dependency>
140-
<dependency>
141-
<groupId>com.oracle.database.jdbc</groupId>
142-
<artifactId>ojdbc11</artifactId>
143-
<version>${version.lib.ojdbc}</version>
144-
</dependency>
145-
<dependency>
146-
<groupId>com.oracle.database.jdbc</groupId>
147-
<artifactId>ucp</artifactId>
148-
<version>${version.lib.ojdbc}</version>
149-
</dependency>
150-
<dependency>
151-
<groupId>com.oracle.database.jdbc</groupId>
152-
<artifactId>rsi</artifactId>
153-
<version>${version.lib.ojdbc}</version>
154-
</dependency>
155-
<dependency>
156-
<groupId>com.oracle.database.security</groupId>
157-
<artifactId>oraclepki</artifactId>
158-
<version>${version.lib.ojdbc}</version>
159-
</dependency>
160-
<dependency>
161-
<groupId>com.oracle.database.security</groupId>
162-
<artifactId>osdt_core</artifactId>
163-
<version>${version.lib.ojdbc}</version>
164-
</dependency>
165-
<dependency>
166-
<groupId>com.oracle.database.security</groupId>
167-
<artifactId>osdt_cert</artifactId>
168-
<version>${version.lib.ojdbc}</version>
169-
</dependency>
170-
<dependency>
171-
<groupId>com.oracle.database.ha</groupId>
172-
<artifactId>simplefan</artifactId>
173-
<version>${version.lib.ojdbc}</version>
174-
</dependency>
175-
<dependency>
176-
<groupId>com.oracle.database.ha</groupId>
177-
<artifactId>ons</artifactId>
178-
<version>${version.lib.ojdbc}</version>
179-
</dependency>
180-
<dependency>
181-
<groupId>com.oracle.database.xml</groupId>
182-
<artifactId>xdb</artifactId>
183-
<version>${version.lib.ojdbc}</version>
184-
</dependency>
185-
<dependency>
186-
<groupId>com.oracle.database.xml</groupId>
187-
<artifactId>xmlparserv2</artifactId>
188-
<version>${version.lib.ojdbc}</version>
189-
</dependency>
190-
<!--
191-
<dependency>
192-
<groupId>com.oracle.database.jdbc.debug</groupId>
193-
<artifactId>ojdbc11_g</artifactId>
194-
<version>${version.lib.ojdbc}</version>
195-
</dependency>
196-
<dependency>
197-
<groupId>com.oracle.database.jdbc.debug</groupId>
198-
<artifactId>ojdbc11dms_g</artifactId>
199-
<version>${version.lib.ojdbc}</version>
200-
</dependency>
201-
<dependency>
202-
<groupId>com.oracle.database.observability</groupId>
203-
<artifactId>dms</artifactId>
204-
<version>${version.lib.ojdbc}</version>
205-
</dependency>
206-
<dependency>
207-
<groupId>com.oracle.database.observability</groupId>
208-
<artifactId>ojdbc11dms</artifactId>
209-
<version>${version.lib.ojdbc}</version>
210-
</dependency>
211129
<dependency>
212130
<groupId>com.oracle.database.jdbc</groupId>
213131
<artifactId>ojdbc11-production</artifactId>
214-
<version>${version.lib.ojdbc}</version>
132+
<version>21.3.0.0</version>
215133
<type>pom</type>
216134
</dependency>
217135
<dependency>
218-
<groupId>com.oracle.database.observability</groupId>
219-
<artifactId>ojdbc11-observability</artifactId>
220-
<version>${version.lib.ojdbc}</version>
221-
<type>pom</type>
222-
</dependency>
223-
<dependency>
224-
<groupId>com.oracle.database.jdbc.debug</groupId>
225-
<artifactId>ojdbc11-debug</artifactId>
226-
<version>${version.lib.ojdbc}</version>
227-
<type>pom</type>
136+
<groupId>com.oracle.database.messaging</groupId>
137+
<artifactId>aqapi</artifactId>
138+
<version>19.3.0.0</version>
228139
</dependency>
229-
<dependency>
230-
<groupId>com.oracle.database.jdbc.debug</groupId>
231-
<artifactId>ojdbc11-observability-debug</artifactId>
232-
<version>${version.lib.ojdbc}</version>
233-
<type>pom</type>
234-
</dependency> -->
235-
236140

237141
<dependency>
238142
<groupId>io.springfox</groupId>

0 commit comments

Comments
 (0)