Skip to content
Merged

Reorg #277

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
f5ddabf
Reorg code
RichardExley Aug 26, 2021
a48dae4
exec perms
RichardExley Aug 26, 2021
c6ef4b4
Update setup.env
RichardExley Aug 27, 2021
d305b68
Update setup.env
RichardExley Aug 27, 2021
408d4ab
fix
RichardExley Aug 27, 2021
69375b5
Update setup.env
RichardExley Aug 27, 2021
bc07968
Update setup.env
RichardExley Aug 27, 2021
60f1e04
Update setup.sh
RichardExley Aug 27, 2021
b999375
Update setup.sh
RichardExley Aug 27, 2021
6263b2d
fixes
RichardExley Aug 27, 2021
f95b78e
fixes
RichardExley Aug 27, 2021
0a7a6e8
fixes
RichardExley Aug 27, 2021
5a199f1
fixes
RichardExley Aug 27, 2021
73d6876
fixes
RichardExley Aug 27, 2021
1299a89
fixes
RichardExley Aug 27, 2021
9b34ac7
fixes
RichardExley Aug 27, 2021
74504c7
fixes
RichardExley Aug 27, 2021
0a2a301
fixes
RichardExley Aug 27, 2021
efb4611
fixes
RichardExley Aug 27, 2021
09433ff
fixes
RichardExley Aug 27, 2021
2348b54
fixes
RichardExley Aug 27, 2021
887ac60
Update destroy.sh
RichardExley Aug 27, 2021
b012117
fixes
RichardExley Aug 27, 2021
de4ced4
fixes
RichardExley Aug 27, 2021
3738bd2
fixes
RichardExley Aug 27, 2021
116b662
Update destroy.sh
RichardExley Aug 27, 2021
2fb67af
fixes
RichardExley Aug 27, 2021
a3fa2c5
fixes
RichardExley Aug 28, 2021
eaaab63
fixes
RichardExley Aug 28, 2021
4787d18
fixes
RichardExley Sep 1, 2021
4c6ddb7
fixes
RichardExley Sep 1, 2021
d6bf1b5
fixes
RichardExley Sep 8, 2021
ceea602
fixes
RichardExley Sep 8, 2021
105012c
Update apply.sh
RichardExley Sep 8, 2021
53aaab8
fixes
RichardExley Sep 8, 2021
3876599
fixes
RichardExley Sep 8, 2021
d32f91a
fixes
RichardExley Sep 8, 2021
964bb24
fixes
RichardExley Sep 9, 2021
5e6d814
fixes
RichardExley Sep 9, 2021
5cb6c8c
Create db-setup.sh
RichardExley Sep 9, 2021
8cf2e47
Update java-builds.sh
RichardExley Sep 9, 2021
8026076
Update non-java-builds.sh
RichardExley Sep 9, 2021
354d21a
fixes
RichardExley Sep 9, 2021
c5098ba
fixes
RichardExley Sep 9, 2021
3252d1b
Update apply.env
RichardExley Sep 9, 2021
6ad8d26
fixes
RichardExley Sep 9, 2021
f859aa5
fixes
RichardExley Sep 9, 2021
d3070bb
fixes
RichardExley Sep 9, 2021
f56bf95
fixes
RichardExley Sep 10, 2021
413a87f
fixes
RichardExley Sep 10, 2021
8d45ca4
fixes
RichardExley Sep 10, 2021
9d69552
fixes
RichardExley Sep 10, 2021
fe6c172
Update main-setup.sh
RichardExley Sep 10, 2021
414117a
Create database.tf
RichardExley Sep 11, 2021
f9b3095
Update main-setup.sh
RichardExley Sep 11, 2021
aa69781
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Sep 11, 2021
6dffc1b
fixes
RichardExley Sep 13, 2021
e389c97
Update undeploy.sh
RichardExley Sep 13, 2021
df62471
fixes
RichardExley Sep 13, 2021
1564247
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Sep 13, 2021
2fee179
k6 change
RichardExley Sep 13, 2021
33ad6eb
use msdataworkshop namespace for ingress
RichardExley Sep 14, 2021
0b3455f
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Sep 15, 2021
d8dc126
Update apply.sh
RichardExley Sep 15, 2021
9db0982
fixes
RichardExley Sep 15, 2021
88d1f60
Update source.env
RichardExley Sep 15, 2021
a304d15
fixes
RichardExley Sep 16, 2021
d43e299
ll
RichardExley Sep 17, 2021
c0f1367
Update apply.sh
RichardExley Sep 17, 2021
167ee74
status
RichardExley Sep 17, 2021
a625073
fixes
RichardExley Sep 17, 2021
1a3f0df
fixes
RichardExley Sep 21, 2021
9f4e82e
fixes
RichardExley Sep 21, 2021
2cc00ee
fixes
RichardExley Sep 21, 2021
f018bc7
fixes
RichardExley Sep 24, 2021
035c966
fixes
RichardExley Sep 29, 2021
a5198cb
Update apply.sh
RichardExley Sep 29, 2021
20619b0
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Sep 29, 2021
d8e125a
Update apply.sh
RichardExley Sep 29, 2021
809a808
fixes
RichardExley Sep 29, 2021
2c88f43
fixes
RichardExley Sep 30, 2021
62543db
Update apply.sh
RichardExley Sep 30, 2021
ea0484c
Update requirements.env
RichardExley Sep 30, 2021
2a229fa
Update requirements.env
RichardExley Sep 30, 2021
a22be70
Update database.tf
RichardExley Sep 30, 2021
c8b283a
fixes
RichardExley Sep 30, 2021
39f6cf7
Test1
RichardExley Oct 6, 2021
d56bf93
test2
RichardExley Oct 6, 2021
3c1056e
test3
RichardExley Oct 7, 2021
d736ee1
test4
RichardExley Oct 7, 2021
f9d7716
Merge remote-tracking branch 'upstream/main' into shared_pdb
RichardExley Oct 7, 2021
0a5f0e9
test5
RichardExley Oct 12, 2021
ed7e469
test6
RichardExley Oct 12, 2021
b1906ba
test7
RichardExley Oct 13, 2021
b90283f
test7a
RichardExley Oct 13, 2021
f3d0f78
test8
RichardExley Oct 13, 2021
afff72b
test8a
RichardExley Oct 13, 2021
5fa97a6
test9
RichardExley Oct 13, 2021
4b1a1f4
test10
RichardExley Oct 13, 2021
5cca072
test10a
RichardExley Oct 13, 2021
076f1df
Test10b
RichardExley Oct 13, 2021
af372f3
test11
RichardExley Oct 13, 2021
82c3e9e
test11
RichardExley Oct 15, 2021
f1f7c47
test11a
RichardExley Oct 15, 2021
8b83acf
test12
RichardExley Oct 16, 2021
960aa54
test12
RichardExley Oct 16, 2021
5580c0d
Merge branch 'shared_pdb' of https://github.com/RichardExley/microser…
RichardExley Oct 18, 2021
90668fd
test13
RichardExley Oct 18, 2021
3ca5faa
Merge remote-tracking branch 'upstream/main' into shared_pdb
RichardExley Oct 18, 2021
52919e0
test13a
RichardExley Oct 18, 2021
cfee95f
test14
RichardExley Oct 19, 2021
40d09e2
test14a
RichardExley Oct 20, 2021
7c25828
test14b
RichardExley Oct 20, 2021
4f97e99
test15
RichardExley Oct 25, 2021
a623366
test16
RichardExley Oct 25, 2021
20eb468
test16b
RichardExley Oct 25, 2021
8648e7d
test16c
RichardExley Oct 25, 2021
1a02e17
test16d
RichardExley Oct 25, 2021
cec923f
Test17
RichardExley Oct 26, 2021
3affb92
test18
RichardExley Nov 1, 2021
42999f6
Merge branch 'shared_pdb' into reorg
RichardExley Nov 1, 2021
1ccb516
test1
RichardExley Nov 2, 2021
57a0925
test2
RichardExley Nov 10, 2021
f78364c
test3
RichardExley Nov 23, 2021
04f3f45
test4
RichardExley Nov 28, 2021
855630b
test5
RichardExley Dec 4, 2021
7ebe9a9
test6
RichardExley Dec 4, 2021
f444dd6
test7
RichardExley Dec 4, 2021
e135075
test 8
RichardExley Dec 4, 2021
74265b0
test9
RichardExley Dec 6, 2021
5c9e9f0
test10
RichardExley Dec 6, 2021
6dee510
test11
RichardExley Dec 6, 2021
253b196
test12
RichardExley Dec 6, 2021
8edd3a0
test13
RichardExley Dec 6, 2021
6330b65
test14
RichardExley Dec 6, 2021
36e5ea9
test15
RichardExley Dec 6, 2021
57f8c35
test16
RichardExley Dec 6, 2021
a1031d1
test17
RichardExley Dec 7, 2021
7fd2674
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Dec 7, 2021
85a97c2
test20
RichardExley Dec 7, 2021
7b99cda
test20a
RichardExley Dec 7, 2021
d2a9ac1
test20b
RichardExley Dec 7, 2021
b3a7069
test21
RichardExley Dec 7, 2021
f2add45
test21a
RichardExley Dec 7, 2021
d4e9e55
test21b
RichardExley Dec 7, 2021
cfe0e09
test21c
RichardExley Dec 7, 2021
6108d7b
test22
RichardExley Dec 7, 2021
29cba5a
test23
RichardExley Dec 7, 2021
9ad4045
test24
RichardExley Dec 8, 2021
59de590
test25
RichardExley Dec 8, 2021
0f1b4b7
test25a
RichardExley Dec 8, 2021
07581ff
test25b
RichardExley Dec 8, 2021
086204c
test26
RichardExley Dec 9, 2021
a651c90
test27
RichardExley Dec 11, 2021
7816a36
test28
RichardExley Dec 11, 2021
df5f7da
test29
RichardExley Dec 11, 2021
9b1a52f
test30
RichardExley Dec 12, 2021
af0d325
test31
RichardExley Dec 13, 2021
14fc933
test32
RichardExley Dec 13, 2021
2db5059
test33
RichardExley Dec 13, 2021
652e8b3
test34
RichardExley Dec 13, 2021
8d3ebb5
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Dec 13, 2021
5a6b319
test35
RichardExley Dec 13, 2021
f615e0f
test36
RichardExley Dec 14, 2021
9148a68
test37
RichardExley Dec 14, 2021
2f7054a
test38
RichardExley Dec 14, 2021
bae2ad5
test39
RichardExley Dec 14, 2021
8d38f57
test40
RichardExley Dec 14, 2021
96ba3db
test41
RichardExley Dec 14, 2021
4fb06a1
test42
RichardExley Dec 15, 2021
72aa4ce
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Dec 15, 2021
4b2f639
Update setup.sh
RichardExley Dec 15, 2021
dc5c76e
test43
RichardExley Dec 15, 2021
02f4350
test44
RichardExley Dec 15, 2021
2b989d9
Update source.env
RichardExley Dec 15, 2021
e4ce475
PostReview
RichardExley Dec 16, 2021
835634e
SQL File Renaming
RichardExley Dec 16, 2021
4751b3d
vault fixes
RichardExley Dec 16, 2021
ed87b87
Update vault-oci-os-functions.env
RichardExley Dec 16, 2021
f9f0bfb
Update vault-oci-os-functions.env
RichardExley Dec 16, 2021
1b52ee1
Merge remote-tracking branch 'upstream/main' into reorg
RichardExley Dec 17, 2021
b3663c5
Update setup.sh
RichardExley Dec 17, 2021
bba501f
fixes
RichardExley Dec 21, 2021
3077a95
Update destroy.sh
RichardExley Dec 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions common/docs/DeployFunctions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
_Copyright (c) 2019, 2020, 2021 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0_

# Deployment Functions

The deployment helper functions are defined in common/utils/deploy-functions.env and sourced by common/source.env. They are used to streamline the deployment of microservices.

## k8s_deploy

Deploy a set of yaml files. The function accepts a single parameter that represents a space separate list of yaml files to be deployed, for example:

```
k8s-deploy 'inventory-helidon-deployment.yaml inventory-service.yaml'
```

### Internals

kubectl apply is used to deploy the files and so the k8s_deploy function is idempotent.

The yaml files are expected to be in the same folder as the script that invokes this function.

The yaml files are processed to substitute environment variables before they are deployed. The processed yaml files are place in the .deployed folder in the home directory of the microservice.

The syntax available to define substitution variable is as follows:

- **${VAR}** Fails if VAR is undefined, else is substitutes the value of VAR
- **${VAR-default}** If VAR is not defined substitute 'default', else substitutes the value of VAR
- **${VAR-}** If VAR is not defined substitute '', else it substitutes the value of VAR
- **${VAR?MSG}** Fails if VAR is undefined with the error 'MSG', else it substitutes value of VAR
- **${VAR:-default}** If VAR is not defined or empty, substitute 'default', else it substitutes the value of VAR
- **${VAR:?MSG}** Fails if VAR is undefined or empty with the error 'MSG', else it substitutes the value of VAR

Here is an example:

```
- name: OCI_REGION
value: "${OCI_REGION-}"
```

## k8s_undeploy

Undeploy the yaml files what were deployed by k82_deploy. The files are undeployed in the reverse order.

### Internals

The yaml files of the deployed resources are found in the .deployed folder. The files are deleted once thay have been undeployed.

kubectl delete is used to undeploy the resources.
4 changes: 2 additions & 2 deletions grabdish/config/requirements.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

# Variables to be set in input.env:
# DB_DEPLOYMENT: 2db
# DB_DEPLOYMENT: 1DB 2DB
# DB_TYPE: atp
# QUEUE_TYPE: classicq
# DB_PASSWORD_SECRET: Name of the secret holding the database password access by function get_secret
Expand All @@ -18,4 +18,4 @@

REQ_UTILS="touch cat rm sqlplus grep"
REQ_INPUT_PARAMS="DB_DEPLOYMENT DB_TYPE QUEUE_TYPE DB_PASSWORD_SECRET UI_PASSWORD_SECRET DB1_NAME DB1_TNS_ADMIN DB1_ALIAS DB2_NAME DB2_TNS_ADMIN DB2_ALIAS CWALLET_OS_BUCKET OCI_REGION GRABDISH_LOG"
REQ_OUTPUT_PARAMS="ORDER_DB_NAME ORDER_DB_ALIAS ORDER_DB_TNS_ADMIN INVENTORY_DB_NAME INVENTORY_DB_ALIAS INVENTORY_DB_TNS_ADMIN"
REQ_OUTPUT_PARAMS="ORDER_DB_NAME ORDER_DB_ALIAS ORDER_DB_TNS_ADMIN INVENTORY_DB_NAME INVENTORY_DB_ALIAS INVENTORY_DB_TNS_ADMIN"
36 changes: 36 additions & 0 deletions grabdish/docs/Build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
_Copyright (c) 2019, 2020, 2021 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0_

# Grabdish Build Process

It is necessary to build the grabdish microservices before they can be deployed. Each microservice has its own build script. A build script compiles the code, constructs a docker image, and pushes the image to the repository. The image is used when deploying the microservice. It is possible to run the builds and provisioning in parallel to save time, however, building more than one java based microservice in parallel has been found to be unreliable and so is not recommended.

## Prerequisites

The following are required before building a Grabdish microservice:

1. Java installed
2. Docker installed
3. Docker image repository prepared
4. Software cloned

## Environment Variables

To build grabdish services the following environment variables must be exported:

DOCKER_REGISTRY
JAVA_HOME
PATH=${JAVA_HOME}/bin:$PATH

## Steps

1. Change to a service's home folder, for example:

```
cd inventory-helidon
```

2. Execute the build script:

```
./build.sh
```
56 changes: 56 additions & 0 deletions grabdish/docs/Deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
_Copyright (c) 2019, 2020, 2021 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0_

# Grabdish Deployment

## Environment Variables

To deploy grabdish services the following environment variables must be exported. Note, most of these are outputs from the provisioning process:

- ORDER_DB_NAME
- ORDER_DB_TNS_ADMIN
- ORDER_DB_ALIAS
- INVENTORY_DB_NAME
- INVENTORY_DB_TNS_ADMIN
- INVENTORY_DB_ALIAS
- OCI_REGION: OCI vault only
- VAULT_SECRET_OCID: OCI vault only

## Deploy Steps

1. Source the common environment:

source microservices-datadriven/common/source.env

2. Change to a microservice's home folder, for example:

```
cd inventory-helidon
```

3. Execute the deploy script:

```
./deploy.sh
```

## Undeploy Steps

1. Source the common environment:

source microservices-datadriven/common/source.env

2. Change to a microservice's home folder, for example:

```
cd inventory-helidon
```

3. Execute the undeploy script:

```
./undeploy.sh
```

## Internals

The deploy.sh and undeploy.sh scripts use the k8s_deploy andf k8s_undeploy helper functions respectively, defined in common/utils/deploy-functions.env and sourced by common/source.env. See common/docs/DeployFunctions.md for details.
152 changes: 0 additions & 152 deletions grabdish/docs/ProvisionBuildDeploy.md

This file was deleted.

Loading