Skip to content

Commit

Permalink
WMS 11499: new version with fix to OCI Cloud Shell + Change of build.…
Browse files Browse the repository at this point in the history
…sh to starter.sh (#445)

* OpenSearch - ObjectStorage V1

* Opensearch v2

* v3

* V3

* Image Alternative Texts

* V2

* V2

* v4

* V4

* Update manifest.json

* additional step

* various fixes

* various fixes

* OCI Starter

* OpenSearch New version screen user/password

* Update visual_builder.md

* 2023-03-18

* 2023-03-18

* 2023-03-18

* 2023-03-21

* APIM

* APIM

* Update test.md

* Update test.md

* APIM

* APIM

* Update test.md

* APIM

* APIM

* APIM

* APIM

* APIM

* APIM

* APIM

* APIM

* APIM

* Formatting

* Formatting

* Numbering

* Update intro.md

* Lab 2 Task 2 indentation

* -

* 2023-06-05

* 2023-06-05

* 2023-06-05

* 2023-06-05

* 2023-06-05

* 2023-06-06

* 2023-06-06

* 2023-06-12

* 2023-06-12

* 2023-07-31

* 2023-08-01

* 2023-08-01

* Videos

* Video

* Update integration.md

* Update integration.md

* oci-starter-lab v1

* Update intro.md

* OCI-Starter V2

* push oci-portal

* OCI Starter Lab v1

* QA

* . files removed

* Removed beta remark.

* oci starter - formatting

* OCI-Starter

* oci-starter bullets

* Introduction tag

* Green Button (1rst version)

* LiveLabs Green Button

* Small title change

* Instance Pool Lab

* Instance Pool

* TLS

* ARM

* ARM

* TLS

* Database Actions

* Database Action v2

* oci-starter 3.2

---------

Co-authored-by: Kaylien Phan <kaylien.phan@oracle.com>
Co-authored-by: Anoosha Pilli <63126232+anooshapilli@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent fd68e07 commit 0ce5888
Show file tree
Hide file tree
Showing 13 changed files with 276 additions and 144 deletions.
2 changes: 1 addition & 1 deletion oci-starter-lab/advanced/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ There are 4 ways to have a TLS certificate:

* Author - Marc Gueury
* Contributors - Ewan Slater
* Last Updated - Nov, 2th 2023
* Last Updated - Jan, 20th 2025
58 changes: 36 additions & 22 deletions oci-starter-lab/compute/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,22 @@ Please read the chapter: Introduction and Get Started.
- Click *Open*
![Editor File Open](images/starter-compute-dir.png)
2. The main files are:
- Commands:
- build.sh : Build the whole program: Run Terraform, Configure the DB, Build the App, Build the UI
- destroy.sh : Destroy the objects created by Terraform
- env.sh : Contains the settings of your project
- Directories:
- src : Sources files
- app : Source of the Backend Application (Command: build_app.sh)
- ui : Source of the User Interface (Command: build_ui.sh)
- db : SQL files of the database
- terraform : Terraform scripts (Command: plan.sh / apply.sh)
- compute : Contains the deployment files to Compute
- bin : with some helper commands
- bin/ssh\_compute.sh (to ssh to the Compute)
- bin/ssh\_bastion.sh (to ssh to the Bastion)
| | | | Description |
| ----------- | ---------- | --------- | ---|
| Commands | | | |
| | starter.sh | | Build or destroy a project. Show a menu with commands if not argument is given |
| | env.sh | | Settings of your project |
| Directories | | | Commands used by starter.sh |
| | bin/ | | Commands used by starter.sh |
| | src/ | | Sources files |
| | | app | Backend Application (Command: build_app.sh) |
| | | ui | User Interface (Command: build_ui.sh) |
| | | db | Database initialisation files (SQL, ...) |
| | | terraform | Terraform scripts |
| | | compute | Deployment to Compute |
| | target/ | | Output directory |
3. Edit the env.sh file:
- Choose the env.sh file.
- Look for \_\_TO_FILL\_\_ in the file
Expand All @@ -79,7 +81,7 @@ Please read the chapter: Introduction and Get Started.
- If not, the script will create a "oci-starter" compartment
![Editor env.sh](images/starter-compute-env.png)
## Task 3: Build.sh
## Task 3: Starter.sh
During the build, Terraform will create:
- Network resources: VCN, Subnet
Expand All @@ -92,9 +94,11 @@ During the build, Terraform will create:
- then run:
```
<copy>
./build.sh
./starter.sh
</copy>
```
- Choose **Build**
![Result](images/starter-starter-build.png)
- It will build all and at the end you will see:
```
<copy>
Expand All @@ -119,13 +123,23 @@ Please also check the "Lab 6 - How to Customize" to see how to customize this s
### SSH
During the build, it has generated 2 files:
- id\_starter\_rsa : a ssh private key to login to the compute and bastion
- id\_starter\_rsa.pub : the public ssh private key installed in the compute and bastion
- ssh\_key\_starter : a ssh private key to login to the compute and bastion
- ssh\_key\_starter.pub : the public ssh private key installed in the compute and bastion
You can login to the compute by
- running:
```
<copy>
./starter.sh
</copy>
```
- Choose **Advanced**
- Then **SSH / Compute**
You can login to the compute by running:
It is identical to run this command:
```
<copy>
bin/ssh_compute.sh
./starter.sh ssh compute
</copy>
```
Expand All @@ -138,7 +152,7 @@ The interesting directories are:
1. To clean up, run
```
<copy>
./destroy.sh
./starter.sh destroy
</copy>
```
Expand All @@ -153,5 +167,5 @@ The interesting directories are:
* Author - Marc Gueury
* Contributors - Ewan Slater
* Last Updated - Nov, 2th 2023
* Last Updated - Jan, 20th 2025
54 changes: 28 additions & 26 deletions oci-starter-lab/compute/compute_green.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,30 @@ We will use to Advanced tab to work with the limits of the LiveLab sandbox. (Exi
- Click *Open*
![Editor File Open](images/starter-compute-dir.png)
2. The main files are:
- Commands:
- build.sh : Build the whole program: Run Terraform, Configure the DB, Build the App, Build the UI
- destroy.sh : Destroy the objects created by Terraform
- env.sh : Contains the settings of your project
- Directories:
- src : Sources files
- app : Source of the Backend Application (Command: build_app.sh)
- ui : Source of the User Interface (Command: build_ui.sh)
- db : SQL files of the database
- terraform : Terraform scripts (Command: plan.sh / apply.sh)
- compute : Contains the deployment files to Compute
- bin : with some helper commands
- bin/ssh\_compute.sh (to ssh to the Compute)
- bin/ssh\_bastion.sh (to ssh to the Bastion)
| | | | Description |
| ----------- | ---------- | --------- | ---|
| Commands | | | |
| | starter.sh | | Build or destroy a project. Show a menu with commands if not argument is given |
| | env.sh | | Settings of your project |
| Directories | | | Commands used by starter.sh |
| | bin/ | | Commands used by starter.sh |
| | src/ | | Sources files |
| | | app | Backend Application (Command: build_app.sh) |
| | | ui | User Interface (Command: build_ui.sh) |
| | | db | Database initialisation files (SQL, ...) |
| | | terraform | Terraform scripts |
| | | compute | Deployment to Compute |
| | target/ | | Output directory |
3. Check the env.sh file:
- Choose the env.sh file.
- Since we are in LiveLasbs installation, all the settings will be found automatically.
- TF_VAR\_compartment\_ocid, TF\_VAR\_vcn\_ocid / TF\_VAR\_public\_subnet\_ocid, TF\_VAR\_private\_subnet\_ocid will be found automatically.
- The database password, if not filled, will be randomly generated.
![Editor env.sh](images/starter-compute-env.png)
## Task 3: Build.sh
## Task 3: Starter.sh
During the build, Terraform will reuse the
- Network resources: VCN, Subnet
Expand All @@ -101,12 +103,12 @@ Then create:
1. In the code editor,
- in the menu *Terminal / New Terminal*.
- then run:
```
- run
<copy>
./build.sh
./starter.sh
</copy>
```
- choose Build
![Result](images/starter-starter-build.png)
- It will build all and at the end you will see:
```
<copy>
Expand All @@ -124,7 +126,7 @@ Then create:
## Task 4: More info
OCI Starter running in your own tenancy or not has a lot more options like Kubernetes or Container Instances.
This livelab is limited to Compute. If you use your own tenancy, there are a lot more options like Kubernetes or Container Instances.
You can also check how it works and how to customize what you built.
Expand All @@ -135,17 +137,17 @@ Please also check the "Lab 3 - How to Customize" to see how to customize this s
### SSH
During the build, it has generated 2 files:
- id\_starter\_rsa : a ssh private key to login to the compute and bastion
- id\_starter\_rsa.pub : the public ssh private key installed in the compute and bastion
- ssh\_key\_starter : a ssh private key to login to the compute and bastion
- ssh\_key\_starter.pub : the public ssh private key installed in the compute and bastion
You can login to the compute by running:
```
<copy>
bin/ssh_compute.sh
./starter.sh ssh compute
</copy>
```
The interesting directories are:
When you are on the compute, the interesting directories are:
- $HOME/app with the compiled application
- /usr/share/nginx/html/ with the HTML pages
Expand All @@ -154,7 +156,7 @@ The interesting directories are:
1. To clean up, run
```
<copy>
./destroy.sh
./starter.sh destroy
</copy>
```
Expand All @@ -169,5 +171,5 @@ The interesting directories are:
* Author - Marc Gueury
* Contributors - Ewan Slater
* Last Updated - Nov, 2th 2023
* Last Updated - Jan, 20th 2025
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 23 additions & 21 deletions oci-starter-lab/container_instance/container_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,22 @@ Please read the chapter: Introduction and Get Started.
- Click *Open*
![Editor File Open](images/starter-compute-dir.png)
2. The main files are:
#### Commands
- build.sh : Build the whole program: Run Terraform, Configure the DB, Build the App, Build the UI
- destroy.sh : Destroy the objects created by Terraform
- env.sh : Contains the settings of your project
#### Directories
- src : Sources files
- app : Source of the Backend Application (Command: build_app.sh)
- ui : Source of the User Interface (Command: build_ui.sh)
- db : SQL files of the database
- terraform : Terraform scripts (Command: plan.sh / apply.sh)
- compute : Contains the deployment files to Compute
- bin : with some helper commands
- bin/ssh\_compute.sh (to ssh to the Compute)
- bin/ssh\_bastion.sh (to ssh to the Bastion)
3. Edit the env.sh file:
| | | | Description |
| ----------- | ---------- | --------- | ---|
| Commands | | | |
| | starter.sh | | Build or destroy a project. Show a menu with commands if not argument is given |
| | env.sh | | Settings of your project |
| Directories | | | Commands used by starter.sh |
| | bin/ | | Commands used by starter.sh |
| | src/ | | Sources files |
| | | app | Backend Application (Command: build_app.sh) |
| | | ui | User Interface (Command: build_ui.sh) |
| | | db | Database initialisation files (SQL, ...) |
| | | terraform | Terraform scripts |
| | target/ | | Output directory |
3. (Optional) Edit the env.sh file:
- Choose the env.sh file.
- Look for \_\_TO_FILL\_\_ in the file
- You may leave it like this.
Expand All @@ -79,7 +80,7 @@ Please read the chapter: Introduction and Get Started.
- If not, the script will create a "oci-starter" compartment
![Editor env.sh](images/starter-kubernetes-env.png)
## Task 3: Build.sh
## Task 3: Starter.sh
During the build, Terraform will create:
- Network resources: VCN, Subnet
Expand All @@ -92,11 +93,12 @@ During the build, Terraform will create:
- then run:
```
<copy>
./build.sh
./starter.sh
</copy>
```
It will build all and at the end you will see:
- Choose **Build**
![Result](../compute/images/starter-starter-build.png)
- It will build all and at the end you will see:
```
<copy>
- User Interface : https://xxxx.apigateway.eu-xxxx.oci.customer-oci.com/starter/
Expand All @@ -122,7 +124,7 @@ Please also check the "Lab 6 - How to Customize" to see how to customize this s
1. To clean up, run
```
<copy>
./destroy.sh
./starter.sh destroy
</copy>
```
Expand All @@ -137,4 +139,4 @@ Please also check the "Lab 6 - How to Customize" to see how to customize this s
* Author - Marc Gueury
* Contributors - Ewan Slater
* Last Updated - Nov, 2th 2023
* Last Updated - Jan, 20th 2025
19 changes: 7 additions & 12 deletions oci-starter-lab/customize/customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Let's say that we deploy a Java / SpringBoot on a Compute with an Database.
unzip starter.zip
cd starter
cat README.md
# ./build.sh
# ./starter.sh build
</copy>
````
2. When you run the build.sh script, the program will:
2. When you run the **./starter.sh build** script, the program will:
1. Create resources (compute/database/....) with "Terraform" (src/terraform)
2. Create tables in the database (src/db)
3. Compile the "Backend Application (app)" (src/app)
Expand Down Expand Up @@ -58,15 +58,10 @@ In the next task, we will go inside each directory to see what it contains.
````
````
<copy>
apply.sh atp.tf bastion.tf compute.tf datasource.tf destroy.sh network.tf output.tf plan.sh terraform_local.tf variable.tf
atp.tf bastion.tf compute.tf datasource.tf network.tf output.tf terraform_local.tf variable.tf
</copy>
````
2. We see 2 type of files:
1. *.sh : scripts to run terraform (normal or resource manager):
- plan.sh: test the terraform resources to see if apply will work. But it does nothing.
- apply.sh: create the terraform resources
- destroy.sh: destroy the terrraform resources
2. *.tf : terraform files to create resources
2. We see *.tf files. They are terraform files to create resources
- compute.tf : create the compute
- atp.tf: create an autonomous database
- network.tf: create the network (VCN, subnets, security list)
Expand Down Expand Up @@ -123,7 +118,7 @@ In the next task, we will go inside each directory to see what it contains.
3. You may customize all these files to your needs. For example, to use your own SpringBoot Application.
- overwrite the pom.xml and src directory with your files.
- change the start.sh
- and rerun $STARTER_HOME/build.sh
- and rerun $STARTER_HOME/starter.sh build
## Task 5 - Check User Interface Directory: src/ui
Expand All @@ -148,10 +143,10 @@ In the next task, we will go inside each directory to see what it contains.
- directory ui: containing static HTML files
3. You may customize all these files to your needs. For example, to use your own HTML files
- overwrite the HTML files in the ui directory with your files.
- Then rerun $STARTER_HOME/build.sh to update the server
- Then rerun $STARTER_HOME/starter.sh build to update the server
## Acknowledgements
* Author - Marc Gueury
* Contributors - Ewan Slater
* Last Updated - Nov, 2th 2023
* Last Updated - Jan, 20th 2025
Loading

0 comments on commit 0ce5888

Please sign in to comment.