Skip to content

Commit 56b0366

Browse files
authored
Merge pull request #28 from oracle/helidon-v2.0.0
Helidon v2.0.0 update
2 parents 7bfd3c4 + 5830171 commit 56b0366

File tree

131 files changed

+1312
-2151
lines changed

Some content is hidden

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

131 files changed

+1312
-2151
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ hs_err_pid*
2626
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2727

2828
# dependencies
29-
frontend/node_modules
29+
*/frontend-app/node_modules
30+
*/frontend/node_modules
31+
*/backend/target
3032
frontend/.pnp
3133
.pnp.js
3234

@@ -42,8 +44,6 @@ frontend/build
4244
.env.development.local
4345
.env.test.local
4446
.env.production.local
45-
46-
frontend/package-lock.json
47-
frontend/npm-debug.log*
48-
frontend/yarn-debug.log*
49-
frontend/yarn-error.log*
47+
.idea
48+
*/*/wallet/*
49+
*/wallet

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ A repository for full stack Cloud Native applications with a React JS frontend a
55

66

77
## MyToDo React JS
8-
The `mtdrworkshop` repository hosts the materiald (code, scripts and instructions) for building and deploying Cloud Native Application using a Java/Helidon backend
8+
The `mtdrworkshop` repository hosts the materials (code, scripts and instructions) for building and deploying Cloud Native Application using a Java/Helidon backend
99

1010

11-
## Expect more ...

THIRD_PARTY_LICENSES.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
NextJS
2+
https://github.com/vercel/next.js
3+
4+
The MIT License (MIT)
5+
6+
Copyright (c) 2023 Vercel, Inc.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
25+
26+
___________________________________________________________________________________________________
27+
128
React
229
https://github.com/facebook/react/
330

mtdrworkshop/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MyToDoReact version 1.0.
1+
# MyToDoReact version 2.0.0
22
Copyright (c) 2021 Oracle, Inc.
33

44
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
@@ -7,11 +7,6 @@ Licensed under the Universal Permissive License v 1.0 as shown at https://oss.or
77

88
Learn how to deploy a simple Cloud native application using the most commonly used frameworks and the Oracle Cloud Infrastructure services.
99

10-
![](./images/Application.png " ")
11-
12-
You will will learn how to use the Autonomous Database, the Container Registry, the Kubernetes Cluster (OKE) , Helidon, and the API Gateway managed services of the Oracle Cloud Infrastructure through the deployment of a simple MyToDo List React JS application.
13-
![](./images/architecture.png " ")
14-
1510
# Prerequisites
1611

1712
* An Oracle Free Tier, Always Free, Paid or LiveLabs Cloud Account

mtdrworkshop/backend/backend.md

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

mtdrworkshop/backend/build.sh

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,18 @@
11
#!/bin/bash
2-
## MyToDoReact version 1.0.
2+
## MyToDoReact version 2.0.0
33
##
44
## Copyright (c) 2021 Oracle, Inc.
55
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66

77
SCRIPT_DIR=$(dirname $0)
88

9-
IMAGE_NAME=todolistapp-helidon-se
10-
IMAGE_VERSION=0.1
9+
# set vars
10+
source set.sh
1111

12-
if [ -z "$DOCKER_REGISTRY" ]; then
13-
echo "DOCKER_REGISTRY not set. Will get it with state_get"
14-
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
15-
fi
16-
17-
if [ -z "$DOCKER_REGISTRY" ]; then
18-
echo "Error: DOCKER_REGISTRY env variable needs to be set!"
19-
exit 1
20-
fi
21-
22-
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION}
23-
mvn install
12+
mvn clean package
2413
docker build -f src/main/docker/Dockerfile -t $IMAGE .
25-
# mvn package docker:build
2614

27-
# if [ $DOCKERBUILD_RETCODE -ne 0 ]; then
2815
if [ $? -ne 0 ]; then
2916
exit 1
3017
fi
3118
docker push $IMAGE
32-
# if [ $? -eq 0 ]; then
33-
# docker rmi ${IMAGE}
34-
# fi

mtdrworkshop/backend/deploy.sh

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,40 @@
11
#!/bin/bash
2-
## MyToDoReact version 1.0.
2+
## MyToDoReact version 2.0.0
33
##
44
## Copyright (c) 2021 Oracle, Inc.
55
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66
SCRIPT_DIR=$(dirname $0)
7-
export DOCKER_REGISTRY=$(state_get DOCKER_REGISTRY)
8-
if [ -z "$TODO_PDB_NAME" ]; then
9-
echo "TODO_PDB_NAME not set. Will get it with state_get"
10-
export TODO_PDB_NAME=$(state_get MTDR_DB_NAME)
11-
fi
12-
if [ -z "$TODO_PDB_NAME" ]; then
13-
echo "Error: TODO_PDB_NAME env variable needs to be set!"
14-
exit 1
15-
fi
16-
if [ -z "$OCI_REGION" ]; then
17-
echo "OCI_REGION not set. Will get it with state_get"
18-
export OCI_REGION=$(state_get REGION)
19-
fi
20-
if [ -z "$OCI_REGION" ]; then
21-
echo "Error: OCI_REGION env variable needs to be set!"
22-
exit 1
23-
fi
7+
248
echo "Creating helidon deployment and service"
9+
10+
# set vars
11+
source set.sh
12+
2513
export CURRENTTIME=$( date '+%F_%H:%M:%S' )
14+
YAML_NAME=manifest-$CURRENTTIME.yaml
15+
2616
echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployment yaml
27-
cp src/main/k8s/todolistapp-helidon-se-deployment.yaml todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
17+
cp src/main/k8s/manifest.yaml "$YAML_NAME"
2818
#may hit sed incompat issue with mac
29-
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
30-
#kubectl apply -f $SCRIPT_DIR/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
19+
sed -i "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" "$YAML_NAME"
20+
#kubectl apply -f $SCRIPT_DIR/"$YAML_NAME"
3121

32-
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" todolistapp-helidon-se-deployment-${CURRENTTIME}.yaml > /tmp/todolistapp-helidon-se-deployment-${CURRENTTIME}.yaml
33-
mv -- /tmp/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
34-
sed -e "s|%TODO_PDB_NAME%|${TODO_PDB_NAME}|g" todolistapp-helidon-se-deployment-${CURRENTTIME}.yaml > /tmp/todolistapp-helidon-se-deployment-${CURRENTTIME}.yaml
35-
mv -- /tmp/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
36-
sed -e "s|%OCI_REGION%|${OCI_REGION}|g" todolistapp-helidon-se-deployment-${CURRENTTIME}.yaml > /tmp/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
37-
mv -- /tmp/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml todolistapp-helidon-se-deployment-$CURRENTTIME.yaml
22+
sed -e "s|%DOCKER_REGISTRY%|${DOCKER_REGISTRY}|g" "$YAML_NAME" > /tmp/"$YAML_NAME"
23+
mv -- /tmp/"$YAML_NAME" "$YAML_NAME"
24+
sed -e "s|%DOCKER_IMAGE%|${IMAGE_NAME}|g" "$YAML_NAME" > /tmp/"$YAML_NAME"
25+
mv -- /tmp/"$YAML_NAME" "$YAML_NAME"
26+
sed -e "s|%DOCKER_IMAGE_TAG%|${IMAGE_VERSION}|g" "$YAML_NAME" > /tmp/"$YAML_NAME"
27+
mv -- /tmp/"$YAML_NAME" "$YAML_NAME"
28+
sed -e "s|%TODO_PDB_NAME%|${TODO_PDB_NAME}|g" "$YAML_NAME" > /tmp/"$YAML_NAME"
29+
mv -- /tmp/"$YAML_NAME" "$YAML_NAME"
30+
sed -e "s|%OCI_REGION%|${OCI_REGION}|g" "$YAML_NAME" > /tmp/"$YAML_NAME"
31+
mv -- /tmp/"$YAML_NAME" "$YAML_NAME"
3832

3933

4034
if [ -z "$1" ]; then
41-
kubectl apply -f $SCRIPT_DIR/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml -n mtdrworkshop
35+
kubectl apply -f $SCRIPT_DIR/"$YAML_NAME" -n mtdrworkshop
4236
else
43-
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/todolistapp-helidon-se-deployment-$CURRENTTIME.yaml) -n mtdrworkshop
37+
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/"$YAML_NAME") -n mtdrworkshop
4438
fi
4539

4640
#kubectl apply -f $SCRIPT_DIR/order-service.yaml -n mtdrworkshop
-45.4 KB
Binary file not shown.
-48.1 KB
Binary file not shown.
-27 KB
Binary file not shown.

0 commit comments

Comments
 (0)