Git Product home page Git Product logo

community.sles-for-sap's Introduction

SLES for SAP Ansible Roles

GitHub Super-Linter

This collection of roles is currently in development

This repository provides a collection of Ansible roles for SLES for SAP. The roles are written to support the provision of SLES for SAP along with the configuration of storage and the provisioning of SAP software such as S4 and HANA.

Role design

These roles all consist of three steps:

  • Pre-checks
  • Tasks
  • Post-checks

Pre-checks

Pre-checks are run to ensure that the tasks the role performs can be completed. This includes checking that mandatory variables are defined and populated and that required software packages are present. If any of the prerequisites are not met, a meaningful error message will be printed instructing the user how what is required.

Tasks

The tasks section executes the tasks required to attain the required state that the role provides.

Post-checks

The post-checks section of the role verifies that the tasks section yielded the expected results. Again, if any check fails, a meaningful error message will be printed for the user.

Package Management

Be aware that the roles will not install or remove any packages. If packages required for the roles are missing, an error will be printed when running pre-checks.

It is the opinion of the authors that package managed should be handled externally from the roles.

Conventions

To see more information about the naming and coding conventions used in the project, see the Conventions page.

Recommended Versions

This project has used the following software version.

  • python 3.9.6
  • ansible 7.1.0 (installed with pip)
  • ansible-core 2.14.1 (installed with pip)
  • jmespath 1.0.1 (installed with pip)
  • passlib 1.7.4 (installed with pip)

We strongly recommend using these or newer versions when deploying.

On SUSE Linux Enterprise Server 15 SP4 or newer, the requirements can be installed using the following commands:

# add Python 3 repository
SUSEConnect -p sle-module-python3/15.4/x86_64
# Install Python 3.10 and all other requirements
sudo zypper in -y python310-pip && pip3 install -r requirements.txt

community.sles-for-sap's People

Contributors

gereonvey avatar marcelmamula avatar mfriesenegger avatar mpagot avatar wabri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

community.sles-for-sap's Issues

Roles that expect HANA to be up should check that HANA is up

Roles, such as backup and system replication need HANA to be up in order to work.

The pre-checks should check that HANA is up before moving on to tasks.

If HANA is not up, the user should be informed with a useful message.

It may be useful to have an option to bring HANA up if necessary but this should not be the default.

Roles that require SLES for SAP should check that the OS is SLES for SAP

Currently, no roles check the underling OS, it is assumed that SLES for SAP is being used.

However, some roles will work on any Linux (sap_storage) whilst other will work on any SLES (sles_register).

The roles that are only expected to work on SLES for SAP (cluster, hana-system-replication), should check that the OS is SLES for SAP in the pre-checks.

Some tasks expose secrets

Currently, some task expose secrets.

All tasks that use secrets should use the no_log feature to ensure secrets are not exposed.

Roles have inconsistent names

Some role names have words separated by underbars '_' whilst others separate words with hyphens '-'.

A consistent naming approach should be used.

Regex to check hana instance number can be improved

The regex test for hana instance numbers should match two numerical characters only, but the current regex test will match any string made up two or more numerical characters.

To fix this the current test ansible.builtin.regex('[0-9]{2}') can be replaced with ansible.builtin.regex('^[0-9]{2}$')

registercloudguest and SUSEConnect exit code are not visible

roles/sles_register/tasks/tasks.yml is configured with no_log: true. It is perfectly ok. When a failure happens it could be useful to see exit code of the executed command, what usually is showed in the Ansible log under rc. Possible stderr could be useful too but I'm not sure if it is going to leak the registration code.

aws_region is mandatory for AWS cluster but not validated

I'm creating a deployment with playbook using cluster role from this repo: SUSE/qe-sap-deployment#202

I noticed that, if I forgot to provide aws_region, the role fails as the variable is needed by task Ensure config file has cluster block.

That's fine but:

  • it is not properly documented in the readme, in the Required variables for AWS section of
    ### Required Variables for AWS
  • it is not validated by task Ensure that AWS specific variables are supplied

Roles should use saptune 3.1

Roles should use saptune 3.1, enabling JSON support.

The saptune role should validate available solution using the JSON output of saptune.

Move all common tasks to dedicated shared role

Some tasks, such as checking the validity of a HANA SIDs are repeated across various roles.

For efficiency common tasks should be created as dedicated task lists within a shared role.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.