Skip to content

Commit f4b6439

Browse files
committed
Added support for Flex Clusters
1 parent e51c6df commit f4b6439

File tree

14 files changed

+198
-36
lines changed

14 files changed

+198
-36
lines changed

oradb-create/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
oracle_reco_dir_asm: "FRA" # If storage_type=ASM this is where the fast recovery area is placed
2222
configure_cluster: false
2323
oracle_install_option_gi: "none"
24+
oracle_gi_cluster_type: STANDARD
25+
hostgroup_hub: "{{ hostgroup }}-hub"
26+
hostgroup_leaf: "{{ hostgroup }}-leaf"
2427

2528

2629

oradb-create/templates/dbca-create-db.rsp.11.2.0.4.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,15 @@ SID = "{{ item.0.oracle_db_name }}"
178178
# Default value : None
179179
# Mandatory : No (Yes for RAC database-centric database )
180180
#-----------------------------------------------------------------------------
181-
NODELIST={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
181+
{% if configure_cluster==True %}
182+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
183+
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
184+
{% else %}
185+
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
186+
{% endif %}
187+
{% else %}
188+
{% endif %}
189+
182190

183191
#-----------------------------------------------------------------------------
184192
# Name : TEMPLATENAME

oradb-create/templates/dbca-create-db.rsp.12.1.0.1.j2

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,14 @@ PDBADMINPASSWORD = "{{ item.0.oracle_db_passwd }}"
253253
# Default value : None
254254
# Mandatory : No (Yes for RAC database-centric database )
255255
#-----------------------------------------------------------------------------
256-
NODELIST={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
256+
{% if configure_cluster==True %}
257+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
258+
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
259+
{% else %}
260+
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
261+
{% endif %}
262+
{% else %}
263+
{% endif %}
257264

258265
#-----------------------------------------------------------------------------
259266
# Name : TEMPLATENAME
@@ -628,7 +635,6 @@ INITPARAMS = "{{ item.0.oracle_init_params }}"
628635
# Default value : None
629636
# Mandatory : NO
630637
#-----------------------------------------------------------------------------
631-
632638
MEMORYPERCENTAGE = "{{ item.0.oracle_db_mem_percent }}"
633639

634640
#-----------------------------------------------------------------------------

oradb-create/templates/dbca-create-db.rsp.12.1.0.2.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,14 @@ PDBADMINPASSWORD = "{{ item.0.oracle_db_passwd }}"
253253
# Default value : None
254254
# Mandatory : No (Yes for RAC database-centric database )
255255
#-----------------------------------------------------------------------------
256-
NODELIST={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
256+
{% if configure_cluster==True %}
257+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
258+
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
259+
{% else %}
260+
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
261+
{% endif %}
262+
{% else %}
263+
{% endif %}
257264

258265
#-----------------------------------------------------------------------------
259266
# Name : TEMPLATENAME

orahost-storage/defaults/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
device_persistence: asmlib
44
oracle_asm_disk_string: "{% if device_persistence == 'asmlib' %}{% elif device_persistence == 'udev' %}/dev/oracle/{% else %}{% endif %}"
5+
oracle_stage: /u01/stage
6+
oracle_rsp_stage: "{{ oracle_stage }}/rsp"
7+
oracle_user: oracle
8+
grid_user: "{% if role_separation==true %}grid{% else %}oracle{% endif %}"
9+
oracle_group: oinstall
10+
asmdba_group: asmdba
11+
dba_group: dba
12+
13+
14+
515

616
# asm_diskgroups: # ASM Diskgroups used for DB-storage. Should map to dict asm_storage_layout.
717
# - crs

orahost/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- { group: kmdba, gid: 11008 }
1616

1717
oracle_users: # Passwd :Oracle123
18-
- { username: oracle, uid: 11000, primgroup: oinstall, othergroups: "dba,asmdba,backupdba,dgdba,kmdba,oper", passwd: "$6$0xHoAXXF$K75HKb64Hcb/CEcr3YEj2LGERi/U2moJgsCK.ztGxLsKoaXc4UBiNZPL0hlxB5ng6GL.gyipfQOOXplzcdgvD0" }
18+
- { username: oracle, uid: 11000, primgroup: oinstall, othergroups: "dba,asmadmin,asmdba,backupdba,dgdba,kmdba,oper", passwd: "$6$0xHoAXXF$K75HKb64Hcb/CEcr3YEj2LGERi/U2moJgsCK.ztGxLsKoaXc4UBiNZPL0hlxB5ng6GL.gyipfQOOXplzcdgvD0" }
1919
grid_users:
2020
- { username: grid, uid: 11001, primgroup: oinstall, othergroups: "asmadmin,asmdba,asmoper,dba", passwd: "$6$0xHoAXXF$K75HKb64Hcb/CEcr3YEj2LGERi/U2moJgsCK.ztGxLsKoaXc4UBiNZPL0hlxB5ng6GL.gyipfQOOXplzcdgvD0" }
2121

oraswdb-install/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
asmoper_group: asmoper
1313
asmdba_group: asmdba # Primary group for oracle_user.
1414
asmadmin_group: asmadmin # Primary group for oracle_user.
15+
16+
hostgroup:
17+
hostgroup_hub: "{{ hostgroup }}-hub"
18+
hostgroup_leaf: "{{ hostgroup }}-leaf"
1519

1620
install_from_nfs: false
1721
nfs_server_sw: nfsserver

oraswdb-install/templates/db-install.rsp.11.2.0.4.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,15 @@ oracle.install.db.OPER_GROUP={{ oracle_group }}
164164
# Specify the cluster node names selected during the installation.
165165
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
166166
#------------------------------------------------------------------------------
167-
oracle.install.db.CLUSTER_NODES={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
167+
{% if configure_cluster==True %}
168+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
169+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
170+
{% else %}
171+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
172+
{% endif %}
173+
{% else %}
174+
{% endif %}
175+
168176

169177
#------------------------------------------------------------------------------
170178
# This variable is used to enable or disable RAC One Node install.

oraswdb-install/templates/db-install.rsp.12.1.0.1.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,15 @@ oracle.install.db.rac.configurationType=ADMIN_MANAGED
168168
#
169169
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
170170
#------------------------------------------------------------------------------
171-
oracle.install.db.CLUSTER_NODES={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
171+
{% if configure_cluster==True %}
172+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
173+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
174+
{% else %}
175+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
176+
{% endif %}
177+
{% else %}
178+
{% endif %}
179+
172180

173181

174182
#------------------------------------------------------------------------------

oraswdb-install/templates/db-install.rsp.12.1.0.2.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ oracle.install.db.rac.configurationType=ADMIN_MANAGED
168168
#
169169
# Example : oracle.install.db.CLUSTER_NODES=node1,node2
170170
#------------------------------------------------------------------------------
171-
oracle.install.db.CLUSTER_NODES={% if configure_cluster==True %}{% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}{% else %}{% endif %}
171+
{% if configure_cluster==True %}
172+
{% if oracle_gi_cluster_type |upper == 'FLEX' %}
173+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
174+
{% else %}
175+
oracle.install.db.CLUSTER_NODES={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
176+
{% endif %}
177+
{% else %}
178+
{% endif %}
172179

173180

174181
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)