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: db-operator-with-cicd/0-intro/intro.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ With the growing Kubernetes adoption, customers, engineers, and DevOps teams hav
7
7
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.
8
8
9
9
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.
> **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
84
84
85
85
86
86
## Task 3: Fork and clone the Lab Repository
87
87
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:

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:
96
91
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)

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`
102
106
103
107

104
108
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:
> **Note:** Replace `<username>` above with your GitHub username. Your GitHub username will be located at the top right after clicking on your user icon.
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:
> **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
+

122
+
114
123
115
124
## Task 4: Prepare for Terraform Provisioning
116
125
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
119
128
120
129
1. __API Key__ - used to authorize provisioning of Database resources with
121
130
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.
125
134
126
135
On the top-right, go to `User Settings` and create an API Key Resource.
127
136
@@ -142,38 +151,39 @@ This part of the setup process will require the following information to provisi
142
151
key_file=<path to your private keyfile> # TODO
143
152
```
144
153
145
-
## How to Retrieve an API Key's Configuration
154
+
## How to retrieve an API Key's configuration
146
155
147
156
> **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.
148
157
149
158
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`
150
159
151
160

152
161
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
157
163
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.
159
167
160
168

161
169
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.
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.
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.
171
181
172
182
5. __Jenkins Password__ - Enter a password
173
183
174
184
6. __Database Password__ - Enter a password (see below requirements)
175
185
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.
177
187
178
188
* 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.
179
189
* The password cannot contain the username.
@@ -190,14 +200,16 @@ This part of the setup process will require the following information to provisi
190
200
## Task 5: Run Setup for Terraform Provisioning
191
201
Execute the following sequence of commands to start the setup.
192
202
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
+
194
205
```bash
195
206
<copy>
196
207
source ./oci-react-samples/cloudbank/source.env
197
208
</copy>
198
209
```
199
210
200
211
2. Run the setup script to initiate the setup process.
212
+
201
213
```bash
202
214
<copy>
203
215
./oci-react-samples/cloudbank/scripts/setup.sh
@@ -210,6 +222,7 @@ Execute the following sequence of commands to start the setup.
210
222
```
211
223
212
224
Terraform will then run in the background and produce the following output on Cloud Shell:
225
+
213
226
```bash
214
227
Terraforming Resources on OCI...STARTED
215
228
Preparing terraform...DONE
@@ -223,7 +236,8 @@ Once setup completes, you will need to run and setup the following manually for
223
236
224
237
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.
225
238
226
-
## How to upload the Private Key
239
+
## How to upload the Private Key
240
+
227
241
To upload the Privey Key file, click on the Gear icon on the right of the screen when Cloud Shell is opened.
228
242
229
243

@@ -234,13 +248,18 @@ Once setup completes, you will need to run and setup the following manually for
234
248
235
249

236
250
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:
@@ -249,12 +268,12 @@ Once setup completes, you will need to run and setup the following manually for
249
268
250
269
Replace `<private_key_filename>` above with the name of the private key file.
251
270
252
-
2. Create or Provide a previous __Auth Token__
271
+
3. Create or Provide a previous __Auth Token__
253
272
254
273
255
274
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.
256
275
257
-
## How to create an Auth Token
276
+
## How to create an Auth Token
258
277
259
278
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.
260
279
@@ -290,6 +309,7 @@ To setup your kubeconfig:
290
309

291
310
292
311
3. Click on [Access Cluster]
312
+
293
313
4. Copy the `oci ce cluster create-kubeconfig` command
0 commit comments