From 0477b352488684e6baa8399e51672d9416a99e3d Mon Sep 17 00:00:00 2001 From: Fergal Date: Wed, 27 Sep 2023 13:23:24 +0100 Subject: [PATCH] Introduction of Db2 11.5.8 --- .github/workflows/main.yml | 2 +- molecule/db21158/converge.yml | 14 ++++++++++++++ molecule/db21158/molecule.yml | 34 ++++++++++++++++++++++++++++++++++ molecule/db21158/verify.yml | 22 ++++++++++++++++++++++ roles/db2/defaults/main.yml | 2 +- roles/db2/vars/v11.5.8.0.yml | 4 ++++ 6 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 molecule/db21158/converge.yml create mode 100644 molecule/db21158/molecule.yml create mode 100644 molecule/db21158/verify.yml create mode 100644 roles/db2/vars/v11.5.8.0.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8d8622..1e3b95c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: matrix: scenario: - websphere-v90-rockylinux8 - - db21157 + - db21158 - oracle19c-rockylinux8 - iim-191-rockylinux8 - ihs-v90-rockylinux8 diff --git a/molecule/db21158/converge.yml b/molecule/db21158/converge.yml new file mode 100644 index 0000000..7c08c60 --- /dev/null +++ b/molecule/db21158/converge.yml @@ -0,0 +1,14 @@ +--- +- name: Converge + hosts: all + + collections: + - merative.spm_middleware + + roles: + - db2 + + vars: + db2_version: "11.5.8.0" + download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers" + download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"} diff --git a/molecule/db21158/molecule.yml b/molecule/db21158/molecule.yml new file mode 100644 index 0000000..5d0d371 --- /dev/null +++ b/molecule/db21158/molecule.yml @@ -0,0 +1,34 @@ +--- +driver: + name: docker + provider: + name: docker + +lint: | + set -e + yamllint . + +platforms: + - name: rockylinux8 + image: rockylinux:8 + dockerfile: ../_resources/Dockerfile.j2 + pre_build_image: false + privileged: true + volume_mounts: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" + environment: + container: docker + +provisioner: + name: ansible + log: true + config_options: + defaults: + stderr_callback: debug + stdout_callback: debug + env: + ANSIBLE_FORCE_COLOR: 'true' + playbooks: + converge: ./converge.yml + verify: ./verify.yml diff --git a/molecule/db21158/verify.yml b/molecule/db21158/verify.yml new file mode 100644 index 0000000..f2704d4 --- /dev/null +++ b/molecule/db21158/verify.yml @@ -0,0 +1,22 @@ +--- +- name: Verify + hosts: all + pre_tasks: + - stat: "path=/opt/Props/Bootstrap.properties" + register: boot_props + - command: "db2level" + become: true + become_user: "db2admin" + become_method: sudo + become_flags: "-i" + register: db2level_cmd + + tasks: + - name: Check that Bootstrap.properties exists + assert: + that: boot_props.stat.exists + - name: Check that the db2level command is working + assert: + that: + - db2level_cmd.rc == 0 + - "'v11.5.8' in db2level_cmd.stdout" diff --git a/roles/db2/defaults/main.yml b/roles/db2/defaults/main.yml index cb95245..12b9b50 100644 --- a/roles/db2/defaults/main.yml +++ b/roles/db2/defaults/main.yml @@ -3,7 +3,7 @@ instance_id: inst1 instance_port: 50000 db2_install_path: /opt/IBM/db2 -db2_version: 11.5.7.0 +db2_version: 11.5.8.0 db2_product: DB2_SERVER_EDITION db2_bypass_prereq_check: false db2_activate: True diff --git a/roles/db2/vars/v11.5.8.0.yml b/roles/db2/vars/v11.5.8.0.yml new file mode 100644 index 0000000..f686490 --- /dev/null +++ b/roles/db2/vars/v11.5.8.0.yml @@ -0,0 +1,4 @@ +--- +# paths can be relative to download_url or local +db2_installer_path: DB2/11.5/v11.5.8_linuxx64_universal_fixpack.tar.gz +db2_license_path: DB2/11.5/db2ese_u.lic