Resolves: #2047282, Rebase to new upstream org sap-linuxlab

This commit is contained in:
Than Ngo 2022-02-07 17:08:08 +01:00
parent e591b8a5b9
commit 5d6084be7f
5 changed files with 171 additions and 65 deletions

2
.gitignore vendored
View File

@ -19,3 +19,5 @@
/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz
/community.sap_install-7956ecd9bd289c608f6e5c0d51c5139ae9a6d349.tar.gz
/auto-maintenance-d64d1be7904aa8f279b117da6f2a31b3d4b6e43e.tar.gz

52
README.md Normal file
View File

@ -0,0 +1,52 @@
Red Hat Enterprise Linux System Roles for SAP Ansible Collection
=====================================
Red Hat Enterprise Linux System Roles for SAP is a set of roles for preparing Red Hat Enterprise Linux systems for the initial installation of SAP NetWeaver and SAP HANA.
## Dependencies
If installing from RPM, any dependencies will be installed with the package.
Otherwise, the dependencies are listed in `requirements.txt` and/or `bindep.txt`.
## Installation
There are currently two ways to use the Red Hat Enterprise Linux System Roles for SAP Collection in your setup.
### Installation from Automation Hub
You can install the collection from Automation Hub by running:
```
ansible-galaxy collection install sap.rhel
```
After the installation, the roles are available as `sap.rhel.<role_name>`.
Please see the [Using Ansible collections documentation](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for further details.
### Installation via RPM
You can install the collection with the software package management tool `dnf` by running:
```
dnf install rhel-system-roles-sap
```
## Documentation
The official RHEL System Roles for SAP documentation can be found [here](https://access.redhat.com/articles/4488731).
## Support
### Supported Ansible Versions
The supported Ansible versions are aligned with currently maintained Ansible versions that support Collections (Ansible 2.9 and later). You can find the list of maintained Ansible versions [here](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status).
### Modules and Plugins
The modules and other plugins in this collection are private, used only internally to the collection, unless otherwise noted.
### Supported Roles
<!--ts-->
* preconfigure
* hana_preconfigure
* netweaver_preconfigure
<!--te-->

59
galaxy.yml Normal file
View File

@ -0,0 +1,59 @@
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: sap-linuxlab
# The name of the collection. Has the same character restrictions as 'namespace'
name: rhel
# The version of the collection. Must be compatible with semantic versioning
version: 3.2.0
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url)
# @nicks:irc/im.site#channel'
authors:
- Bernd Finger <bfinger@redhat.com>
- Markus Koch <mkoch@redhat.com>
- Than Ngo <than@redhat.com>
### OPTIONAL but strongly recommended
# A short summary description of the collection
description: Ansible Collection to prepare a RHEL 7.6 or later system for the installation of SAP NetWeaver or SAP HANA
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
license:
- GPL-3.0-or-later
- Apache-2.0
# The path to the license file for the collection. This path is relative to the root of the collection. This key is
# mutually exclusive with 'license'
# license_file: ''
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: [sap]
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies: {}
# The URL of the originating SCM repository
repository: https://github.com/sap-linux-roles/sap-linux-roles.github.io/
# The URL to any online docs
documentation: https://github.com/sap-linux-roles/sap-linux-roles.github.io/blob/master/README.md
# The URL to the homepage of the collection/project
homepage: https://sap-linux-roles.github.io
# The URL to the collection issue tracker
issues: https://github.com/sap-linux-roles/sap-linux-roles.github.io/issues

View File

@ -14,39 +14,38 @@
%bcond_with html
%endif
%global collection_namespace sap
%global collection_namespace sap-linuxlab
%if 0%{?rhel}
%define package_name rhel-system-roles-sap
%global collection_name rhel
%else
%define package_name linux-system-roles-sap
%global collection_name linux
%global collection_name community
%endif
# collection_version has to be increased by every rebuild
# otherwise, it cannot be uploaded to Automation Hub and Galaxy
# due to version conflict
%define collection_version 3.1.4
%define collection_version 3.2.0
%global mainid 411f58b0e8da72cd69827d6ed30d8925bea5cb23
%global gitcommit_sap d065073dca5617292d768ea0e044994653f84667
%global gitcommit_sap_hana 083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b
%global gitcommit_sap_netweaver bf771416116b670ccf17f8e289adbe14df20208b
%global rolename1 sap-preconfigure
%global rolename2 sap-hana-preconfigure
%global rolename3 sap-netweaver-preconfigure
%global mainid d64d1be7904aa8f279b117da6f2a31b3d4b6e43e
%global commit_id_sap_install 7956ecd9bd289c608f6e5c0d51c5139ae9a6d349
%global rolename1 sap_general_preconfigure
%global rolename2 sap_hana_preconfigure
%global rolename3 sap_netweaver_preconfigure
%global rolename4 sap_hana_install
%global src_owner linux-system-roles
%global github_repo_sap_install community.sap_install
Name: %{package_name}
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 3.1.1
Release: 15%{?dist}
Version: 3.2.0
Release: 1%{?dist}
License: GPLv3+
Url: https://github.com/berndfinger
Url: https://github.com/sap-linuxlab/community.sap_install
Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
Source1: https://github.com/berndfinger/sap-preconfigure/archive/%{gitcommit_sap}/sap-preconfigure-%{gitcommit_sap}.tar.gz
Source2: https://github.com/berndfinger/sap-hana-preconfigure/archive/%{gitcommit_sap_hana}/sap-hana-preconfigure-%{gitcommit_sap_hana}.tar.gz
Source3: https://github.com/berndfinger/sap-netweaver-preconfigure/archive/%{gitcommit_sap_netweaver}/sap-netweaver-preconfigure-%{gitcommit_sap_netweaver}.tar.gz
Source1: https://github.com/sap-linuxlab/%{github_repo_sap_install}archive/%{github_repo_sap_install}/%{github_repo_sap_install}-%{commit_id_sap_install}.tar.gz
Source4: README.md
Source5: galaxy.yml
# patches 0-49 for sap-preconfigure
@ -81,7 +80,7 @@ Requires: python-netaddr
%endif
%if %{with ansible}
BuildRequires: ansible >= 2.9.10
BuildRequires: ansible-core >= 2.9.10
%endif
%if %{undefined __ansible_provides}
@ -122,12 +121,7 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
%endif
%prep
%setup -q -a1 -a2 -a3 -n auto-maintenance-%{mainid}
# rename the source directories without gitcommit_sap
mv sap-preconfigure-%{gitcommit_sap} sap-preconfigure
mv sap-hana-preconfigure-%{gitcommit_sap_hana} sap-hana-preconfigure
mv sap-netweaver-preconfigure-%{gitcommit_sap_netweaver} sap-netweaver-preconfigure
%setup -q -a1 -n auto-maintenance-%{mainid}
# cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy
mkdir .collections
@ -136,43 +130,39 @@ sed -i -e "s|name: rhel|name: %{collection_name}|" galaxy.yml
# add correct version for Automation Hub and Galaxy
sed -i -e "s|version: 3.1.1|version: %{collection_version}|" galaxy.yml
pushd sap-preconfigure
popd
pushd sap-hana-preconfigure
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure
%patch50 -p1
popd
pushd sap-netweaver-preconfigure
popd
# remove git stuff
rm -rf *-preconfigure/.git*
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/
# remove zero file
rm -f sap-hana-preconfigure/tasks/RedHat_6/recommendations.yml
rm -f sap_hana_preconfigure/tasks/RedHat_6/recommendations.yml
# remove all SLES stuff and RHEL 6 stuff
rm -rf sap-hana-preconfigure/tasks/SLES/
rm -rf sap-hana-preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc
rm -rf sap-hana-preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines
rm -f sap-hana-preconfigure/tasks/sapnote/1944799.yml
rm -f sap-hana-preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings
rm -f sap-hana-preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings
rm -f sap-hana-preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings
rm -rf sap-hana-preconfigure/tasks/sapnote/2578899 # SLES 15 - installation
rm -rf sap-hana-preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA
rm -f sap-hana-preconfigure/vars/RedHat_6.5.yml
rm -f sap-hana-preconfigure/vars/RedHat_6.6.yml
rm -f sap-hana-preconfigure/vars/RedHat_6.7.yml
rm -f sap-hana-preconfigure/vars/SLES_15.yml
rm -rf sap_hana_preconfigure/tasks/SLES/
rm -rf sap_hana_preconfigure/tasks/sapnote/1275776 # SLES - sapconf, saptune, etc
rm -rf sap_hana_preconfigure/tasks/sapnote/1944799 # SLES - HANA install and config guidelines
rm -f sap_hana_preconfigure/tasks/sapnote/1944799.yml
rm -f sap_hana_preconfigure/tasks/sapnote/2013638.yml # RHEL 6.5 - OS settings
rm -f sap_hana_preconfigure/tasks/sapnote/2136965.yml # RHEL 6.6 - OS settings
rm -f sap_hana_preconfigure/tasks/sapnote/2247020.yml # RHEL 6.7 - OS settings
rm -rf sap_hana_preconfigure/tasks/sapnote/2578899 # SLES 15 - installation
rm -rf sap_hana_preconfigure/tasks/sapnote/2684254 # SLES 15 - OS settings for HANA
rm -f sap_hana_preconfigure/vars/RedHat_6.5.yml
rm -f sap_hana_preconfigure/vars/RedHat_6.6.yml
rm -f sap_hana_preconfigure/vars/RedHat_6.7.yml
rm -f sap_hana_preconfigure/vars/SLES_15.yml
popd
%build
sh md2html.sh \
sap-preconfigure/README.md \
sap-hana-preconfigure/README.md \
sap-netweaver-preconfigure/README.md
%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_general_preconfigure/README.md \
%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_hana_preconfigure/README.md \
%{github_repo_sap_install}-%{commit_id_sap_install}/roles/sap_netweaver_preconfigure/README.md
for role in %{rolename1} %{rolename2} %{rolename3} ; do
for role in %{rolename1} %{rolename2} %{rolename3} %{rolename4} ; do
new_role="$(echo ${role/sap-/} | tr '-' '_')"
python3 lsr_role2collection.py --role "$role" \
--src-path "$role" \
--src-path %{github_repo_sap_install}-%{commit_id_sap_install}/roles/"$role" \
--src-owner %{src_owner} \
--dest-path .collections \
--readme %{SOURCE4} \
@ -204,14 +194,17 @@ cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
%install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure
$RPM_BUILD_ROOT%{_pkgdocdir}/sap_hana_preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap_general_preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap_netweaver_preconfigure \
$RPM_BUILD_ROOT%{_pkgdocdir}/sap_hana_install
cp -pR sap-hana-preconfigure sap-preconfigure sap-netweaver-preconfigure $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
cp -p sap-hana-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-hana-preconfigure/
cp -p sap-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-preconfigure/
cp -p sap-netweaver-preconfigure/{README.md,LICENSE} $RPM_BUILD_ROOT%{_pkgdocdir}/sap-netweaver-preconfigure/
pushd %{github_repo_sap_install}-%{commit_id_sap_install}/roles/
for f in sap_hana_preconfigure sap_general_preconfigure sap_netweaver_preconfigure sap_hana_install ; do
cp -pR $f $RPM_BUILD_ROOT%{_datadir}/ansible/roles/
install -m 644 ../LICENSE $f/README.md $RPM_BUILD_ROOT%{_pkgdocdir}/$f
done
popd
# install collection files
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
@ -228,9 +221,10 @@ popd
%files
%dir %{_pkgdocdir}
%dir %{_pkgdocdir}/sap-preconfigure
%dir %{_pkgdocdir}/sap-hana-preconfigure
%dir %{_pkgdocdir}/sap-netweaver-preconfigure
%dir %{_pkgdocdir}/sap_general_preconfigure
%dir %{_pkgdocdir}/sap_hana_preconfigure
%dir %{_pkgdocdir}/sap_netweaver_preconfigure
%dir %{_pkgdocdir}/sap_hana_install
%dir %{_datadir}/ansible
%dir %{_datadir}/ansible/roles
%doc %{_pkgdocdir}/*/README.md
@ -244,6 +238,9 @@ popd
%endif
%changelog
* Mon Jan 31 2022 Than Ngo <than@redhat.com> - 3.2.0-1
- Resolves: #2047282, Rebase to new upstream org sap-linuxlab
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-15
- Related: #2021579, ansible-lint cleanup

View File

@ -1,6 +1,2 @@
SHA512 (README.md) = ef4fc905c824b1701e27543f7335584406f35873c34915b2aa355a73b8b469d2b7d9d33722769403451f5d7d78127cbb87bfb4f0ae56fdfafe3fc26cc1a44af2
SHA512 (auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz) = 5204949ee46811bf15bd7d9517472e3e8f923ebc0d0b31f7e243e775c1cccb35d47f1fe47d58403c959eec38cba28b44060acec6b44198cc2f93030f6f8eac1e
SHA512 (galaxy.yml) = 7b7b7482bfec398e25107715c96b9c13f98263f22b9406e6a65a4b46d197546208fc183cbed60d82c29ef3a9bd0036f8dd64162de47c8d0271a0eb15e539a214
SHA512 (sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz) = 731b08d4e22d9f9d1a0e421e320c82ee5cc5176983aa3499255df40f782dbf5f61f48d0531618185377d8b908e7ee6095251bd9311ffd7b8a50f5d02a987dd89
SHA512 (sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz) = 3e57119ae8f8737547fcda63689fd6c87f2a8d9aafe90f39b338ffb2abebf18bad91ce6552211d0526b7842be4e3373d75347fb0638bc8f1185ffb3c7b7f949f
SHA512 (sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz) = fd157516a4eee234a8c137ea0bddc53c353fcb54954e4d8053c72c1b7d3078ec9308d3576574eb12e6b0c5cdf7baddf4180710b1cfade4ca98b1593c6eaf6c71
SHA512 (community.sap_install-7956ecd9bd289c608f6e5c0d51c5139ae9a6d349.tar.gz) = a9ab850eedb16660a205317bd3f13977dae039d51af83c2fa640ff401ebbf50f579c157c85ec8ca0394b74b3dc41305e75ca0a2993d70875444e0d90b3f7285a
SHA512 (auto-maintenance-d64d1be7904aa8f279b117da6f2a31b3d4b6e43e.tar.gz) = 5e08a9521c80ef60848ac0b4b10209a47cae93cba7f7870174515dd34919af2d538b66352005194273c5f38664845ece01697c45bf7a6b6ec49e8d862e53c97a