Skip to content

Commit ba1bb08

Browse files
authored
Final updates for WS# 11070 based on recent feedback (#95)
Updating main wtih latest upstream changes (#2) * Merging QA updates into main (#1) * WS 11070 Adding workshops folder * WS 11070 Adding Labs 0 * WS 11070 Adding Lab 2 * WS 11070 Adding Labs 3 and 4 * WS 11070 Adding Lab 6 * WS 11070 Adding Lab 5 (1/2) * WS 11070 Adding Lab 5 (2/2) * WS 11070 Adding Lab 1 (1/2) * WS 11070 Adding Lab 1 (2/2) * Renamed directory oci-freetier to ocw-freetier * Added create group instructions * Update texts for self QA * Updated markdowns for self QA * Adding fix to issue found * Cleaned markdown files with correct indentation + Moved Tasks around based on feedback * Reviewed updated docs with feedback * Added fix from recommendation
1 parent bf14962 commit ba1bb08

File tree

9 files changed

+598
-518
lines changed

9 files changed

+598
-518
lines changed

db-operator-with-cicd/0-intro/intro.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ With the growing Kubernetes adoption, customers, engineers, and DevOps teams hav
77
The Oracle DB operator for Kubernetes allows users (DBAs, Developers, DevOps, GitOps teams, etc.) **to manage database lifecycles and dynamically do database operations such as provision, clone, and more directly through Kubernetes**. The Oracle DB operator for Kubernetes makes the Oracle Database more accessible through Kubernetes allowing users to focus more on their applications and less on the infrastructure. It also eliminates the dependency on a human operator or administrator for such operations. This lab showcases one example of what you can do with the Oracle DB Operator for Kubernetes (OraOperator) with DevOps.
88

99
This workshop will provide the users the knowledge in installing, using, and deploying an Autonomous Database (ADB) with the OraOperator. In the following labs, the users will integrate with Jenkins and provision environments which will consist of an OraOperator-provisioned Single-Instance database (SIDB) whenever they create a branch.
10+
1011
Estimated Workshop Time: 90 minutes
1112

1213
### About Product/Technology
-40 KB
Binary file not shown.
259 KB
Loading

db-operator-with-cicd/1-setup/setup.md

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If your group already has the permissions listed in part 6 of this task you may
6060
Allow group <group_name> to manage all-resources in tenancy
6161
</copy>
6262
```
63-
If you named your groupName labgroup similar to the image above, you can use the following policies instead.
63+
If you named your group `labgroup` similar to the image above, you can use the following policies instead.
6464
6565
```
6666
<copy>
@@ -78,39 +78,48 @@ Cloud Shell is a small virtual machine running a "bash" shell that you access th
7878
7979
1. Click the Cloud Shell icon in the top-right corner of the Console.
8080
81-
![Oracle Cloud Infrastructure Cloud Shell Opening](images/where-cloud-shell.png " ")
81+
![Oracle Cloud Infrastructure Cloud Shell Opening](images/where-cloud-shell.png " ")
8282
83-
> **Note:** Cloud Shell uses WebSockets to communicate between your browser and the service. If your browser has WebSockets disabled or uses a corporate proxy that has WebSockets disabled you will see an error message ("An unexpected error occurred") when attempting to start Cloud Shell from the console. You also can change the browser cookies settings for a specific site to allow the traffic from *.oracle.com
83+
> **Note:** Cloud Shell uses WebSockets to communicate between your browser and the service. If your browser has WebSockets disabled or uses a corporate proxy that has WebSockets disabled you will see an error message ("An unexpected error occurred") when attempting to start Cloud Shell from the console. You also can change the browser cookies settings for a specific site to allow the traffic from *.oracle.com
8484
8585
8686
## Task 3: Fork and clone the Lab Repository
8787
88-
Open a browser and navigate to the Lab Repository Available **[here](https://github.com/oracle/oci-react-samples.git)**. You can also find the link below if you would like to copy-paste the link instead on your browser:
89-
```bash
90-
<copy>
91-
https://github.com/oracle/oci-react-samples.git
92-
</copy>
93-
```
88+
1. Fork the Lab Repository
9489
95-
![Navigate to Lab](./images/navigate-to-lab-repository.png)
90+
Open a browser and navigate to the Lab Repository Available **[here](https://github.com/oracle/oci-react-samples.git)**. You can also find the link below if you would like to copy-paste the link instead on your browser:
9691
97-
Since the lab will require you to make changes to the code, you will need to have a fork of the lab. To fork the lab repository:
98-
1. Click on the Fork button at the top right.
99-
2. Select your account as the owner and keep the repository name the same.
100-
3. Deselect `Copy the main branch only` (as the lab-related files exist only in another branch)
101-
4. Finally, click on `Create fork`
92+
```bash
93+
<copy>
94+
https://github.com/oracle/oci-react-samples.git
95+
</copy>
96+
```
97+
98+
![Navigate to Lab](./images/navigate-to-lab-repository.png)
99+
100+
Since the lab will require you to make changes to the code, you will need to have a fork of the lab. To fork the lab repository:
101+
102+
1. Click on the Fork button at the top right.
103+
2. Select your account as the owner and keep the repository name the same.
104+
3. Deselect `Copy the main branch only` (as the lab-related files exist only in another branch)
105+
4. Finally, click on `Create fork`
102106
103107
![Fork Repository](./images/fork-repository.png)
104108
105-
With a working fork of the lab repository under your account, clone the forked repository by running the below command. Remember to specify the flags `--single-branch --branch cloudbank` as shown below. With the flags, the command will only pull the files related to the lab:
106-
```bash
107-
<copy>
108-
git clone --single-branch --branch cloudbank https://github.com/<username>/oci-react-samples
109-
</copy>
110-
```
111-
> **Note:** Replace `<username>` above with your GitHub username. Your GitHub username will be located at the top right after clicking on your user icon.
112109
113-
![Locate GitHub Username](./images/github-un-where.png)
110+
2. Clone the fork
111+
112+
With a working fork of the lab repository under your account, clone the forked repository by running the below command. It is important to specify the flags `--single-branch --branch cloudbank` as shown below. With the flags, the command will only pull the files related to the lab:
113+
114+
```bash
115+
<copy>
116+
git clone --single-branch --branch cloudbank <repository-web-url>
117+
</copy>
118+
```
119+
> **Note:** Replace `<repository-web-url>` above with your fork's web URL. The image below shows where to copy the web URL from. Keep this URL in your notes.
120+
121+
![Retrieve GitHub Web URL](./images/retrieve-github-web-url.png)
122+
114123
115124
## Task 4: Prepare for Terraform Provisioning
116125
This part of the setup process will require the following information to provision resources. Retrieve the information and keep these in your notes (with exception of the Jenkins Password) for Task 4, which will prompt you for these values. Click on the drop downs below for more information on how to retrieve these from the OCI Console:
@@ -119,9 +128,9 @@ This part of the setup process will require the following information to provisi
119128
120129
1. __API Key__ - used to authorize provisioning of Database resources with
121130
122-
## How to Create an API Key
123-
124-
By creating an API Signing Key, OCI will provide you with a configuration file that contains some of the required information you will need to provide in the following prompts. To start, navigate to your OCI Console.
131+
## How to create an API key
132+
133+
By creating an API Signing Key, OCI will provide you with a configuration file that contains some of the required information you will need to provide in the following prompts. To start, navigate to your OCI Console.
125134
126135
On the top-right, go to `User Settings` and create an API Key Resource.
127136
@@ -142,38 +151,39 @@ This part of the setup process will require the following information to provisi
142151
key_file=<path to your private keyfile> # TODO
143152
```
144153
145-
## How to Retrieve an API Key's Configuration
154+
## How to retrieve an API Key's configuration
146155
147156
> **Note:** Each user can have a maximum of three API signing keys. If you are planning to reuse a previous API Key, please make sure you have the corresponding keys used in generating the API Key.
148157
149158
If you already have three or opt to reuse your API Keys. Open the options menu on the right side (3 dots) for a specific API Key and select `View Configuration file`. This option will show the same output as above listing your `User OCID, Tenancy OCID, Region Identifier` and `Fingerprint`
150159
151160
![View API Key Configuration](./images/api-key-view-config.png)
152161
153-
1. __Compartment OCID__ - Oracle Cloud ID for the compartment to provision lab-related resources in
154-
155-
## How to Retrieve the Compartment OCID
156-
You may choose to use an existing compartment or create a new one.
162+
2. __Compartment OCID__ - Oracle Cloud ID for the compartment to provision lab-related resources in
157163
158-
Navigate to Compartments on your OCI Console.
164+
## How to retrieve a pre-existing compartment's OCID
165+
166+
You may choose to use an existing compartment or create a new one. Navigate to Compartments on your OCI Console.
159167
160168
![Navigate to Compartments](./images/navigate-to-compartments.png)
161169
162-
To use an existing compartment, click on the OCID of the compartment you want to use and click copy.
170+
Click on the OCID of the compartment you want to use and click copy.
163171
164172
![Copy Compartments OCID](./images/copy-compartment-ocid.png)
165173
166-
To create a new compartment instead, click on the Create Compartment button (emphasized above with dashes) and add the name and description. You will also have to place the compartment either under another compartment of your choice or the Parent Compartment. Click on Create Compartment to finalize the creation of the compartment.
174+
## How to create a new compartment
175+
176+
To create a new compartment instead, click on the `Create Compartment` button (emphasized above with dashes) and add the name and description. You will also have to place the compartment either under another compartment of your choice or the Parent Compartment. Click on Create Compartment to finalize the creation of the compartment.
167177
168178
![Create Compartment](./images/create-compartment.png)
169179
170-
Once created, simply find the name of your lab from the list and copy the OCID shown in the 2nd image above.
180+
Once created, find the name of your lab from the list and copy the OCID. You can find the instructions in the previous dropdown.
171181
172182
5. __Jenkins Password__ - Enter a password
173183
174184
6. __Database Password__ - Enter a password (see below requirements)
175185
176-
> **Note:** The Autonomous Database sets minimum standards for passwords, and the default profile sets parameters to limit the number of failed login attempts.
186+
The Autonomous Database sets minimum standards for passwords, and the default profile sets parameters to limit the number of failed login attempts.
177187
178188
* The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
179189
* The password cannot contain the username.
@@ -190,14 +200,16 @@ This part of the setup process will require the following information to provisi
190200
## Task 5: Run Setup for Terraform Provisioning
191201
Execute the following sequence of commands to start the setup.
192202
193-
1. First, source the `source.env` file to register common lab-related environment variables;
203+
1. First, source the `source.env` file to register common lab-related environment variables:
204+
194205
```bash
195206
<copy>
196207
source ./oci-react-samples/cloudbank/source.env
197208
</copy>
198209
```
199210
200211
2. Run the setup script to initiate the setup process.
212+
201213
```bash
202214
<copy>
203215
./oci-react-samples/cloudbank/scripts/setup.sh
@@ -210,6 +222,7 @@ Execute the following sequence of commands to start the setup.
210222
```
211223
212224
Terraform will then run in the background and produce the following output on Cloud Shell:
225+
213226
```bash
214227
Terraforming Resources on OCI...STARTED
215228
Preparing terraform...DONE
@@ -223,7 +236,8 @@ Once setup completes, you will need to run and setup the following manually for
223236
224237
This private key will be used to create a secret to authorize the DB operator for Kubernetes to do DB operations on your own OCI Tenancy.
225238
226-
## How to upload the Private Key
239+
## How to upload the Private Key
240+
227241
To upload the Privey Key file, click on the Gear icon on the right of the screen when Cloud Shell is opened.
228242
229243
![Upload File to Bash](./images/upload-key.png)
@@ -234,13 +248,18 @@ Once setup completes, you will need to run and setup the following manually for
234248
235249
![Upload File to Bash](./images/select-and-upload.png)
236250
237-
The Cloud Shell upload functionality will place the private key inside the root directory. You can then run the following:
251+
The Cloud Shell upload functionality will place the private key inside the root directory.
252+
253+
2. Move the private key to the workshop directory by running the following:
254+
238255
```bash
239256
<copy>
240257
(cd ~ ; mv <private_key_filename> $CB_STATE_DIR/private.pem && chmod 400 $CB_STATE_DIR/private.pem)
241258
</copy>
242-
```bash
259+
```
260+
243261
or, if you renamed the private key file to `private.pem`, you can run the below command instead.
262+
244263
```bash
245264
<copy>
246265
(cd ~ ; mv private.pem $CB_STATE_DIR/private.pem && chmod 400 $CB_STATE_DIR/private.pem)
@@ -249,12 +268,12 @@ Once setup completes, you will need to run and setup the following manually for
249268
250269
Replace `<private_key_filename>` above with the name of the private key file.
251270
252-
2. Create or Provide a previous __Auth Token__
271+
3. Create or Provide a previous __Auth Token__
253272
254273
255274
Auth tokens are used to authenticate when logging on to your tenancy's container registry. This is required for pushing the lab's Cloudbank container images. If you are opting to reuse an auth token, do note that this information is only available upon creation.
256275
257-
## How to create an Auth Token
276+
## How to create an Auth Token
258277
259278
To create an Auth Token, navigate again to __User Settings__ on the top right of the OCI Console. From the user details page, under Auth Tokens, generate a new token.
260279
@@ -290,6 +309,7 @@ To setup your kubeconfig:
290309
![Navigate to OKE](./images/navigate-to-cloudbank.png)
291310
292311
3. Click on [Access Cluster]
312+
293313
4. Copy the `oci ce cluster create-kubeconfig` command
294314
295315
![Navigate to OKE](./images/access-cluster.png)

0 commit comments

Comments
 (0)