Skip to content

Commit e674532

Browse files
fixes to free-trial provisioning (#963)
* fixes to free-trial provisioining
1 parent 767d7a2 commit e674532

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

docs-source/cloudbank/content/provision/install-free-trial.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You can also use this approach in any regular commercial Oracle Cloud Tenancy -
121121

122122
1. Configure access to the instance from your local machine
123123

124-
* On your local machine, open a browser and find your public IPv4 address using a serivce like [ShowMyIP](https://www.showmyip.com/).
124+
* On your local machine, open a browser and find your public IPv4 address using a service like [ShowMyIP](https://www.showmyip.com/).
125125

126126
* In the OCI Console, when viewing your compute instance, click on the link for the subnet in the **Prinary VNIC** section.
127127

@@ -148,3 +148,71 @@ You can also use this approach in any regular commercial Oracle Cloud Tenancy -
148148
* The Spring Operations Center main dashboard will appear similar to this:
149149
150150
![Spring Operations Center](../images/install-free-tier-5.png " ")
151+
152+
1. DB Access & setup
153+
154+
* Connect to your instance (using SSH), find the database pod with the following command: `kubectl get pods --all-namespaces`.
155+
156+
In the `oracle-database-operator-system` namespace, look for a pods like `free-XXXX`.
157+
158+
* Access to DB instance with the following command: `kubectl exec -it -n oracle-database-operator-system free-XXXX -- /bin/sh`
159+
160+
* Login as sysdba to create the user `account` that will be used in Module 3:
161+
162+
```sql
163+
sqlplus / as sysdba
164+
ALTER SESSION SET CONTAINER = freepdb1;
165+
CREATE TABLESPACE users DATAFILE '/opt/oracle/oradata/FREE/FREEPDB1/users.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE 500M;
166+
CREATE USER account IDENTIFIED BY Welcome1234## DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
167+
```
168+
169+
This step replaces the steps from 1 to 4 in the task [**Account Microservices/Prepare Database Objects**](../../content/account/prepare-database.md).
170+
In the step 5 of [Prepare Database Objects](../../content/account/prepare-database.md), skip the command: `create user account identified by "Welcome1234##";` and execute all the rest, since the user account has been already created.
171+
172+
If you need to access the db from an ssh connection, these are the commands to get `username` and `password`:
173+
174+
```bash
175+
#to get <UID>:
176+
kubectl -n application get secret baas-db-secrets -o jsonpath='{.data.db\.password}' | base64 -d
177+
#to get <PWD>:
178+
kubectl -n application get secret baas-db-secrets -o jsonpath='{.data.db\.username}' | base64 -d
179+
#for pl/sql:
180+
kubectl exec -n oracle-database-operator-system free-<XXXX> -ti -- sqlplus <UDI>/<PWD>@localhost:1521/freepdb1
181+
```
182+
183+
1. Kubernetes access from own desktop
184+
185+
* On the compute node (logged in using SSH), execute the following command:
186+
187+
```sh
188+
kubectl config view --minify --context=default --flatten > /home/ubuntu/context-config.yaml
189+
```
190+
191+
* download the YAML configuration file on your desktop in <YOUR_DIR>, using `scp` with the reference to <YOUR_PRIVATE_KEY.key>:
192+
193+
```sh
194+
scp -i <YOUR_PRIVATE_KEY.key> ubuntu@<VM_IP>:/home/ubuntu/context-config.yaml <YOUR_DIR>/context-config.yaml
195+
```
196+
197+
* In the `context-config.yaml` locate the `server` entry:
198+
199+
```yaml
200+
...
201+
- cluster:
202+
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJlRENDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGM...
203+
server: https://127.0.0.1:6443
204+
name: default
205+
...
206+
```
207+
208+
and change with <YOUR_DIR>.
209+
210+
* Add an **Add Ingress Rules** in the VCN security list belonging with your VM for the `6443` port, to allow the `kubectl` connection from your desktop.
211+
212+
* On your desktop create an alias, to use the downloaded context to connect the remote Kubernetes, resolving the certificate issue:
213+
214+
```sh
215+
alias k='export KUBECONFIG=<YOUR_DIR>/context-config.yaml; kubectl --insecure-skip-tls-verify'
216+
```
217+
218+
In this way, any other `kubectl` commands in the rest of documentation can be executed as well, simply replacing `kubectl` with `k` if you are using the provisioning procedure shown so far.

0 commit comments

Comments
 (0)