Skip to content

Commit 2873be3

Browse files
authored
Allow Local Development on Mac (#97)
* ToQA * Fixes * Remove Generated yamls
1 parent 22f4c43 commit 2873be3

28 files changed

+262
-93
lines changed

grabdish/docs/AutoTest.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
_Copyright (c) 2019, 2020, 2021 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0_
2+
3+
# Automated Workshop Testing
4+
5+
Here is how to run an automated test in your free tier tenancy or with a Live Labs reserved tenancy.
6+
7+
1. (Free Tier Only) Clean up your existing tenancy so thet you have disk space and the docker cache is empty:
8+
```
9+
docker image prune -a -f
10+
csreset -a
11+
```
12+
13+
2. (Free Tier Only) From the OCI Console, make space for a new auth token. The limit is 2.
14+
15+
3. (Free Tier Only) Create a directory to run the test:
16+
```
17+
export TEST_DIRECTORY=gd`awk 'BEGIN { srand(); print int(1 + rand() * 1000000)}'`
18+
echo "Test directory $TEST_DIRECTORY"
19+
mkdir $TEST_DIRECTORY
20+
cd $TEST_DIRECTORY
21+
```
22+
23+
4. (Free Tier Only) Register your user OCID:
24+
```
25+
export TEST_USER_OCID='ocid1.user.oc1..xxxxx'
26+
```
27+
28+
5. Register which branch you wish to test and the passwords to be used:
29+
```
30+
export GITHUB_BRANCH='1.4'
31+
export GITHUB_USER='oracle'
32+
export TEST_DB_PASSWORD='Welcome12345;#!:'
33+
export TEST_UI_PASSWORD='Welcome1;#!"'
34+
```
35+
36+
6. Clone the code
37+
```
38+
git clone -b "$BRANCH" --single-branch "https://github.com/${GITHUB_USER}/microservices-datadriven.git"
39+
```
40+
41+
7. Execute the setup. Note in the Live Labs case, the setup will prompt for the compartment OCID and an auth token.
42+
```
43+
sed -i.bak '/grabdish/d' ~/.bashrc
44+
echo "source $PWD/microservices-datadriven/grabdish/env.sh" >>~/.bashrc
45+
source microservices-datadriven/grabdish/env.sh
46+
source setup.sh
47+
```
48+
49+
8. Execute the test
50+
```
51+
source test.sh
52+
```
53+
54+
9. Clean up
55+
```
56+
source destroy.sh
57+
```

grabdish/docs/LocalDev.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
_Copyright (c) 2019, 2020, 2021 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0_
2+
3+
# Local Development
4+
5+
This document explains how to setup your development machine to perform development where the microservices can be built and then deployed onto OKE for testing.
6+
7+
These tests have been tested on MacOS
8+
9+
## Prerequisites
10+
11+
1. Install OCI CLI
12+
13+
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
14+
15+
2. Install kubectl
16+
17+
https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/
18+
19+
3. Install GraalVM
20+
```
21+
cd ~
22+
curl -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.1.0/graalvm-ce-java11-darwin-amd64-20.1.0.tar.gz | tar -xz
23+
```
24+
25+
4. Install Maven
26+
27+
https://maven.apache.org/install.html
28+
```
29+
cd ~
30+
curl -sL https://downloads.apache.org/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz | tar xz
31+
export PATH=~/apache-maven-3.8.1/bin:$PATH
32+
```
33+
34+
Also, add ~/apache-maven-3.8.1/bin to your /etc/paths
35+
36+
5. Install Docker
37+
38+
https://docs.docker.com/get-docker/
39+
40+
6. Clone your github development branch to your machine and make a note of the location, for example _/Users/freddy/Documents/GitHub/microservices-datadriven_.
41+
42+
## Setup Steps
43+
These steps are required every time you perform a new grabdish workshop setup.
44+
45+
1. Configure the OCI CLI to connect to your TENANCY_OCID
46+
```
47+
oci setup config
48+
```
49+
50+
2. Create a folder to hold the grabdish workshop state
51+
```
52+
mkdir ~/grabdish_state
53+
cd ~/grabdish_state
54+
```
55+
56+
2. Using the download feature of cloud shell (hamburger menu about cloud shell window), download the ./grabdish_state.tgz file to your machine. This file is generated when the workshop setup completes.
57+
58+
3. Copy the _grabdish_state.tgz_ file to the _~/grabdish_state_ folder.
59+
60+
4. Unpack the _grabdish_state.tgz_ file
61+
```
62+
cd ~/grabdish-state
63+
rm -rf state
64+
tar -xzf grabdish-state.tgz
65+
```
66+
67+
5. Set the shell environment using the env.sh script located in the cloned code
68+
```
69+
source /Users/rexley/Documents/GitHub/microservices-datadriven/grabdish/env.sh
70+
```
71+
This step will need to be repeated whenever you start a new shell.
72+
73+
6. Configure kubectl
74+
```
75+
oci ce cluster create-kubeconfig --cluster-id "$(state_get OKE_OCID)" --file $HOME/.kube/config --region "$(state_get REGION)" --token-version 2.0.0
76+
```
77+
78+
7. Generate an auth token through the OCI Console. Copy the token.
79+
80+
8. Login to Docker using the OCI Registry
81+
```
82+
docker login -u "$(state_get NAMESPACE)/$(state_get USER_NAME)" "$(state_get REGION).ocir.io"
83+
```
84+
You will be prompted for a password. Paste the auth token generated in the previous step.

grabdish/docs/Setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#

grabdish/env.sh

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,39 @@ if ! (return 0 2>/dev/null); then
88
exit
99
fi
1010

11+
# POSIX compliant find and replace
12+
function sed_i(){
13+
local OP="$1"
14+
local FILE="$2"
15+
sed -e "$OP" "$FILE" >"/tmp/$FILE"
16+
mv -- "/tmp/$FILE" "$FILE"
17+
}
18+
export -f sed_i
19+
1120
# Set GRABDISH_HOME
1221
export GRABDISH_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1322
cd $GRABDISH_HOME
1423
echo "GRABDISH_HOME: $GRABDISH_HOME"
1524

1625
# Java Home
17-
export JAVA_HOME=~/graalvm-ce-java11-20.1.0
26+
if test -d ~/graalvm-ce-java11-20.1.0/Contents/Home/bin; then
27+
# We are on Mac doing local dev
28+
export JAVA_HOME=~/graalvm-ce-java11-20.1.0/Contents/Home;
29+
else
30+
# Assume linux
31+
export JAVA_HOME=~/graalvm-ce-java11-20.1.0
32+
fi
1833
export PATH=$JAVA_HOME/bin:$PATH
1934

35+
# State directory
36+
if test -d ~/grabdish-state; then
37+
export GRABDISH_STATE_HOME=~/grabdish-state
38+
else
39+
export GRABDISH_STATE_HOME=$GRABDISH_HOME
40+
fi
41+
2042
# Log directory
21-
export GRABDISH_LOG=$GRABDISH_HOME/log
43+
export GRABDISH_LOG=$GRABDISH_STATE_HOME/log
2244
mkdir -p $GRABDISH_LOG
2345

2446
# Source the state functions
@@ -37,4 +59,4 @@ alias virtualservices='kubectl get virtualservices --all-namespaces'
3759
alias deployments='kubectl get deployments --all-namespaces'
3860
alias msdataworkshop='echo deployments... ; deployments|grep msdataworkshop ; echo pods... ; pods|grep msdataworkshop ; echo services... ; services | grep msdataworkshop ; echo secrets... ; secrets|grep msdataworkshop ; echo "other shortcut commands... most can take partial podname as argument, such as [logpod front] or [deletepod order]... pods services secrets deployments "'
3961

40-
export PATH=$PATH:$GRABDISH_HOME/utils/
62+
export PATH=$PATH:$GRABDISH_HOME/utils/

grabdish/frontend-helidon/deploy-verrazzano.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp frontend-helidon-comp.yaml frontend-helidon-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" frontend-helidon-comp-$CURRENTTIME.yaml
21-
sed -i "s|%ORDER_PDB_NAME%|${ORDER_PDB_NAME}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" frontend-helidon-comp-$CURRENTTIME.yaml
21+
sed_i "s|%ORDER_PDB_NAME%|${ORDER_PDB_NAME}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" frontend-helidon-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/frontend-helidon-comp-$CURRENTTIME.yaml
2727
kubectl apply -f $SCRIPT_DIR/frontend-helidon-app.yaml
2828
else
2929
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/frontend-helidon-comp-$CURRENTTIME.yaml) -n msdataworkshop
3030
fi
31-

grabdish/frontend-helidon/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo DOCKER_REGISTRY is $DOCKER_REGISTRY
1414
cp frontend-helidon-deployment.yaml frontend-helidon-deployment-$CURRENTTIME.yaml
1515

1616
#may hit sed incompat issue with mac
17-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" frontend-helidon-deployment-$CURRENTTIME.yaml
17+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" frontend-helidon-deployment-$CURRENTTIME.yaml
1818

1919
if [ -z "$1" ]; then
2020
kubectl apply -f $SCRIPT_DIR/frontend-helidon-deployment-$CURRENTTIME.yaml -n msdataworkshop

grabdish/inventory-dotnet/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-dotnet-comp.yaml inventory-dotnet-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-dotnet-comp-$CURRENTTIME.yaml
21-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-dotnet-comp-$CURRENTTIME.yaml
21+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-dotnet-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-dotnet-comp-$CURRENTTIME.yaml

grabdish/inventory-dotnet/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cp inventory-dotnet-deployment.yaml inventory-dotnet-deployment-$CURRENTTIME.yam
2121
#EOF" > inventory-dotnet-deployment-$CURRENTTIME.yaml
2222

2323

24-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-dotnet-deployment-$CURRENTTIME.yaml
25-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
26-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
27-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
24+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-dotnet-deployment-$CURRENTTIME.yaml
25+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
26+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
27+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-dotnet-deployment-${CURRENTTIME}.yaml
2828

2929
if [ -z "$1" ]; then
3030
kubectl apply -f $SCRIPT_DIR/inventory-dotnet-deployment-$CURRENTTIME.yaml -n msdataworkshop

grabdish/inventory-go/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-go-comp.yaml inventory-go-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-go-comp-$CURRENTTIME.yaml
21-
sed -i "s|%ORDER_PDB_NAME%|${ORDER_PDB_NAME}|g" inventory-go-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-go-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-go-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-go-comp-$CURRENTTIME.yaml
21+
sed_i "s|%ORDER_PDB_NAME%|${ORDER_PDB_NAME}|g" inventory-go-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-go-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-go-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-go-comp-$CURRENTTIME.yaml

grabdish/inventory-go/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cp inventory-go-deployment.yaml inventory-go-deployment-$CURRENTTIME.yaml
2121
#EOF" > inventory-go-deployment-$CURRENTTIME.yaml
2222

2323

24-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-go-deployment-$CURRENTTIME.yaml
25-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-go-deployment-${CURRENTTIME}.yaml
26-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-go-deployment-${CURRENTTIME}.yaml
27-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-go-deployment-${CURRENTTIME}.yaml
24+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-go-deployment-$CURRENTTIME.yaml
25+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-go-deployment-${CURRENTTIME}.yaml
26+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-go-deployment-${CURRENTTIME}.yaml
27+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-go-deployment-${CURRENTTIME}.yaml
2828

2929
if [ -z "$1" ]; then
3030
kubectl apply -f $SCRIPT_DIR/inventory-go-deployment-$CURRENTTIME.yaml -n msdataworkshop

grabdish/inventory-helidon-se/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-helidon-se-comp.yaml inventory-helidon-se-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-se-comp-$CURRENTTIME.yaml
21-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-se-comp-$CURRENTTIME.yaml
21+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-se-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-helidon-se-comp-$CURRENTTIME.yaml

grabdish/inventory-helidon-se/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ cp inventory-helidon-se-deployment.yaml inventory-helidon-se-deployment-$CURRENT
1818
IMAGE_NAME="inventory-helidon-se"
1919
IMAGE_VERSION="0.1"
2020

21-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g;s|%IMAGE_NAME%|${IMAGE_NAME}|g;s|%IMAGE_VERSION%|${IMAGE_VERSION}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
22-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
23-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
24-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
21+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g;s|%IMAGE_NAME%|${IMAGE_NAME}|g;s|%IMAGE_VERSION%|${IMAGE_VERSION}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
22+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
23+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
24+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-se-deployment-${CURRENTTIME}.yaml
2525

2626
if [ -z "$1" ]; then
2727
kubectl apply -f "$SCRIPT_DIR"/inventory-helidon-se-deployment-${CURRENTTIME}.yaml -n msdataworkshop

grabdish/inventory-helidon/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-helidon-comp.yaml inventory-helidon-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-comp-$CURRENTTIME.yaml
21-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-comp-$CURRENTTIME.yaml
21+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-helidon-comp-$CURRENTTIME.yaml

grabdish/inventory-helidon/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1616
cp inventory-helidon-deployment.yaml inventory-helidon-deployment-$CURRENTTIME.yaml
1717

1818
#may hit sed incompat issue with mac
19-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-deployment-$CURRENTTIME.yaml
20-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-deployment-$CURRENTTIME.yaml
21-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-deployment-${CURRENTTIME}.yaml
22-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-deployment-${CURRENTTIME}.yaml
19+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-helidon-deployment-$CURRENTTIME.yaml
20+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-helidon-deployment-$CURRENTTIME.yaml
21+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-helidon-deployment-${CURRENTTIME}.yaml
22+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-helidon-deployment-${CURRENTTIME}.yaml
2323

2424
if [ -z "$1" ]; then
2525
kubectl apply -f $SCRIPT_DIR/inventory-helidon-deployment-$CURRENTTIME.yaml -n msdataworkshop

grabdish/inventory-nodejs/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-nodejs-comp.yaml inventory-nodejs-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-nodejs-comp-$CURRENTTIME.yaml
21-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-nodejs-comp-$CURRENTTIME.yaml
21+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-nodejs-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-nodejs-comp-$CURRENTTIME.yaml

grabdish/inventory-nodejs/deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ IMAGE_NAME=inventory-nodejs
2020
IMAGE_VERSION=0.1
2121

2222
#may hit sed incompat issue with mac
23-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-nodejs-deployment-$CURRENTTIME.yaml
24-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-nodejs-deployment-$CURRENTTIME.yaml
25-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-nodejs-deployment-${CURRENTTIME}.yaml
26-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-nodejs-deployment-${CURRENTTIME}.yaml
23+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-nodejs-deployment-$CURRENTTIME.yaml
24+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-nodejs-deployment-$CURRENTTIME.yaml
25+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-nodejs-deployment-${CURRENTTIME}.yaml
26+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-nodejs-deployment-${CURRENTTIME}.yaml
2727

2828
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
2929

grabdish/inventory-python/deploy-verrazzano.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployme
1717
cp inventory-python-comp.yaml inventory-python-comp-$CURRENTTIME.yaml
1818

1919
#may hit sed incompat issue with mac
20-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-python-comp-$CURRENTTIME.yaml
21-
sed -i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-python-comp-${CURRENTTIME}.yaml
22-
sed -i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-python-comp-${CURRENTTIME}.yaml
23-
sed -i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-python-comp-${CURRENTTIME}.yaml
20+
sed_i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" inventory-python-comp-$CURRENTTIME.yaml
21+
sed_i "s|%INVENTORY_PDB_NAME%|${INVENTORY_PDB_NAME}|g" inventory-python-comp-${CURRENTTIME}.yaml
22+
sed_i "s|%OCI_REGION%|${OCI_REGION}|g" inventory-python-comp-${CURRENTTIME}.yaml
23+
sed_i "s|%VAULT_SECRET_OCID%|${VAULT_SECRET_OCID}|g" inventory-python-comp-${CURRENTTIME}.yaml
2424

2525
if [ -z "$1" ]; then
2626
kubectl apply -f $SCRIPT_DIR/inventory-python-comp-$CURRENTTIME.yaml

0 commit comments

Comments
 (0)