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
2. Add the following file to `/tmp` on the controlmachine
26
+
-`LINUX.X64_180000_db_home.zip`
27
+
28
+
3. Create an Ansible inventory file
29
+
```
30
+
[myhostgroup]
31
+
dbhost
32
+
```
8
33
9
-
</b>
34
+
4. Run the playbook:
10
35
11
-
At the moment you can install Oracle RAC, RAC One Node and normal single instances.
12
-
You can take a freshly installed machine and configure it from ground up. It'll configure users, profiles, kernel parameters, storage and install the database server and create one or more databases.
13
-
It also supports role separation when installing Grid Infrastructure, meaning a 'grid' user owns and runs the GI and the 'oracle' user owns and runs the databases.
By default, you can install a single instance 12.1.0.2 database on filesystem, without having to change any parameters. Just put the following files in /tmp on the control-machine:
16
-
- linuxamd64_12102_database_1of2.zip
17
-
- linuxamd64_12102_database_2of2.zip
38
+
where the `-i` part is optional
18
39
19
-
I'm creating a bunch of examples which illustrates how to use/run the different roles. They can be found here: http://oravirt.wordpress.com/category/ansible-oracle.
20
40
21
-
As this is based on the EL6 platform the lowest supported Oracle version will be 11.2.0.3, as per Oracle's certification matrix.
41
+
### Roles
22
42
23
-
<b>Note: </b>
24
-
- You'll need to manually download the Oracle software and make it available to the control-machine (either locally or on a web-server, or through a nfs-share) before running the playbook. By default the
25
-
path to the software is /tmp on the control-machine.
26
-
- All roles are built on Oracle Linux 6, but should work with any EL6-based system.
27
-
- Storage options only supports block devices at the moment (FS & ASM). Will add support for NFS
43
+
A lot of these roles uses Ansible modules that comes from [ansible-oracle-modules](https://github.com/oravirt/ansible-oracle-modules)
28
44
29
-
<b>The different roles are:</b>
45
+
**common**
30
46
31
-
<b> common: </b>
32
47
This will configure stuff common to all machines
33
-
- Install some generic packages
34
-
- Configure ntp
35
-
- Possibly add a default/deploy user.
48
+
- Install some generic packages
49
+
- Configure ntp
50
+
51
+
52
+
**orahost**
36
53
37
-
<b>orahost:</b>
38
54
This will configure the host specific Oracle stuff:
39
55
- Add a user & group
40
56
- Create directory structures
41
-
- Generate ssh-keys and set up passwordless ssh between clusternodes in case of RAC/RAC One node
42
57
- Handle filesystem storage (partition devices, creates vg/lv and a filesystem (ext4, xfs, btrfs) etc). If you want to create your database on a filesystem (instead of ASM) this is where you define the layout.
43
58
- Install required packages
44
59
- Change kernel paramemeters
@@ -47,66 +62,151 @@ This will configure the host specific Oracle stuff:
47
62
- Disables transparent hugepages
48
63
- Disables NUMA (if needed)
49
64
- Configures the interconnect network (if needed)
50
-
- Configures Oracle ASMLib
65
+
- Configures Oracle ASMLib
66
+
67
+
68
+
**orahost-ssh**
69
+
70
+
Configures passwordless ssh between clusternodes if setting up RAC (`configure_cluster=True`)
71
+
- Uses existing ssh-keys
72
+
73
+
74
+
**orahost-storage**
51
75
52
-
<b>orahost-storage:</b>
53
76
This role configures storage that shoud be used by ASM.
54
77
- Partitions devices (using parted)
55
78
- Create ASMlib labels or sets up udev-rules for device name persistence
56
79
57
-
<b>oraswgi-install:</b>
58
-
This role will install and configure Oracle Grid Infrastructure. Tested with 12.1.0.1/12.1.0.2 & 11.2.0.4/11.2.0.3
80
+
81
+
**oraswgi-install**
82
+
83
+
This role will install and configure Oracle Grid Infrastructure (RAC/SI)
59
84
- Adds a .profile_grid to the oracle user
60
85
- Sets up directory structures
61
86
- Copies the install-files to the servers, or installs from a remote location (e.g nfs share)
62
87
- Install Oracle Grid Infrastructure
63
88
64
89
65
90
66
-
<b>oraasm-configureasm:</b>
67
-
This role will create and configure the ASM-instance with an initial diskgroup.
91
+
**oraasm-manage-diskgroups**
68
92
69
-
- Generates a shellscript that uses asmca to create the ASM instance
93
+
This role will statefully manage the lifecycle of an ASM diskgroup
94
+
- Uses the **oracle_asmdg** module
95
+
- Create/delete diskgroup.
96
+
- Add/remove disks
97
+
- Manage attributes for the DG
70
98
71
-
<b>oraasm-createdg:</b>
72
-
This role will create the diskgroup(s) that should be used for database storage. Uses asmca to create diskgroups.
73
-
- Generates a shellscript that uses asmca to create the diskgroups.
99
+
**oraswdb-install**
74
100
75
-
<b>oraswdb-install:</b>
76
101
This role will install the oracle database server(s). It is possible to run more than 1 database from each home. It performs both Single Instance/RAC installations.
77
-
- Creates a .profile_databasename
102
+
- Creates a .profile with the correct environment
78
103
- Creates directory structures
79
-
- Transfers installfiles to server(s)
80
104
- Installs the database-server(s)
81
105
82
-
<b>oradb-create:</b>
83
-
This role creates the databases (RAC/RAC One Node, Single Instance). Possible to create container databases. Performs a dbca silent run to create the database.
84
-
Note:
85
-
At the moment there is no listener configured when creating a database on a filesystem (i.e no grid infrastructure present). Will be added later though.
86
-
- Generates a responsefile to be used by dbca
87
-
- Creates the db using dbca
88
-
- Changes parameters based on input.
106
+
107
+
**oradb-manage-db**
108
+
109
+
This role statefully manages the lifecycle of a database
110
+
- Uses the **oracle_db** module
111
+
- Creates/deletes: `state: present/absent`
112
+
- Maintains archivelog/force_logging True/False
113
+
114
+
**oraswgi-manage-patches**
115
+
116
+
Manage patches in a GI environment
117
+
- Uses the **oracle_opatch** module
118
+
- Manages opatchauto type of patches as well as 'normal' one-offs
119
+
120
+
**oraswdb-manage-patches**
121
+
122
+
Statefully manage patches in a DB environment
123
+
- Uses the **oracle_opatch** module
124
+
- Manages opatchauto type of patches as well as 'normal' one-offs
125
+
126
+
127
+
**cxoracle**
128
+
129
+
Installs cx_Oracle in preparation for using [ansible-oracle-modules](https://github.com/oravirt/ansible-oracle-modules)
130
+
131
+
132
+
**orahost-cron**
133
+
134
+
Configures cron schedules if needed
135
+
136
+
137
+
**orahost-logrotate**
138
+
139
+
140
+
**oradb-manage-<*>**
141
+
142
+
Statefully manages various aspects of the DB. They all use modules from [ansible-oracle-modules](https://github.com/oravirt/ansible-oracle-modules)
This role will use opatch to apply a patch to a Grid Infrastructure home. At the moment it is basically written to apply PSU's, not one-off patches. It'll probably work but it is not designed for that.
93
-
Does an initial check to see if the patches are already applied, and skips through all steps if they are.
167
+
### Note
94
168
169
+
These are the Oracle binaries that are pre-configured to be used. They have to be manually downloaded and made available (either locally, from a web endpoint or through a nfs-share)
95
170
96
-
<b>*** THE FOLLOWING ROLES ARE NOT FINISHED/NOT WORKING PROPERLY YET ****</b>
171
+
For 18.3.0.0:
172
+
```
173
+
LINUX.X64_180000_db_home.zip
174
+
LINUX.X64_180000_grid_home.zip
175
+
```
97
176
98
-
<b>oraswgi-clone:</b>
99
-
This role will use a previously installed/patched Grid Infrastructure installation to perform a new Grid Infrastructure installation using the clone method
100
177
101
-
<b>oraswracdb-clone:</b>
102
-
This role will take a previously installed/patched Oracle Database Server installation to perform a new database server installation using the clone method.
0 commit comments