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
Version 2.1.0
- New Feature #1: Added documentation / instructions under docs/*.md for the most common tasks you can do with Pythia
- New Feature #13: Implemented Export / Import mechanism over Datapump Network_link
- Fixed Issue #7: Updated README(s) and added Features to the list
- Fixed Issue #11: All not needed Variables are moved from vars/main.yml to defaults/main.yml. Making them better overwriteable
Version 2.0.1
- Fixed Issue #9: Tempfiles will now be dropped / deleted, when Target DB already exists and you specify to override the Target DB
Copy file name to clipboardExpand all lines: README.md
+31-18Lines changed: 31 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,14 @@ Pythia is a Role for ansible that helps you to automate the following tasks when
3
3
4
4
- Install Oracle RDBMS (Starting with Version 18) on a target system
5
5
- Create a Database on top of a new or an existing RDBMS
6
+
- Adjust all needed Kernel Parameters to run an Oracle Database
7
+
- Creates OS Users and Groups implicitly
6
8
- Install Patches on top of a new and existing RDBMS and or Database
7
9
- Runs SQL Scripts against a specified Oracle Database
8
10
- Upgrade a Oracle DB to a new Version
11
+
- Duplicate a Database with RMAN "duplicate from active database"
12
+
- Datapump Export / Import over NETWORK_LINK
13
+
- Install Oracle Client
9
14
10
15
Thereby several Prerequisites are fullfilled and or checked. E.G.
11
16
@@ -34,10 +39,10 @@ Installation and Configuration
34
39
35
40
1. Clone the Repository to your Ansible Controlserver: git clone https://github.com/theoracleme/pythia.git
36
41
2. Setup a Fileshare, that includes the Oracle Software you want to install and mount it to the Ansible Controlserver.
37
-
3. Configure the Fileshare as "Staging Area" by changing the "local_stage_directory" variable in the vars/main.yml
38
-
4. Configure all Variables fitting your environment. A description for all Variables can be found in the Roles README.md or the vars/main.yml File.
39
-
5. Configure the vars/rdbms_dict.yml, vars/patch_dict.yml and vars/sid_directories.yml to suite your needs. A description for all Variables can be found in the Dictionary File or the README.md.
40
-
Further Informations about what to change, can also be found in the INSTALL.md
42
+
3. Configure the Fileshare as "Staging Area" by changing the "local_stage_directory" variable in the `vars/main.yml`
43
+
4. Configure all Variables fitting your environment. A description for all Variables can be found in the Roles README.md or the `vars/main.yml` File.
44
+
5. Configure the `vars/rdbms_dict.yml`, `vars/patch_dict.yml` and `vars/sid_directories.yml` to suite your needs. A description for all Variables can be found in the Dictionary File or the README.md.
45
+
Further Informations about what to change, can also be found in the [INSTALL.md](https://github.com/thedatabaseme/pythia/blob/master/INSTALL.md)
41
46
6. Define your Hosts or Hostgroups in the Ansible Host Inventory. (e.G. hosts)
42
47
7. Place User-Defined SQL Scripts under the files/default directory of the Role.
43
48
@@ -49,21 +54,22 @@ Example Playbook Runs
49
54
**More detailed Examples and instructions can be found under the docs folder**
50
55
51
56
Pythia works with tags to combine the actions of installation, configuration, patching and so on. The following Tags are defined:
52
-
- rdbms: Specifies, that you want a RDBMS installed. When tagging rdbms, you also may want to specify the Variable oracle_version when starting the playbook with "rdbms" tag.
53
-
- db: Specifies, that you want to install a Database on top a new RDBMS (when specifying "rdbms" as a tag alongside with the "db" tag) or an already installed RDBMS on the target system. You may also want to specify the Variable oracle_version when starting the playbook with the "db" tag. You need to specify the oracle_sid Variable when calling the playbook for naming the new Database.
54
-
- patch: Specifies, that you want to install a Patch on top of a new RDBMS (when specifying "rdbms" as a tag alongside with the "patch" tag) or an already installed RDBMS. When specifying the "patch" tag, you need to also specify the "install_patch" Variable when running the playbook. While running under the "patch" tag, the Patch Archive will be uncompressed to the target system. The Patch Files will be deleted after successfully installing the Patch.
55
-
- patchonly: Like "patch" tag but implies, that the Patch Archive already exists on the target system. No cleanup will be done after the Patch Installation.
57
+
- rdbms: Specifies, that you want a RDBMS installed. When tagging rdbms, you also may want to specify the Variable oracle_version when starting the playbook with `rdbms` TAG.
58
+
- db: Specifies, that you want to install a Database on top a new RDBMS (when specifying `rdbms` as a TAG alongside with the `db` TAG) or an already installed RDBMS on the target system. You may also want to specify the Variable oracle_version when starting the playbook with the `db` TAG. You need to specify the `oracle_sid` Variable when calling the playbook for naming the new Database.
59
+
- patch: Specifies, that you want to install a Patch on top of a new RDBMS (when specifying `rdbms` as a TAG alongside with the `patch` TAG) or an already installed RDBMS. When specifying the `patch` TAG, you need to also specify the `install_patch` Variable when running the playbook. While running under the `patch` TAG, the Patch Archive will be uncompressed to the target system. The Patch Files will be deleted after successfully installing the Patch.
60
+
- patchonly: Like `patch` TAG but implies, that the Patch Archive already exists on the target system. No cleanup will be done after the Patch Installation.
56
61
- cleanup: Forces a cleanup after sucessfull Patch Installation. Also forces that the created backup Files under the RDBMS that are created by OPatch when patching are deleted. Handle with caution if you may want to rollback the Patch.
57
-
- listener: Only creates a listener for the Specified Database with the oracle_sid Variable.
58
-
- sqlscript: Triggers, that SQL Scripts (.sql) under files/default (or specified by local_sql_stage_directory) directory will be executed against the specified oracle_sid. Be aware, the Scripts will be executed without any precheck. Bad SQL can cause immense harm.
59
-
- rpm: Triggers that additional RPMs have to be installed. When specifying "rpm" tag, you need also to specify the "install_rpm" Variable when running the playbook. The RPM will be transfered to the target system. After installing the RPM, the file will be removed.
60
-
- autostart: Controls that the automatic startup of the Database you specified will be implemented. When specifying the autostart tag, you also must specify the oracle_sid Variable when calling the Playbook.
61
-
- hugepage: Triggers, that Hugepages have to be configured. Can only be triggered when also tagging db. Hugepages will be calculated by given sga_max_size (Default 2G)
62
-
- converttohugepage: Converts a non Hugepage configured System to use Hugepages. Disables transparent_hugepages. Needs sga_max_size Variable set to the absolute Size (in GB) of all SGA's on the System
63
-
- prepare: Prepares the Target System for an upcomming Oracle Installation. Can be combined with the hugepage Tag and needs sga_max_size (Default 2G) specified to calculate Shared Memory and Hugepages
64
-
- client: Specifies, that you want to install an Oracle Client. When tagging client, you also may to want to specify the Variable client_version when starting the playbook with "client" tag.
65
-
- duplicate: Specifies, that you want to duplicate a Source Database to a Target Database. Uses RMAN duplicate from active Database. You need to specify the duplicate_source_host, duplicate_target_host, duplicate_source_sid and duplicate_target_sid Variable. As HOSTS you need to specify the Target Host.
66
-
- upgrade: Specifies that you want to upgrade a Database to a new Version. You need to specify the Variables oracle_source_version, oracle_target_version, oracle_sid and upgrade_mode when starting the Playbook with the "upgrade" tag.
62
+
- listener: Only creates a listener for the Specified Database with the `oracle_sid` Variable.
63
+
- sqlscript: Triggers, that SQL Scripts (.sql) under `files/default` (or specified by `local_sql_stage_directory`) directory will be executed against the specified `oracle_sid`. Be aware, the Scripts will be executed without any precheck. Bad SQL can cause immense harm.
64
+
- rpm: Triggers that additional RPMs have to be installed. When specifying `rpm` TAG, you need also to specify the `install_rpm` Variable when running the playbook. The RPM will be transfered to the target system. After installing the RPM, the file will be removed.
65
+
- autostart: Controls that the automatic startup of the Database you specified will be implemented. When specifying the autostart TAG, you also must specify the `oracle_sid` Variable when calling the Playbook.
66
+
- hugepage: Triggers, that Hugepages have to be configured. Can only be triggered when also tagging `db`. Hugepages will be calculated by given `sga_max_size` (Default 2G)
67
+
- converttohugepage: Converts a non Hugepage configured System to use Hugepages. Disables transparent_hugepages. Needs `sga_max_size` Variable set to the absolute Size (in GB) of all SGA's on the System
68
+
- prepare: Prepares the Target System for an upcomming Oracle Installation. Can be combined with the `hugepage` TAG and needs `sga_max_size` (Default 2G) specified to calculate Shared Memory and Hugepages
69
+
- client: Specifies, that you want to install an Oracle Client. When tagging `client`, you also may to want to specify the Variable `client_version` when starting the playbook with `client` TAG.
70
+
- duplicate: Specifies, that you want to duplicate a Source Database to a Target Database. Uses RMAN duplicate from active Database. You need to specify the `duplicate_source_host`, `duplicate_target_host`, `duplicate_source_sid` and `duplicate_target_sid` Variable. As HOSTS you need to specify the Target Host.
71
+
- upgrade: Specifies that you want to upgrade a Database to a new Version. You need to specify the Variables `oracle_source_version`, `oracle_target_version`, `oracle_sid` and `upgrade_mode` when starting the Playbook with the `upgrade` TAG.
72
+
- datapump: Specifies, that you want to do an Datapump Export / Import over NETWORK_LINK. You need to specify the `datapump_source_host`, `datapump_target_host`, `datapump_source_sid` and `datapump_target_sid` Variable. As HOSTS you need to specify the Target Host.
67
73
68
74
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:
69
75
@@ -107,3 +113,10 @@ Also you're able to specify, that the SPFILE of your maybe existing Target Datab
107
113
Example: Upgrade an Oracle Database in Version 18 to Oracle Database in Version 19 on Host "ansibletest":
Example: Do a Datapump Export / Import over NETWORK_LINK. Source Database named EXPSRC to a Database named EXPDST on the host "vmdbsoradatapumptarget". As HOST, the Target Host must be specified:
118
+
Attention!: The Passwords for the Source and Target Database is needed for the datapump process. The Password has to be provided within the vault.yml (using ansible-vault) as vault_datapump_<SOURCESID> and vault_datapump_<TARGETSID>
Copy file name to clipboardExpand all lines: docs/01_GENERAL.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,36 @@
1
1
# General Informations
2
-
In this section, you can find some more in detail examples using Pythia. For instance, how to do a duplicate with Pythia.
2
+
In this section, you can find some more in detail examples using Pythia.
3
+
4
+
5
+
## TAGs
6
+
7
+
Pythia is based on working with (Ansible) TAGs. When creating the command to run Pythia, you have to hand over at least one of the Tags (also listed in the [README.md](https://github.com/thedatabaseme/pythia/blob/master/roles/pythia/README.md)). You can mostly combine the TAGs as you like. So for instance, you may combine the TAGs rdbms, db and patch, to get an RDBMS installed, a Database on top of this and of course, you want to have it patched. All in one command.
8
+
9
+
- rdbms: Specifies, that you want a RDBMS installed. When tagging rdbms, you also may want to specify the Variable oracle_version when starting the playbook with "rdbms" tag.
10
+
- db: Specifies, that you want to install a Database on top a new RDBMS (when specifying "rdbms" as a tag alongside with the "db" tag) or an already installed RDBMS on the target system. You may also want to specify the Variable oracle_version when starting the playbook with the "db" tag. You need to specify the oracle_sid Variable when calling the playbook for naming the new Database.
11
+
- patch: Specifies, that you want to install a Patch on top of a new RDBMS (when specifying "rdbms" as a tag alongside with the "patch" tag) or an already installed RDBMS. When specifying the "patch" tag, you need to also specify the "install_patch" Variable when running the playbook. While running under the "patch" tag, the Patch Archive will be uncompressed to the target system. The Patch Files will be deleted after successfully installing the Patch.
12
+
- patchonly: Like "patch" tag but implies, that the Patch Archive already exists on the target system. No cleanup will be done after the Patch Installation.
13
+
- cleanup: Forces a cleanup after sucessfull Patch Installation. Also forces that the created backup Files under the RDBMS that are created by OPatch when patching are deleted. Handle with caution if you may want to rollback the Patch.
14
+
- listener: Only creates a listener for the Specified Database with the oracle_sid Variable.
15
+
- sqlscript: Triggers, that SQL Scripts (.sql) under files/default (or specified by local_sql_stage_directory) directory will be executed against the specified oracle_sid. Be aware, the Scripts will be executed without any precheck. Bad SQL can cause immense harm.
16
+
- rpm: Triggers that additional RPMs have to be installed. When specifying "rpm" tag, you need also to specify the "install_rpm" Variable when running the playbook. The RPM will be transfered to the target system. After installing the RPM, the file will be removed.
17
+
- autostart: Controls that the automatic startup of the Database you specified will be implemented. When specifying the autostart tag, you also must specify the oracle_sid Variable when calling the Playbook.
18
+
- hugepage: Triggers, that Hugepages have to be configured. Can only be triggered when also tagging db. Hugepages will be calculated by given sga_max_size (Default 2G)
19
+
- converttohugepage: Converts a non Hugepage configured System to use Hugepages. Disables transparent_hugepages. Needs sga_max_size Variable set to the absolute Size (in GB) of all SGA's on the System
20
+
- prepare: Prepares the Target System for an upcomming Oracle Installation. Can be combined with the hugepage Tag and needs sga_max_size (Default 2G) specified to calculate Shared Memory and Hugepages
21
+
- client: Specifies, that you want to install an Oracle Client. When tagging client, you also may to want to specify the Variable client_version when starting the playbook with "client" tag.
22
+
- duplicate: Specifies, that you want to duplicate a Source Database to a Target Database. Uses RMAN duplicate from active Database. You need to specify the duplicate_source_host, duplicate_target_host, duplicate_source_sid and duplicate_target_sid Variable. As HOSTS you need to specify the Target Host.
23
+
- upgrade: Specifies that you want to upgrade a Database to a new Version. You need to specify the Variables oracle_source_version, oracle_target_version, oracle_sid and upgrade_mode when starting the Playbook with the "upgrade" tag.
24
+
25
+
26
+
## Extra Variables
27
+
28
+
Beside from specifying a TAG, you need to provide at least these Variable (regardless of which TAG you have specified). You may specify the HOSTS Variable directly in the Playbook, as an Extra Variable or in your Inventory. In these Instructions, we will always hand them over as Extra Variables.
29
+
30
+
- HOSTS: Within this Variable, you provide a list of Hosts, you want to get Pythia to do her magic work for you.
31
+
32
+
33
+
## Workflow
3
34
4
35
Pythia works in the following order. This is important to know, which steps will be done in which order.
5
36
@@ -58,4 +89,13 @@ Pythia works in the following order. This is important to know, which steps will
58
89
| |
59
90
| Duplicate DB |
60
91
| |
61
-
+----------------+
92
+
+----------------+
93
+
94
+
95
+
## Further Documentation
96
+
97
+
We try to provide a detailed documentation for each usecase of Pythia. Please have a look into these:
98
+
99
+
-[Install an Oracle Database RDBMS](https://github.com/thedatabaseme/pythia/blob/master/docs/02_INSTALL_RDBMS.md)
100
+
-[Create a Database](https://github.com/thedatabaseme/pythia/blob/master/docs/03_CREATE_DB.md)
101
+
-[Install Patches and Updates](https://github.com/thedatabaseme/pythia/blob/master/docs/04_INSTALL_PATCH.md)
0 commit comments