Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ jobs:
ARTIFACTORY_URL: "${{ secrets.ARTIFACTORY_URL }}"
CUSTOM_CHECKOUT_LOC: "repo"
python_ver: "3.10"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
scenario:
- websphere-v90-rockylinux8
- websphere-v90-rockylinux8
- db21158
- db21159
- oracle19c-rockylinux8
- iim-191-rockylinux8
- ihs-v90-rockylinux8
Expand All @@ -42,11 +43,11 @@ jobs:
- weblogic-rockylinux8
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.CUSTOM_CHECKOUT_LOC }}
- name: Setup Python v${{ env.python_ver }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_ver }}
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
release:
env:
python_ver: "3.10"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ansible_collections
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: spm_middleware

# The version of the collection. Must be compatible with semantic versioning
# Please note. version also exists in /github/workflows/release.yml and will need to be update also
version: 1.8.2
version: 1.8.3

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
4 changes: 2 additions & 2 deletions molecule/_resources/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ FROM --platform=linux/amd64 {{ item.image }}
{% endif %}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3 python3-pip sudo python3-devel python3-dnf bash findutils which unzip zip procps python3-libselinux && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash findutils which unzip zip procps && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install systemd python3 python3-pip sudo python3-devel python3-dnf bash findutils which unzip zip procps python3-libselinux && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y systemd python sudo yum-plugin-ovl bash findutils which unzip zip procps && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
Expand Down
14 changes: 14 additions & 0 deletions molecule/db21210/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

roles:
- db2

vars:
db2_version: "12.1.0.0"
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}
34 changes: 34 additions & 0 deletions molecule/db21210/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
driver:
name: docker
provider:
name: docker

lint: |
set -e
yamllint .

platforms:
- name: rockylinux9
image: rockylinux:9
dockerfile: ../_resources/Dockerfile.j2
pre_build_image: false
privileged: true
volume_mounts:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/lib/systemd/systemd"
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
22 changes: 22 additions & 0 deletions molecule/db21210/verify.yml
Original file line number Diff line number Diff line change
@@ -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
- "'v12.1.0' in db2level_cmd.stdout"
2 changes: 1 addition & 1 deletion roles/db2/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ instance_id: inst1
instance_port: 50000

db2_install_path: /opt/IBM/db2
db2_version: 11.5.9.0
db2_version: 12.1.0.0
db2_product: DB2_SERVER_EDITION
db2_bypass_prereq_check: false
db2_activate: True
Expand Down
30 changes: 29 additions & 1 deletion roles/db2/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,40 @@
async: 1800
poll: 0

# Workaround for Rocky where aws libs not in path

- name: Wait for DB2 libs to be extracted
pause:
seconds: 60
when: ansible_facts['distribution'] == "Rocky"

- name: Check if AWS SDK libraries exist
stat:
path: "/opt/IBM/db2/lib64/awssdk/RHEL/8.1/libaws-cpp-sdk-core.so"
register: aws_lib_check
when: ansible_facts['distribution'] == "Rocky"

- name: Create missing symbolic links for AWS SDK libraries
file:
src: "/opt/IBM/db2/lib64/awssdk/RHEL/8.1/{{ item }}"
dest: "/opt/IBM/db2/lib64/{{ item }}"
state: link
loop:
- libaws-cpp-sdk-core.so
- libaws-cpp-sdk-kinesis.so
- libaws-cpp-sdk-s3.so
- libaws-cpp-sdk-transfer.so
when: aws_lib_check.stat.exists and ansible_facts['distribution'] == "Rocky"
ignore_errors: true

# End Workaround for Rocky

- name: Check installer progress
async_status:
jid: "{{ install_job.ansible_job_id }}"
until: install_result.finished
register: install_result
retries: 100
retries: 50
delay: 30

- name: Cleanup
Expand Down
3 changes: 2 additions & 1 deletion roles/db2/tasks/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@
- tzdata
- unzip
- wget
- libstdc++.i686
state: latest

- name: Install compat-libstdc++-33.i686
package:
name:
- compat-libstdc++-33.i686
- libstdc++.i686
state: latest
when: (ansible_distribution_major_version | int) == 7

4 changes: 4 additions & 0 deletions roles/db2/vars/v12.1.0.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
# paths can be relative to download_url or local
db2_installer_path: DB2/12.1/DB2_Svr_12_1_Linux_x86-64.tar.gz
db2_license_path: DB2/12.1/db2ese_u.lic
Loading