Skip to content

Commit 0da6469

Browse files
committed
Version 2.3.0
- New Feature #25: You can now specify a list of instance parameters which will get set when a database is getting created. See docs/CREATE_DB.md - Fixed #26: Autostart scripts dbstart and dbshut will now get deployed with the correctl permission - New Feature #27: Pythia will now configure SELinux according to the parameter set by selinux_desired_state (default permissive) - Fixed #32: The shell script that is getting executed when su to the oracle OS user now shows the correct version in any case
1 parent 61222df commit 0da6469

22 files changed

+243
-70
lines changed

.github/workflows/ansible_lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Ansible Lint # feel free to pick your own name
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
48

59
jobs:
610
build:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/roles/pythia/vars/rdbms_dict.yml
55
/roles/pythia/vars/rpm_dict.yml
66
/roles/pythia/vars/sid_directories.yml
7+
/roles/pythia/vars/sid_parameters.yml
78
/roles/pythia/templates/18EE_Database.rsp.j2
89
/roles/pythia/templates/18SE2_Database.rsp.j2
910
/roles/pythia/templates/19EE_Database.rsp.j2

Changelog.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
Changelog of Pythia:
22

3+
Version 2.3.0
4+
- New Feature #25: You can now specify a list of instance parameters which will get set
5+
when a database is getting created. See docs/CREATE_DB.md
6+
- Fixed #26: Autostart scripts dbstart and dbshut will now get deployed with the correctl
7+
permission
8+
- New Feature #27: Pythia will now configure SELinux according to the parameter set by
9+
selinux_desired_state (default permissive)
10+
- Fixed #32: The shell script that is getting executed when su to the oracle OS user
11+
now shows the correct version in any case
12+
313
Version 2.2.5
4-
- New Feature #19: Automatic linting is now done using Github Actions. Fixed many (really many) linting errors and refactored lots of code
14+
- New Feature #19: Automatic linting is now done using Github Actions. Fixed many (really many)
15+
linting errors and refactored lots of code
516
- New Feature #20: Added Molecule test scenarios in Pythia
617
- New Feature #21: You can now specify additional runInstaller parameters by using the runinstaller_parameters variable
718
- Fixed #23: Pythia now uses dynamic generated variable role_path when working with templates and files.

INSTALL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ General
77
You will need to provide several Files to ensure, that Pythia will work correctly. All Files you need to create are listed in this Instruction. These files can and should be changed by you, to fulfill your needs for installing and maintaining an Oracle Database. You may want to adapt all Variables or Templates to meet your or your companies requirements. Hence you want to change the Folder Structure to fulfill your needs.
88
For every File that needs to exist, there is an *EXAMPLE* file in the respective directory. If you want to, you can copy the *EXAMPLE* file (and remove the EXAMPLE from the filename) and Pythia will work. This is not the recommended way however.
99

10+
Stage Directory
11+
===============
12+
13+
Some tasks of Pythia relate on a so called "local stage directory". In this directory, Pythia searches for the software archives of the Oracle Database. The location of the stage directory is controlled by the variable `local_stage_directory` under `vars/main.yml`. You have to be aware, that Pythia searches for this directory on the Ansible Controlhost. By default, the location is `/mnt/oracle_stage`. You still can control the specific location of a software archive in the `rdbms_dict.yml` and `patch_dict.yml`. But the location can only be underneath the `local_stage_directory`.
14+
1015
Variables
1116
===============
1217

@@ -82,6 +87,22 @@ All other Variables in here are referenced in the respective Responsefile for th
8287
- archive_dest: Specifies the Location of the Archived Redo Logs. This Variable is referenced in the DBCA Templates (*_Database.rsp.j2)
8388
- audit_dest: Specifies the Location of the Audit Files. This Variable is referenced in the DBCA Templates (*_Database.rsp.j2)
8489

90+
sid_parameters.yml
91+
---------------
92+
There is no need to adapt the `dbca` template if you want to get an additional parameter included during DB creation. For this, you can use the `sid_parameters.yml` under the `vars` folder. There is an *sid_parameters_EXAMPLE.yml* file which shows you an example content. It is not mandatory, that this file exists, it will only get included, when it's existing and only when using the `db` TAG. In the `sid_parameters.yml` you can specify a dictionary of parameters you want to specify per SID. For instance, if you plan to adjust the parameters `filesystemio_options` and `fast_start_mttr_target` when a database `ORA21` is getting created, your `sid_parameters.yml` should look like this.
93+
94+
```
95+
sid_parameters:
96+
ORA21:
97+
parameters:
98+
FILESYSTEMIO_OPTIONS: setall
99+
FAST_START_MTTR_TARGET: 150
100+
```
101+
102+
You are able to specify parameters for multiple instances in one file.
103+
104+
> :warning: Defining the same parameters multiple times with conflicting values will lead to unknown behavior during the DB creation. Please check the dbca templates under the templates directory to understand, which parameters are set there.
105+
85106
Templates
86107
===============
87108

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Requirements
3434

3535
Pythia requires you to run Ansible 2.9 or higher. The Oracle Software you want to install / configure by Pythia has to be located on a "Staging Area" mounted on the Control Server. Keep in Mind, that you need to licence Oracle Software separately!
3636

37+
The following collections / modules are needed (limited on some TAGs). Pythia will automatically download needed collections:
38+
39+
| Collection / Module | TAGs |
40+
|---------------------|----------------------|
41+
| ansible.posix | `db`, `rdbms`, `autostart` |
42+
3743
Installation and Configuration
3844
------------------------------
3945

@@ -92,7 +98,7 @@ Example: Install additional Software named "DEMO" on the target system (defined
9298
- ansible-playbook /etc/ansible/pythia/pythia.yml -e "HOSTS=ansibletest" --tags "rpm" -e "install_rpm=DEMO" -k -K -u <username>
9399

94100
Example: Install Oracle RDBMS with Version 19c and Enterprise Edition on Host "ansibletest", install the 19.5 RU (Patch ID: 30125133). Build a Database named "ORA19" on top, which will use Hugepages and a SGA Size of 16GB:
95-
Attention! Configuring Hugepages will most likely lead to a system reboot. Therefore the reboot_ack switch has to be set when calling the playbook.
101+
Attention! Configuring Hugepages will most likely lead to a system reboot. Therefore the `reboot_ack` switch has to be set when calling the playbook.
96102

97103
- ansible-playbook /etc/ansible/pythia/pythia.yml -e "HOSTS=ansibletest" --tags "rdbms, db, patch, hugepage" -e "oracle_sid=ORA19 oracle_version=19EE install_patch=30125133 reboot_ack=true sga_max_size=16" -k -K -u <username>
98104

docs/02_INSTALL_RDBMS.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ During the Prerequisite Check that Pythia does everytime you let her go, the acc
1616

1717
| Variable Name | Description | Default Value |
1818
|---------------|--------------------------|---------------|
19-
|oracle_version |The Version of the RDBMS and Database you want to deploy or change.<br>The Version String has to be existant within the RDBMS Dictionary (`rdbms_dict.yml` under vars folder)|`19EE`|
19+
|oracle_version |The Version of the RDBMS and Database you want to deploy or change.<br>The Version String has to be existant within the RDBMS Dictionary<br>(`rdbms_dict.yml` under vars folder)|`19EE`|
2020

2121
Please also check the `vars/rdbms_dict.yml` and set the following Variables as you need. DON'T specify them in your Playbook Call.
2222

@@ -36,7 +36,15 @@ Please also check the `vars/rdbms_dict.yml` and set the following Variables as y
3636

3737
| Variable Name | Description | Default Value |
3838
|---------------|--------------------------|---------------|
39-
|runinstaller_parameters|Additional runinstaller parameters during installation<br>of Oracle software. For example `-ignoreInternalDriverError`.|`NONE`|
39+
|runinstaller_parameters|Additional runinstaller parameters during installation of Oracle software. For example<br>`-ignoreInternalDriverError`.|`NONE`|
40+
|selinux_desired_state|There are some known problems with SELinux set to enforcing and Oracle Databases.<br>`selinux_desired_state` controls the state which SELinux should get set by Pythia.<br> Can be set to `permissive`, `enforcing` and `disabled`. Eventually a reboot is required<br>when altering the state. You may need to set the reboot_ack parameter when calling<br>the playbook.|`permissive`|
41+
42+
<br>
43+
44+
> :warning: SELinux can be tricky. We recommend to use the default setting (`permissive`). If your system is set to `enforcing`, a reboot will be required. Pythia will do the reboot for you, but you need to also acknowledge the reboot by the `reboot_ack=true` flag in the playbook call (see `hugepage` TAG in the [README.md](https://github.com/thedatabaseme/pythia/blob/master/README.md))
45+
46+
<br>
47+
4048
## Examples
4149

4250
Example: Install Oracle RDBMS with Version 18c as Standard Edition 2 on Host "ansibletest":

docs/03_CREATE_DB.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We highly recommend, to also specify the `hugepage` TAG when creating a Database
88
During the Prerequisite Check that Pythia does everytime you let her go, the according Prerequisites will be implemented. When specifying the `db` TAG, the following will be done during the prerequisite phase.
99

1010
- Check and set all needed Kernel Parameter (Shared Memory Configuration and also Hugepages if you specified the TAG `hugepage`)
11-
- Restarts the System to disable Transparent Hugepages (when `hugepage` TAG is specified and you acknowledged the Reboot)
11+
- Restarts the System to disable Transparent Hugepages (when `hugepage` TAG is specified and you acknowledged the Reboot (`reboot_ack=true`))
1212
- Set the Security Limits (`ulimit`) of the System
1313
- Setup an Environment Script for the Oracle OS User which will be executed when you `su` to the Oracle User
1414

@@ -22,6 +22,22 @@ During the Prerequisite Check that Pythia does everytime you let her go, the acc
2222
|oracle_version |The Version of the RDBMS and Database you want to deploy or change.<br>The Version String has to be existant within the RDBMS Dictionary (`rdbms_dict.yml` under vars folder)|`19EE`|
2323
|oracle_sid|The SID of the Oracle Database you want to install. Only needed when starting <br>the playbook with the `db` tag, for creating a Database|`NONE`|
2424

25+
### Optional SID parameters
26+
You can specify a list of database parameters that should get set during dbca DB creation by specifying them with the according SID name in a `sid_parameters.yml` (see *sid_parameters_EXAMPLE.yml*).
27+
For instance, if you plan to adjust the parameters `filesystemio_options` and `fast_start_mttr_target` when a database `ORA21` is getting created, your `sid_parameters.yml` should look like this.
28+
29+
```
30+
sid_parameters:
31+
ORA21:
32+
parameters:
33+
FILESYSTEMIO_OPTIONS: setall
34+
FAST_START_MTTR_TARGET: 150
35+
```
36+
37+
You are able to specify parameters for multiple instances in one file.
38+
39+
> :warning: Defining the same parameters multiple times with conflicting values will lead to unknown behavior during the DB creation. Please check the dbca templates under the templates directory to understand, which parameters are set there.
40+
2541
### Optional Variables
2642

2743

@@ -40,6 +56,13 @@ During the Prerequisite Check that Pythia does everytime you let her go, the acc
4056
|listener_logging|Specifies if a created listener will be configured to log or not. Can be either `OFF` or `ON`.|`OFF`|
4157
|emexpress|Specifies if the EM Express should be installed / configured when creating a Database. <br>There are two valid values for this Variable: `DBEXPRESS` and `NONE`|`DBEXPRESS`|
4258
|autoextend|Specifies if the created Datafiles should be autoextensible or not|`FALSE`|
59+
|selinux_desired_state|There are some known problems with SELinux set to enforcing and Oracle Databases.<br>`selinux_desired_state` controls the state which SELinux should get set by Pythia.<br> Can be set to `permissive`, `enforcing` and `disabled`. Eventually a reboot is required<br>when altering the state. You may need to set the reboot_ack parameter when calling<br>the playbook.|`permissive`|
60+
61+
<br>
62+
63+
> :warning: SELinux can be tricky. We recommend to use the default setting (`permissive`). If your system is set to `enforcing`, a reboot will be required. Pythia will do the reboot for you, but you need to also acknowledge the reboot by the `reboot_ack=true` flag in the playbook call (see `hugepage` TAG in the [README.md](https://github.com/thedatabaseme/pythia/blob/master/README.md))
64+
65+
<br>
4366

4467
## Examples
4568

roles/pythia/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ Requirements
3333

3434
Pythia requires you to run Ansible 2.9 or higher. The Oracle Software you want to install / configure by Pythia has to be located on a "Staging Area" mounted on the Control Server. Keep in Mind, that you need to licence Oracle Software separately!
3535

36+
The following collections / modules are needed (limited on some TAGs). Pythia will automatically download needed collections:
37+
38+
| Collection / Module | TAGs |
39+
|---------------------|----------------------|
40+
| ansible.posix | `db`, `rdbms`, `autostart` |
41+
3642
Role Variables
3743
--------------
3844

@@ -50,6 +56,7 @@ main.yml Variables (can be set when calling the playbook, see Examples):
5056
- client_version (Default 19CLNT): The Version of the Oracle Client you want to deploy. The Version String has to be existant within the Client Dictionary (client_dict.yml under vars folder)
5157
- oracle_sid (Default NULL): The SID of the Oracle Database you want to install. Only needed when starting the playbook with the "db" tag, for creating a Database.
5258
- runinstaller_parameters (Default NULL): Additional runinstaller parameters during installation of Oracle software. For example "-ignoreInternalDriverError"
59+
- selinux_desired_state (Default permissive): There are some known problems with SELinux set to enforcing and Oracle Databases. selinux_desired_state controls the state which SELinux should get set by Pythia. Can be set to permissive, enforcing and disabled. Most likely a reboot is required when altering the state. You may need to set the reboot_ack parameter when calling the playbook.
5360
- oracle_pdb_name (Default NULL): Name of the Plugable Database you want to get created during Database creation. Needs to be set in order to get it created.
5461
- space_needed_gb: Space approximately in GB for installing the RDBMS. Respects, that there is probably a Patch installed on top. OVERLOADS rdbms_dict.yml space_needed_gb. SHOULD NOT BE SPECIFIED WITHIN HERE. SHOULD BE SPECIFIED AS EXTRA VARIABLE IN PLAYBOOK CALL.
5562
- nls_length_semantics (Default BYTE): Oracle Parameter NLS_LENGTH_SEMANTICS, can be BYTE or CHAR. When set, it will be placed in the Database creation Response Files

roles/pythia/defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
# (client_dict.yml under vars folder)
1414
# - runinstaller_parameters (Default NULL): Additional runinstaller parameters during installation
1515
# of Oracle software. For example " -ignoreInternalDriverError".
16+
# - selinux_desired_state (Default permissive): There are some known problems with SELinux set
17+
# to enforcing and Oracle Databases. selinux_desired_state controls the state which SELinux
18+
# should get set by Pythia. Can be set to permissive, enforcing and disabled. Most likely a
19+
# reboot is required when altering the state. You may need to set the reboot_ack parameter
20+
# when calling the playbook.
1621
# - oracle_sid (Default NULL): The SID of the Oracle Database you want to install. Only
1722
# needed when starting the playbook with the "db" tag, for creating a Database.
1823
# - oracle_pdb_name (Default NULL): Name of the Plugable Database you want to get created
@@ -143,6 +148,7 @@ sysctl_stable: true
143148
client_version: 19CLNT
144149
client_install_type: "Administrator"
145150
runinstaller_parameter: ""
151+
selinux_desired_state: "permissive"
146152

147153
# Control Variables for Upgrade
148154
oracle_source_version: 18EE

roles/pythia/requirements.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
3+
collections:
4+
- name: ansible.posix

0 commit comments

Comments
 (0)