Skip to content

Commit cda8a82

Browse files
authored
Terraform etc (#26)
* first-round * second-set * third-push * push4 * push5 * push6 * push * push * push * push * fixes * fixes * fixes * fixes * fixes * fixes * fixes * terra optimizations * terra fixes * env.sh and fixes * docker login fix * take out vaults for now * fixes * fixes * fixes * fixes * fixes * fixes * fixes * Deploy fixes and new terraform * terraform reorg and fixes * oci_core_services fix * Update core.tf * Update core.tf * Update main-destroy.sh * fixes * Update core.tf * fixes * Update oke-setup.sh * fixes * Boost Node CPU and Memory * Rename states for clarity * Update containerengine.tf * Update main-setup.sh * Build perf and main-setup.sh restart * fix * compute shape and docker login enhancements * Update main-setup.sh * build perf tuning * build fixes * Update build-all.sh * Update oci-cli-cs-key-auth.sh * terraform 3 AD * Update oci-cli-cs-key-auth.sh * Update core.tf * fixes * Update core.tf * fixes Uncomment Internet Gateway Comment DHCP settings Move SSL creation to earlier Add wait for OKE to warm up * fixes PropSetup Back to single domain Wait for OKE nodes msdataworkshop alias cwallet.sso name change remove terraform-orig * fixes wallet.zip VM.Standard.B1.1 image Prune terraform status to 60 characters * fixes add cwallet.sso link rm wallet folder (for security) * fixes Destroy new object atp secrets wait for OKE improved logging and setup handling * minor fixes * Fixes Remove RUN_TYPE for now Execute JAVA_BUILD and NON_JAVA_BUILD from main-setup * Fixes No Key Generated messages Improve end of setup * Update containerengine.tf Change image shape * Fixes Hardening oke-setup Different Shape * Update oke-setup.sh Hardening * Parallel Destroy Make destroy run in parallel * chmod * Update main-setup.sh More hardening * Update main-setup.sh * Update oke-setup.sh More defensive code * Typo * SODA build + cleanup Replace SODA jar with maven dependency Remove old scripts Fix global deploy/undeploy scripts * Reorg Jaeger * Jaeger Fixes * DB Prep in Setup and DB Name Changes Moved DB Setup from Java to Shell Change DB Name to o and i * Fixes and Start of GB Integration * DB Name Changes * Update db-setup.sh Fixes * Update db-setup.sh * GB Integration and Prop Fixes * fixes * Update oci-cli-cs-key-auth.sh * Removed DB Setup from UI * Update oci-cli-cs-key-auth.sh * Dot Net and Go * Fixes * Manage Non-Java Builds Better * Update main-destroy.sh
1 parent df40978 commit cda8a82

Some content is hidden

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

88 files changed

+2537
-848
lines changed

grabdish/addAndSourcePropertiesInBashrc.sh

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

grabdish/addOCIRInfo.sh

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

grabdish/admin-helidon/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM openjdk:11-jre-slim
2+
3+
ENTRYPOINT ["java", "-jar", "/usr/share/myservice/myservice.jar"]
4+
5+
# Add Maven dependencies
6+
ADD target/libs /usr/share/myservice/libs
7+
# Add the service itself
8+
ARG JAR_FILE
9+
ADD target/${JAR_FILE} /usr/share/myservice/myservice.jar

grabdish/admin-helidon/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ SCRIPT_DIR=$(dirname $0)
77
IMAGE_NAME=admin-helidon
88
IMAGE_VERSION=0.1
99

10+
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
11+
1012
if [ -z "DOCKER_REGISTRY" ]; then
1113
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
1214
exit 1
1315
fi
1416

1517
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
1618

17-
mvn install
18-
mvn package docker:build
19+
# mvn install
20+
# mvn package docker:build
21+
mvn package
1922

20-
if [ $DOCKERBUILD_RETCODE -ne 0 ]; then
21-
exit 1
22-
fi
2323
docker push $IMAGE
2424
if [ $? -eq 0 ]; then
2525
docker rmi ${IMAGE}

grabdish/admin-helidon/deploy.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
SCRIPT_DIR=$(dirname $0)
66

7+
export DOCKER_REGISTRY="$(state_get DOCKER_REGISTRY)"
8+
export ORDER_PDB_NAME="$(state_get ORDER_DB_NAME)"
9+
export INVENTORY_PDB_NAME="$(state_get INVENTORY_DB_NAME)"
10+
export OCI_REGION="$(state_get OCI_REGION)"
11+
export VAULT_SECRET_OCID=""
12+
713
echo create admin-helidon deployment and service...
814
export CURRENTTIME=$( date '+%F_%H:%M:%S' )
915
echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployment yaml

grabdish/admin-helidon/pom.xml

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
<modelVersion>4.0.0</modelVersion>
1414
<artifactId>admin-helidon</artifactId>
1515
<version>0.0.1-SNAPSHOT</version>
16-
<name>admin-helidon</name>
17-
<description>ATP OSB UCP Helidon Microprofile Microservices Demo</description>
16+
<name>${project.artifactId}</name>
17+
<description>Helidon Microprofile Microservices Demo</description>
1818

1919
<parent>
20-
<groupId>io.helidon</groupId>
21-
<artifactId>helidon-project</artifactId>
20+
<groupId>io.helidon.applications</groupId>
21+
<artifactId>helidon-mp</artifactId>
2222
<version>2.2.0</version>
23+
<relativePath/>
2324
</parent>
2425

2526
<properties>
@@ -36,27 +37,26 @@
3637
</resource>
3738
</resources>
3839
<plugins>
39-
4040
<plugin>
4141
<groupId>com.spotify</groupId>
42-
<artifactId>docker-maven-plugin</artifactId>
43-
<version>1.2.2</version>
42+
<artifactId>dockerfile-maven-plugin</artifactId>
43+
<version>1.4.13</version>
44+
<executions>
45+
<execution>
46+
<id>default</id>
47+
<goals>
48+
<goal>build</goal>
49+
</goals>
50+
</execution>
51+
</executions>
4452
<configuration>
45-
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
46-
<baseImage>openjdk:11</baseImage>
47-
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
48-
<resources>
49-
<resource>
50-
<targetPath>/</targetPath>
51-
<directory>${project.build.directory}</directory>
52-
</resource>
53-
</resources>
54-
<imageTags>
55-
<imageTag>0.1</imageTag>
56-
</imageTags>
53+
<repository>${env.DOCKER_REGISTRY}/${project.artifactId}</repository>
54+
<tag>0.1</tag>
55+
<buildArgs>
56+
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
57+
</buildArgs>
5758
</configuration>
5859
</plugin>
59-
6060
<plugin>
6161
<artifactId>maven-dependency-plugin</artifactId>
6262
<executions>
@@ -103,35 +103,11 @@
103103
<artifactId>helidon-integrations-cdi-datasource-ucp</artifactId>
104104
<scope>runtime</scope>
105105
</dependency>
106-
<!--<dependency>-->
107-
<!--<groupId>io.helidon.integrations.cdi</groupId>-->
108-
<!--<artifactId>helidon-integrations-cdi-datasource-hikaricp</artifactId>-->
109-
<!--<scope>runtime</scope>-->
110-
<!--</dependency>-->
111-
<dependency>
112-
<groupId>com.oracle.ojdbc</groupId>
113-
<artifactId>ojdbc10</artifactId>
114-
<version>19.3.0.0</version>
115-
</dependency>
116106
<dependency>
117-
<groupId>com.oracle.ojdbc</groupId>
118-
<artifactId>ucp</artifactId>
119-
<version>19.3.0.0</version>
120-
</dependency>
121-
<dependency>
122-
<groupId>com.oracle.ojdbc</groupId>
123-
<artifactId>osdt_core</artifactId>
124-
<version>19.3.0.0</version>
125-
</dependency>
126-
<dependency>
127-
<groupId>com.oracle.ojdbc</groupId>
128-
<artifactId>osdt_cert</artifactId>
129-
<version>19.3.0.0</version>
130-
</dependency>
131-
<dependency>
132-
<groupId>com.oracle.ojdbc</groupId>
133-
<artifactId>oraclepki</artifactId>
134-
<version>19.3.0.0</version>
107+
<groupId>com.oracle.database.jdbc</groupId>
108+
<artifactId>ojdbc8-production</artifactId>
109+
<version>19.8.0.0</version>
110+
<type>pom</type>
135111
</dependency>
136112
<dependency>
137113
<groupId>com.oracle.database.messaging</groupId>

grabdish/admin-helidon/setupForDBLinksInCloud.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@
77
#echo list existing buckets...
88
#oci os bucket list --compartment-id $OCI_COMPARTMENT_ID
99

10-
echo create msdataworkshop bucket ...ignore BucketAlreadyExists exception if this is not the first time running the script...
11-
oci os bucket create --name msdataworkshop --compartment-id $OCI_COMPARTMENT_ID
10+
#cho create msdataworkshop bucket ...ignore BucketAlreadyExists exception if this is not the first time running the script...
11+
#oci os bucket create --name msdataworkshop --compartment-id $OCI_COMPARTMENT_ID
1212

1313
#echo list existing buckets again...
1414
#oci os bucket list --compartment-id $OCI_COMPARTMENT_ID
1515

16-
echo delete cwallet.sso in bucket ...ignore ObjectNotFound exception if this is the first time running the script...
16+
#echo delete cwallet.sso in bucket ...ignore ObjectNotFound exception if this is the first time running the script...
1717
# Will be prompted "Are you sure you want to delete this resource? [y/N]"
1818

19-
echo put cwallet.sso in bucket ...select "y" when asked to overwrite
20-
oci os object put --bucket-name msdataworkshop --file $MSDATAWORKSHOP_LOCATION/atp-secrets-setup/wallet/cwallet.sso
19+
#echo put cwallet.sso in bucket ...select "y" when asked to overwrite
20+
#oci os object put --bucket-name msdataworkshop --file $MSDATAWORKSHOP_LOCATION/atp-secrets-setup/wallet/cwallet.sso
2121

22-
echo create link to cwallet.sso in objectstorage, save, export, and echo value..
23-
oci os preauth-request create --access-type ObjectRead --bucket-name msdataworkshop --name msdataworkshopwallet --time-expires 2021-12-21 --object-name cwallet.sso | jq --raw-output '.data | .["access-uri"] ' > preauthlink.txt
24-
export cwalletobjecturi=$(cat preauthlink.txt)
25-
export cwalletobjecturi=https://objectstorage.${OCI_REGION}.oraclecloud.com${cwalletobjecturi}
22+
#echo create link to cwallet.sso in objectstorage, save, export, and echo value..
23+
#oci os preauth-request create --access-type ObjectRead --bucket-name msdataworkshop --name msdataworkshopwallet --time-expires 2021-12-21 --object-name cwallet.sso | jq --raw-output '.data | .["access-uri"] ' > preauthlink.txt
24+
#export cwalletobjecturi=$(cat preauthlink.txt)
25+
26+
export DOCKER_REGISTRY="$(state_get DOCKER_REGISTRY)"
27+
export ORDER_PDB_NAME="$(state_get ORDER_DB_NAME)"
28+
export INVENTORY_PDB_NAME="$(state_get INVENTORY_DB_NAME)"
29+
30+
31+
export cwalletobjecturi=$(state_get CWALLET_SSO_AUTH_URL)
2632
echo updating admin-helidon-deployment-${CURRENTTIME}.yaml with cwalletobjecturi $cwalletobjecturi
2733
sed -i "s|%cwalletobjecturi%|${cwalletobjecturi}|g" admin-helidon-deployment-${CURRENTTIME}.yaml
2834

@@ -31,7 +37,7 @@ echo cwalletobjecturi is created and added to admin-helidon-deployment-${CURRENT
3137
echo adding other values in admin-helidon-deployment-${CURRENTTIME}.yaml as parsed from tnsnames.ora s
3238

3339
#echo ____________________________________________________
34-
export orderdb_tptnsentry=$(grep -i "^${ORDER_PDB_NAME}_tp " $MSDATAWORKSHOP_LOCATION/atp-secrets-setup/wallet/tnsnames.ora)
40+
export orderdb_tptnsentry=$(grep -i "^${ORDER_PDB_NAME}_tp " $GRABDISH_HOME/atp-secrets-setup/wallet/tnsnames.ora)
3541
#echo $ORDER_PDB_NAME tp entry... $orderdb_tptnsentry
3642
echo ____________________________________________________
3743
# for each variable, string off begin (based on identifier)
@@ -73,7 +79,7 @@ echo $orderssl_server_cert_dn
7379

7480

7581
#echo ____________________________________________________
76-
export inventorydb_tptnsentry=$(grep -i "^${INVENTORY_PDB_NAME}_tp " $MSDATAWORKSHOP_LOCATION/atp-secrets-setup/wallet/tnsnames.ora)
82+
export inventorydb_tptnsentry=$(grep -i "^${INVENTORY_PDB_NAME}_tp " $GRABDISH_HOME/atp-secrets-setup/wallet/tnsnames.ora)
7783
#echo $INVENTORY_PDB_NAME tp entry... $inventorydb_tptnsentry
7884
echo ____________________________________________________
7985
# for each variable, string off begin (based on identifier)

grabdish/artillery/test.sh

100644100755
File mode changed.

grabdish/atp-secrets-setup/createAll.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ then
1010
exit
1111
fi
1212

13-
source ../msdataworkshop.properties
13+
#source ../msdataworkshop.properties
1414
export SCRIPT_DIR=$(dirname $0)
1515
export CURRENTTIME=$( date '+%F_%H:%M:%S' )
1616
echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated yamls
@@ -38,7 +38,7 @@ export inventorypdb_README=$(cat README | base64 | tr -d '\n\r' | base64 | tr -d
3838
export inventorypdb_sqlnet_ora=$(cat sqlnet.ora | base64 | tr -d '\n\r' | base64 | tr -d '\n\r')
3939
export inventorypdb_tnsnames_ora=$(cat tnsnames.ora | base64 | tr -d '\n\r' | base64 | tr -d '\n\r')
4040
export inventorypdb_truststore_jks=$(cat truststore.jks | base64 | tr -d '\n\r' | base64 | tr -d '\n\r')
41-
41+
rm -rf wallet
4242
cd ../
4343
echo "replace values in order yaml files (files are suffixed with ${CURRENTTIME})..."
4444
eval "cat <<EOF

grabdish/build.sh

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

0 commit comments

Comments
 (0)