Skip to content

Commit f8c6288

Browse files
committed
molecule: dbfs-ol9 for RDBMS prepatch testing
1 parent 3337bea commit f8c6288

File tree

10 files changed

+187
-54
lines changed

10 files changed

+187
-54
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- "molecule: dbfs-ol9 for RDBMS prepatch testing (oravirt#469)"

doc/development.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ The following szenarios are existing in the `ansible-oracle profect.
214214
|=======================
215215
|Stage |Description
216216
| dbfs | Full stage for installation of RDBMS 19c + Patching and create database. Requires installation media in /vagrant on local host.
217+
| dbfs-ol9 | Full stage for installation of RDBMS 19c + Patching on OL9 and create database. Requires installation media in /vagrant on local host.
217218
| default | Stage for testing common and orahost roles with different Distributions.
218219
| download | Download Patches from support.oracle.com for dbfs stage.
219220
| golden | Create Golden-Image for installation from dbfs.

example/beginner_patching/ansible/inventory/group_vars/all/db-homes.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ db_homes_config:
1919
# Oracle JavaVM Component Release Update (OJVM RU) 19.24.0.0.240716
2020
stop_processes: true
2121
state: present
22-
# - patchid: 35261302
23-
# # DATAPUMP BUNDLE PATCH 19.19.0.0.0
24-
# stop_processes: true
25-
# state: present
2622

2723
db1918_si_se2: &db1918_si_se2
2824
version: 19.3.0.0
@@ -75,15 +71,3 @@ oracle_sw_patches:
7571
patchid: 36414915
7672
version: 19.3.0.0
7773
description: OJVM 19.24
78-
# creates: 36414915/README.txt
79-
80-
# oracle_sw_patches: []
81-
# - patchid: 36582781
82-
# # Database Release Update 19.24.0.0.240716
83-
# patchversion: 19.24.0.0.240716
84-
# stop_processes: true
85-
# state: present
86-
# - patchid: 36414915
87-
# # Oracle JavaVM Component Release Update (OJVM RU) 19.24.0.0.240716
88-
# stop_processes: true
89-
# state: present
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
collections:
3+
# Use current directory as collection source
4+
- source: ./..
5+
type: dir
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
- name: Converge
3+
hosts: all
4+
gather_facts: true
5+
any_errors_fatal: true
6+
vars:
7+
patch_before_rootsh: true
8+
apply_patches_db: true
9+
10+
db_homes_installed:
11+
- home: db19-si-ee
12+
state: present
13+
apply_patches: true
14+
tasks:
15+
16+
# install missing cron on rhel9 container
17+
- name: Install cron on RHEL/OL9
18+
ansible.builtin.package:
19+
name: cronie
20+
when:
21+
- ansible_os_family == 'RedHat'
22+
- ansible_distribution_major_version | int == 9
23+
24+
- name: Converge os
25+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.os
26+
27+
- name: Converge swdb
28+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.swdb
29+
vars:
30+
# install it directly from remote in this test
31+
# => Do not copy the installation media into container
32+
oracle_sw_copy: true
33+
is_sw_source_local: true
34+
35+
- name: Converge sql_zauberkastern
36+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.sql_zauberkastern
37+
38+
- name: Converge manage_db
39+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.manage_db
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
dependency:
3+
name: galaxy
4+
enabled: true
5+
6+
driver:
7+
name: docker
8+
platforms:
9+
- name: dbfs-ol9
10+
image: "${MOLECULE_IMAGE:-quay.io/rendanic/docker-ol9-ansible:latest}"
11+
pre_build_image: true
12+
# The following 4 lines are needed only for making systemd work
13+
command: ${MOLECULE_DOCKER_COMMAND:-""}
14+
volumes:
15+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
16+
- /vagrant:/vagrant:ro
17+
cgroupns_mode: host
18+
privileged: true
19+
20+
verifier:
21+
name: ansible
22+
23+
provisioner:
24+
name: ansible
25+
inventory:
26+
links:
27+
group_vars: ../shared_config/inventory/group_vars/
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
# This playbook is a special step in molecule.
3+
- name: Side-Effect - DB-Patching 19.20
4+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.opatch
5+
vars:
6+
is_sw_source_local: true
7+
oracle_sw_copy: true
8+
oracle_sw_unpack: true
9+
db_homes_installed:
10+
- home: db19-si-ee
11+
state: present
12+
apply_patches: true
13+
14+
- name: Side-Effect - DB-Patching 19.20
15+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.opatch
16+
17+
- name: Side-Effect - Manage-DB
18+
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.manage_db
19+
vars:
20+
restart_spparameter_changed: true
21+
oracle_databases:
22+
- home: db19-si-ee
23+
oracle_db_name: &oracle_db_name DB1
24+
oracle_db_type: SI
25+
is_container: true
26+
storage_type: FS
27+
oracle_database_type: MULTIPURPOSE
28+
redolog_size: 50M
29+
redolog_groups: 3
30+
listener_name: LISTENER
31+
listener_port: &cdb_listener_port 1521
32+
archivelog: false
33+
flashback: false
34+
force_logging: true
35+
state: present
36+
tablespaces:
37+
- name: SYSTEM
38+
size: 10M
39+
autoextend: true
40+
next: 50M
41+
maxsize: 4G
42+
content: permanent
43+
state: present
44+
- name: TEMP
45+
size: 10M
46+
autoextend: true
47+
next: 50M
48+
maxsize: 4G
49+
content: temp
50+
state: present
51+
- name: UNDOTBS1
52+
size: 10M
53+
autoextend: true
54+
next: 50M
55+
maxsize: 4G
56+
content: undo
57+
state: present
58+
init_parameters:
59+
- {name: recyclebin, value: 'off', scope: spfile, state: present}
60+
- {name: sga_target, value: '1808M', scope: spfile, state: present}
61+
62+
oracle_pdbs:
63+
- cdb: DB1
64+
home: db19-si-ee
65+
pdb_name: ORCLPDB
66+
listener_port: 1521
67+
state: present
68+
datafile_dest: /u01/app/oracle/oradata
69+
statspack:
70+
purgedays: 14
71+
snaplevel: 7
72+
tablespace: PERFSTAT
73+
state: present
74+
tablespaces:
75+
- name: PERFSTAT
76+
size: 10M
77+
autoextend: true
78+
next: 50M
79+
maxsize: 4G
80+
content: permanent
81+
state: present
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# This is an example playbook to execute Ansible tests.
3+
4+
- name: Verify
5+
hosts: all
6+
gather_facts: false
7+
tasks:
8+
- name: Example assertion
9+
ansible.builtin.assert:
10+
that: true

extensions/molecule/shared_config/inventory/group_vars/all/oracle_db.yml

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,33 @@
33
# is_sw_source_local: false
44
# oracle_sw_source_www: http://10.0.2.15:8080
55

6-
oraswdb_golden_image_create: true
7-
golden_image_dest: /u01/golden
6+
is_sw_source_local: true
7+
oracle_sw_copy: true
8+
oracle_sw_unpack: true
89

10+
# directory for patch download
911
oracle_sw_source_local: /vagrant
1012

13+
# Directory for Installation-Media
14+
oracle_stage_remote: /vagrant
15+
16+
# Directory for response files, extraceted patches etc.
17+
oracle_stage: /u01/stage
18+
19+
oraswdb_golden_image_create: true
20+
golden_image_dest: /u01/golden
21+
1122
apply_patches_db: true
1223

1324
oracle_sw_patches:
1425
- filename: cvupack_linux_ol7_x86_64.zip
1526
patchid: 30839369
1627
version: 21.0.0.0
1728
description: Latest cluvfy
18-
- filename: p35643107_190000_Linux-x86-64.zip
19-
patchid: 35643107
20-
version: 19.3.0.0
21-
description: Database Release Update 19.21.0.0.231017
22-
- filename: p35648110_190000_Linux-x86-64.zip
23-
patchid: 35648110
29+
- filename: p36582781_190000_Linux-x86-64.zip
30+
patchid: 36582781
2431
version: 19.3.0.0
25-
description: OJVM RELEASE UPDATE 19.21.0.0
26-
creates: 35354406/README.txt
27-
- filename: p35787077_1921000DBRU_Generic.zip
28-
patchid: 35787077
29-
unique_patchid: 25410019
30-
version: 19.3.0.0
31-
description: DATAPUMP BUNDLE PATCH 19.21.0.0.0
32-
- filename: p29213893_1921000DBRU_Generic.zip
33-
patchid: 29213893
34-
unique_patchid: 25362849
35-
version: 19.3.0.0
36-
description: "DBMS_STATS FAILING WITH ERROR ORA-01422"
32+
description: Database Release Update 19.24.0.0.240716
3733

3834
# Important!
3935
# The converge.yml disables the installation of patches.
@@ -42,7 +38,7 @@ oracle_sw_patches:
4238
db_homes_installed:
4339
- home: db19-si-ee
4440
state: present
45-
apply_patches: false # patching is done in side-effect.yml!
41+
apply_patches: true # patching is done in side-effect.yml!
4642

4743
db_homes_config:
4844
db19-si-ee:
@@ -54,25 +50,11 @@ db_homes_config:
5450
opatch:
5551
# - {patchid: 29213893, state: absent, excludeUPI: 25224952, stop_processes: true} # 19.3
5652
# - {patchid: 29213893, state: absent, excludeUPI: 24722761, stop_processes: true} # 19.15
57-
- patchid: 35643107
58-
# Database Release Update 19.21.0.0.231017
59-
patchversion: 19.21.0.0.231017
60-
stop_processes: true
61-
state: present
62-
- patchid: 35648110
63-
# Oracle JavaVM Component Release Update (OJVM RU) 19.21.0.0.0.0.231017
64-
stop_processes: true
65-
state: present
66-
- patchid: 35787077
67-
# DATAPUMP BUNDLE PATCH 19.21.0.0.0
68-
stop_processes: false
69-
state: present
70-
excludeUPI: 25410019
71-
- patchid: 29213893
72-
# DBMS_STATS FAILING WITH ERROR ORA-01422"
53+
- patchid: 36582781
54+
# Database Release Update 19.24.0.0.240716
55+
patchversion: 19.24.0.0.240716
7356
stop_processes: true
7457
state: present
75-
excludeUPI: 25362849
7658

7759
oracle_listeners_config:
7860
LISTENER:

roles/oraswdb_install/tasks/19.3.0.0.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- ansible_memory_mb.swap.total > 16384
1616
tags:
1717
- assertswap
18+
- molecule-notest
1819

1920
# Do not cleanup patches at the end.
2021
# => We keep them for later patch installation with oradb-manage-patches.

0 commit comments

Comments
 (0)