Skip to content

Commit 38d82a9

Browse files
gotsysdbaandytael
andauthored
Ol8 onprem doc (#803)
* update docs for on-prem install --------- Co-authored-by: Andy Tael <andy.tael@yahoo.com>
1 parent 7279cd3 commit 38d82a9

File tree

1 file changed

+81
-51
lines changed
  • docs-source/spring/content/on-premises/ol8

1 file changed

+81
-51
lines changed

docs-source/spring/content/on-premises/ol8/_index.md

Lines changed: 81 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,89 +6,116 @@ This is an description of installing on a Oracle Linux 8 desktop.
66

77
Read the [On-Premises](../../on-premises) documentation and ensure that your desktop meets the minimum system requirements.
88

9-
## Install
9+
## Setup
1010

11-
### Additional Operating System Packages
11+
### Create a Non-Root User
1212

13-
Install additional operating system packages by executing these commands:
13+
Create a new user. While any user name can be created, the rest of this documentation refers to the non-root user as `obaas`:
14+
15+
As `root`, process the following:
1416

1517
```bash
16-
dnf -y module install container-tools:ol8
17-
dnf -y install conntrack podman curl
18-
dnf -y install oracle-database-preinstall-21c
19-
dnf -y install langpacks-en
20-
dnf module install -y python39
21-
dnf -y update
18+
useradd obaas
2219
```
2320

24-
Set the default Python3 to Python 3.9 by running this command:
21+
### Download Oracle Backend for Spring Boot and Microservices
22+
23+
Download [Oracle Backend for Spring Boot](https://github.com/oracle/microservices-datadriven/releases/download/OBAAS-1.0.1/onprem-ebaas_latest.zip) and unzip into a new directory.
24+
25+
As the `obaas` user, run this command:
2526

2627
```bash
27-
sudo alternatives --set python3 /usr/bin/python3.9
28+
unzip onprem-ebaas_latest.zip -d ~/obaas
2829
```
2930

30-
### Install Minikube
31+
### Setup SSH-Key Access for obaas user
3132

32-
As the `root` user, install Minikube:
33+
Future access to the `obaas` user requires a direct login (not `sudo` or `su`). To setup ssh-key access as `obaas`, run the following commands:
3334

3435
```bash
35-
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
36-
install minikube-linux-amd64 /usr/local/bin/minikube
36+
mkdir ~/.ssh
37+
vi ~/.ssh/authorized_keys
3738
```
3839

39-
### Create a Non-Root User
40+
Paste the public key of your client machines into the `~/.ssh/authorized_keys` file, and change the permissions as follows:
4041

41-
Create a new user. While any user name can be created, the rest of this documentation refers to the non-root user as `obaas`:
42+
```bash
43+
chmod 700 .ssh
44+
chmod 600 .ssh/authorized_keys
45+
```
4246

43-
As `root`, process the following:
47+
### Update the operating system
48+
49+
Assuming the source was unzipped to `~obaas/obaas`, as the `root` user, update the operating system by running the `ol8_onprem.sh` script from the unzipped package:
4450

4551
```bash
46-
useradd obaas
47-
echo "obaas ALL=(ALL) NOPASSWD: /bin/podman" >> /etc/sudoers
52+
~obaas/obaas/ol8_onprem.sh
4853
```
4954

55+
This script performs the following actions:
56+
57+
* Install required operating system Packages
58+
* Install Minikube
59+
* Set Python3 as the default python
60+
* Enable cgroup v2
61+
* Enable IP Tables
62+
* Update the container runtime configuration
63+
64+
### (Optional) OCI Host Filesystem
65+
66+
If this is being installed on an OCI Compute instance, grow the filesystem:
67+
68+
As `root`:
69+
70+
```bash
71+
/usr/libexec/oci-growfs
72+
```
73+
74+
### Reboot
75+
76+
**IMPORTANT** After the operating system has been updated, `reboot` the host.
77+
78+
## Install
79+
80+
The remaining steps require **direct login** as the `obaas` user without using `sudo` or `su`.
81+
5082
### Download the Database or Oracle REST Data Services (ORDS) Images
5183

52-
The _Desktop_ installation provisions an Oracle database into the Kubernetes cluster. The images must be downloaded
53-
from [Oracle Cloud Infrastructure Registry (Container Registry)](https://container-registry.oracle.com/) before continuing.
54-
As the `obaas` user, process these steps:
84+
The _Desktop_ installation provisions an Oracle database into the Kubernetes cluster. The images must be downloaded from [Oracle Cloud Infrastructure Registry (Container Registry)](https://container-registry.oracle.com/) before continuing.
85+
86+
While directly logged into the `obaas` user, process these steps:
5587

5688
1. Log in to the Container Registry. For example:
5789

5890
`podman login container-registry.oracle.com`
5991

60-
2. Pull the database image. For example:
92+
1. Pull the database image. For example:
6193

6294
`podman pull container-registry.oracle.com/database/enterprise:19.3.0.0`
6395

64-
3. Pull the ORDS image. For example:
96+
1. Pull the ORDS image. For example:
6597

6698
`podman pull container-registry.oracle.com/database/ords:21.4.2-gh`
6799

100+
#### Troubleshooting
101+
102+
If the `podman pull` command fails, navigate in a web browser to [Oracle container registry](https://container-registry.oracle.com), click the "database" tile and select "enterprise". On the right hand side of the page, if prompted, sign-in. Select "Language" and accept the Terms. Try the `podman pull` command again.
103+
68104
### Start MiniKube
69105

70-
As the `obaas` user, run these commands:
106+
While directly logged into the `obaas` user, run these commands:
71107

72108
```bash
73-
echo "PATH=\$PATH:/usr/sbin" >> ~/.bashrc
109+
minikube config set rootless true
74110
minikube config set driver podman
75-
minikube start --cpus max --memory 7900mb --disk-size='40g' --container-runtime=cri-o
111+
minikube start --cpus max --memory 16G --disk-size='40g' --container-runtime=containerd
76112
minikube addons enable ingress
77-
```
78-
79-
### Download Oracle Backend for Spring Boot and Microservices
80-
81-
Download [Oracle Backend for Spring Boot](https://github.com/oracle/microservices-datadriven/releases/download/OBAAS-1.0.0/onprem-ebaas_latest.zip) and unzip into a new directory.
82-
83-
As the `obaas` user, run these commands:
84-
85-
```bash
86-
unzip onprem-ebaas_latest.zip -d ~/obaas
113+
echo "KUBECONFIG=~/.kube/config" >> ~/.bashrc
87114
```
88115

89116
### Install Ansible
90117

91-
As the `obaas` user, change to the source directory and install Ansible by running these commands:
118+
While directly logged into the `obaas` user, change to the source directory and install Ansible by running these commands:
92119

93120
```bash
94121
cd ~/obaas
@@ -110,14 +137,12 @@ Assuming the source was unzipped to `~/obaas`, run the following command as the
110137

111138
### Open a Tunnel
112139

113-
In order to push the images to the Container Registry in the Kubernetes cluster, open a new terminal and process this command
114-
as the `obaas` user:
115-
116-
As the `obaas` user, run these commands:
140+
In order to push the images to the Container Registry in the Kubernetes cluster, open a new terminal and process this command while being directly logged into the `obaas` user:
117141

118142
```bash
143+
cd ~/obaas
119144
source ./activate.env
120-
kubectl port-forward service/private -n container-registry 5000:5000 &`
145+
kubectl port-forward service/private -n container-registry 5000:5000 > /dev/null 2>&1 &
121146
```
122147

123148
### Build the Images
@@ -126,31 +151,36 @@ Build and push the images to the Container Registry in the Kubernetes cluster.
126151

127152
Assuming the source was unzipped to `~/obaas`, run the following command as the `obaas` user:
128153

129-
`ansible-playbook ~/obaas/ansible/images_build.yaml`
154+
```bash
155+
cd ~/obaas
156+
source ./activate.env
157+
ansible-playbook ~/obaas/ansible/images_build.yaml
158+
```
130159

131160
After the images are built and pushed, the port-forward is no longer required and can be stopped.
132161

133162
### Deploy Microservices
134163

135164
Assuming the source was unzipped to `~/obaas`, run this command as the `obaas` user:
136165

137-
`ansible-playbook ~/obaas/ansible/k8s_apply.yaml -t full`
166+
```bash
167+
cd ~/obaas
168+
source ./activate.env
169+
ansible-playbook ~/obaas/ansible/k8s_apply.yaml -t full
170+
```
138171

139172
## Notes
140173

141174
### config-server and obaas-admin Pod Failures
142175

143-
The Pods in the `config-server` and `obaas-admin` namespaces rely on the database that is created in
144-
the `oracle-database-operator-system`. During the initial provisioning, these Pods start well before the database is available
145-
resulting in initial failures. They resolve themselves once the database becomes available.
176+
The Pods in the `azn-server`, `config-server`, and `obaas-admin` namespaces rely on the database that is created in the `oracle-database-operator-system`. During the initial provisioning, these Pods start well before the database is available resulting in initial failures. They resolve themselves once the database becomes available.
146177

147178
You can check on the status of the database by running this command:
148179

149180
`kubectl get singleinstancedatabase baas -n oracle-database-operator-system -o "jsonpath={.status.status}"`
150181

151182
### VPN and Proxies
152183

153-
If you are behind a Virtual Private Network (VPN) or proxy, see https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/ for more
154-
details on additional tasks.
184+
If you are behind a Virtual Private Network (VPN) or proxy, see [Minikube Proxies and VPNs](https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/) for more details on additional tasks.
155185

156186
Next, go to the [Getting Started](../getting-started/) page to learn more.

0 commit comments

Comments
 (0)