Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_ha_install_anydb_ibmdb2: experimental new role #545

Merged
merged 12 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
7 changes: 7 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
enable_list:
- yaml
skip_list:
- ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
- schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6.
- name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work
21 changes: 21 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Based on ansible-lint config
extends: default

rules:
braces: {max-spaces-inside: 1, level: error}
brackets: {max-spaces-inside: 1, level: error}
# colons: {max-spaces-after: -1, level: error}
# commas: {max-spaces-after: -1, level: error}
comments: disable
comments-indentation: disable
# document-start: disable
# empty-lines: {max: 3, level: error}
# hyphens: {level: error}
# indentation: disable
# key-duplicates: enable
line-length: disable
# new-line-at-end-of-file: disable
# new-lines: {type: unix}
# trailing-spaces: disable
truthy: disable
82 changes: 82 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
`EXPERIMENTAL`

# sap_ha_install_anydb_ibmdb2 Ansible Role

Ansible Role for instantiation of IBM Db2 “Integrated Linux Pacemaker” HADR cluster
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved

Note: IBM Db2 with “Integrated Linux Pacemaker” can use two deployment models:
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
- Mutual Failover option, not covered by this Ansible Role
- High Availability and Disaster Recovery (HADR) option for Idle Standby, initialised by this Ansible Role


## Prerequisites

### Software Installation files

Download IBM Db2 installation media from SAP Download Center on host, and set Ansible Variable `sap_ha_install_anydb_ibmdb2_software_directory` to this path.

### Variables

- `sap_ha_install_anydb_ibmdb2_hostname_primary` with the IBM Db2 Primary node hostname
- `sap_ha_install_anydb_ibmdb2_hostname_secondary` with the IBM Db2 Secondary node hostname
- `sap_ha_install_anydb_ibmdb2_sid` with the IBM Db2 System ID
- `sap_ha_install_anydb_ibmdb2_software_directory` with the IBM Db2 installation media path

These are listed in the default variables file, but commented-out to enforce the required variables:
- [**sap_ha_install_anydb_ibmdb2** default parameters](defaults/main.yml)

## Requirements and Dependencies

This Ansible Role is applicable to IBM Db2 11.5 certified for SAP.

It is applicable to 11.5.9 and later, which provides `db2cm` binary compatibility for AWS, GCP and MS Azure.

### Target host - Infrastructure Platforms

Applicable for:

- Amazon Web Services
- Google Cloud
- Microsoft Azure

### Target host - Operating System requirements

Designed for Linux operating systems, e.g. RHEL (7.x and 8.x) and SLES (15.x).

## Execution

Sample Ansible Playbook Execution:

- Local Host Installation
- `ansible-playbook --connection=local --limit localhost -i "localhost," sap-ha-anydb-ibmdb2-init.yml -e "@inputs/ibmdb2_vars.yml`

- Target Host Installation
- `ansible-playbook -i "<target-host>" sap-ha-anydb-ibmdb2-init.yml -e "@inputs/ibmdb2_vars.yml"`

## Sample Ansible Playbook

```yaml
---
- hosts: all

collections:
- community.sap_install

vars:
sap_ha_install_anydb_ibmdb2_hostname_primary: anydb-primary
sap_ha_install_anydb_ibmdb2_hostname_secondary: anydb-second
sap_ha_install_anydb_ibmdb2_sid: DB2
sap_ha_install_anydb_ibmdb2_software_directory: /software/ibmdb2_extracted

- name: Execute Ansible Role sap_ha_install_anydb_ibmdb2
ansible.builtin.include_role:
name: community.sap_install.sap_ha_install_anydb_ibmdb2
```

## License

Apache license 2.0

## Author Information

Sean Freeman
24 changes: 24 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved

sap_ha_install_anydb_ibmdb2_sid:

sap_ha_install_anydb_ibmdb2_hostname_primary:
sap_ha_install_anydb_ibmdb2_hostname_secondary:

sap_ha_install_anydb_ibmdb2_software_directory:


sap_ha_install_anydb_ibmdb2_vip_primary_ip_address: ""

sap_ha_install_anydb_ibmdb2_aws_access_key_id: ""
sap_ha_install_anydb_ibmdb2_aws_secret_access_key: ""
sap_ha_install_anydb_ibmdb2_aws_vip_update_rt: ""

sap_ha_install_anydb_ibmdb2_msazure_tenant_id: ""
sap_ha_install_anydb_ibmdb2_msazure_app_client_id: ""
sap_ha_install_anydb_ibmdb2_msazure_app_client_secret: ""
sap_ha_install_anydb_ibmdb2_msazure_lb_health_check_port: 62700

sap_ha_install_anydb_ibmdb2_gcp_credentials_json_file: ""
sap_ha_install_anydb_ibmdb2_gcp_project: ""
sap_ha_install_anydb_ibmdb2_gcp_lb_health_check_port: 62700
13 changes: 13 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
galaxy_info:
namespace: community
author: Sean Freeman
description: HA for SAP AnyDB - IBM Db2
company: Red Hat, Inc.
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
license: Apache-2.0
min_ansible_version: 2.9
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
platforms:
- name: EL
sean-freeman marked this conversation as resolved.
Show resolved Hide resolved
versions: [ 8, 9 ]
galaxy_tags: [ 'sap', 'anydb', 'ibmdb2', 'ibm', 'db2', 'rhel', 'redhat', 'sles', 'suse' ]
dependencies: []
2 changes: 2 additions & 0 deletions roles/sap_ha_install_anydb_ibmdb2/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
requires_ansible: '>=2.12.0'
Loading
Loading