You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hols/oci-basic-setup/README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,33 +3,33 @@
3
3
This example demonstrates how to create a basic OCI infrastructure setup that can be used to deploy a Helidon MP OCI application.
4
4
5
5
## Objective
6
-
1. Use Terraform to create automation of OCI resources provisioning that can build a basic OCI infrastructure setup composed of the following:
6
+
1. Use Terraform to automate the provisioning of OCI resources that can build a basic OCI setup composed of the following:
7
7
1. OCI Compute instance with firewall opened at port 8080.
8
-
2. OCI Virtual Cloud Network with Security List containing an Ingress at port 8080.
8
+
2. OCI Virtual Cloud Network with a Security List containing an Ingress at port 8080.
9
9
3. Policies to allow OCI Logging and Monitoring services to be accessed from the provisioned OCI Compute instance.
10
10
2. Generate a Helidon MP OCI project using Helidon cli.
11
-
3. Use OCI cloud-shell to run this example through.
11
+
3. Use OCI Cloud Shell to run this example through.
12
12
13
13
## Prerequisite
14
-
- An OCI tenancy that has enough capacity to provision an OCI Compute instance and a Virtual Cloud Network. This will also work on the free trial of the [OCI Free Tier](https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier.htm).
14
+
- An OCI tenancy that has enough capacity to provision an OCI Compute Instance and a Virtual Cloud Network (VCN). This will also work on the free trial of the [OCI Free Tier](https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier.htm).
15
15
16
16
## Tasks
17
17
### Set up Cloud Shell access.
18
18
1. If you are already a super-user with administrator rights that has access to all resources in the tenancy, skip to the next section. Otherwise, continue to the next step.
19
19
2. Create a new group and add your user as a member of that group.
20
-
3. Create a new policy and provide that group a cloud-shell access:
20
+
3. Create a new policy and provide that group a Cloud Shell access:
21
21
```
22
22
Allow group '<my_cloud_shell_access_group>' to use cloud-shell in tenancy
23
23
```
24
24
4. Verify that it works by opening Cloud Shell from the OCI Console.
25
25
26
26
### Retrieve the oci-basic-setup subdirectory from the helidon-labs repository
27
-
The materials for this exercise will be located in the [oci-basic-setup](https://github.com/helidon-io/helidon-labs/tree/main/hols/oci-basic-setup) subdirectory of the [helidon-labs](https://github.com/helidon-io/helidon-labs) repository, hence only that specific subdirectory will be cloned.
27
+
The materials for this exercise are located in the [oci-basic-setup](https://github.com/helidon-io/helidon-labs/tree/main/hols/oci-basic-setup) subdirectory of the [helidon-labs](https://github.com/helidon-io/helidon-labs) repository, so only that specific subdirectory needs to be cloned.
28
28
1. Open a Cloud Shell terminal and make sure you are in the home directory
29
29
```shell
30
30
cd~
31
31
```
32
-
2. Use `git sparsecheckout` to check out only the `oci-basic-setup` directory from the helidon-labs repository.
32
+
2. Use `git sparsecheckout` to check out only the `oci-basic-setup` directory from the `helidon-labs` repository.
33
33
```shell
34
34
git init helidon-labs
35
35
cd helidon-labs
@@ -39,7 +39,7 @@ The materials for this exercise will be located in the [oci-basic-setup](https:/
39
39
echo".gitignore">> .git/info/sparse-checkout
40
40
git pull --depth=1 origin main
41
41
```
42
-
3. The previous step will pull all the required Terraform and Bash script files into the `~/helidon-labs/hols/oci-basic-setup` directory that will be needed to perform various operations to complete this exercise.
42
+
3. The previous step pulls all the required Terraform and Bash script files into the `~/helidon-labs/hols/oci-basic-setup` directory that is required to perform the various operations in this exercise.
43
43
44
44
### Prepare the OCI infrastructure environment
45
45
The goal of this task is to prepare a basic infrastructure environment comprised of a Compartment, Dynamic Groups, Policies, Compute and Virtual Cloud Network. This section requires a user with administrator privilege.
@@ -70,12 +70,12 @@ The goal of this task is to prepare a basic infrastructure environment comprised
70
70
```shell
71
71
cd~
72
72
```
73
-
2. Download and unzip the helidon cli generic distribution
73
+
2. Download and unzip the Helidon CLI generic distribution
1. Updates the `~/oci-mp/server/src/main/resources/application.yaml` config file to set up a Helidon feature that sends Helidon generated metrics to the OCI monitoring service.
121
121
1. compartmentId - The Compartment OCID used for this demo.
122
122
2. namespace - This can be any string but for this demo, will be set to `helidon_metrics`.
@@ -125,7 +125,7 @@ The goal of this task is to prepare a basic infrastructure environment comprised
125
125
2. oci.monitoring.namespace - This can be any string but for this demo, this will be set to `helidon_application`.
126
126
3. oci.logging.id - Application log id that was provisioned by the terraform scripts.
127
127
128
-
**Note:** Make sure to validate that `application.yaml` and `microprofile-config.properties`have been updated by checking that the mentioned config parameters were properly populated.
128
+
**Note:** Make sure to validate that `application.yaml` and `microprofile-config.properties`were updated by checking that the mentioned config parameters were properly populated.
129
129
12. To prepare forthe build, ensure that JDK 21 and Maven 3.8+ exist and are setin the PATH environment variable of the Cloud Shell terminal.
130
130
13. Build the application.
131
131
```shell
@@ -150,19 +150,19 @@ The goal of this task is to prepare a basic infrastructure environment comprised
@@ -171,7 +171,7 @@ The goal of this task is to prepare a basic infrastructure environment comprised
171
171
curl -X PUT -H "Content-Type: application/json" -d '{"greeting":"Hola"}' http://$ENDPOINT_IP:8080/greet/greeting
172
172
curl http://$ENDPOINT_IP:8080/greet
173
173
```
174
-
results to:
174
+
results in:
175
175
```shell
176
176
{"message":"Hola World!","date":[2025,4,29]}
177
177
```
@@ -188,8 +188,8 @@ The goal of this task is to prepare a basic infrastructure environment comprised
188
188
2. Change `Compartment` with a value that has the format of `devops-compartment-helidon-demo-<4 char random value>`.
189
189
3. Under `Filters`, change `Log Group` to `app-log-group-helidon-demo`.
190
190
4. Choose and click on `app-log-helidon-demo` from the Logs table.
191
-
5. Choose `Filter by time` value within the scope of your last request. For example, you can choose `Today` to see all request that was made today.
192
-
6. The `Explore Log` display should output some graphs of the logging activity and below it will also show a list of the logs that has been captured.
191
+
5. Choose `Filter by time` value within the scope of your last request. For example, you can choose `Today` to see all requests that were made today.
192
+
6. The `Explore Log` display should output graphs of the logging activity. Below the graphs, it will also show a list of the logs that have been captured.
193
193
194
194
### Cleanup
195
195
When the environment is no longer needed, all the OCI resources can be cleaned up by following these steps:
0 commit comments