Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/suse/ha-sap-terraform-deployments

Automated SAP/HA Deployments in Public/Private Clouds
https://github.com/suse/ha-sap-terraform-deployments

aws azure gpc hacktoberfest hana libvirt netweaver sap terraform

Last synced: about 1 month ago
JSON representation

Automated SAP/HA Deployments in Public/Private Clouds

Awesome Lists containing this project

README

        

# Automated SAP/HA Deployments in Public and Private Clouds with Terraform

[![Build Status๐Ÿ”—](https://github.com/SUSE/ha-sap-terraform-deployments/workflows/CI%20tests/badge.svg)](https://github.com/SUSE/ha-sap-terraform-deployments/actions)

**Supported terraform version `1.1.X`**

* [About](#about)
* [Overview](#overview)
* [Components Details](#components-details)
* [Products](#products)
* [Cloud Providers](#cloud-providers)
* [Features](#features)
* [Project Structure](#project-structure)
* [Getting started](#getting-started)
* [Troubleshooting](#troubleshooting)

___

# About

This Project provides a high configurable way to deploy **SAP HANA**
database and **SAP S/4HANA** (or **SAP NetWeaver**) on various cloud platforms.

Both public cloud and private cloud scenarios are
possible. The major cloud providers _Google Cloud Platform_
(GCP), _Microsoft Azure_, and _Amazon Web Services_ (AWS) are
supported. Furthermore _OpenStack_ and _libvirt/KVM_ can be used.

It shall give an improved user experience for our SAP customers and partners.
and deployment will takes minutes/hours instead of days.
You can use it for POC or production deploymentes

Everything is powered by SUSE Linux Enterprise Server for SAP Applications.

# Overview

![Project Components](doc/project-components.png)

The diagram above shows components for an example setup. Several
features can be enabled or disabled through configuration options to
control the behavior of the HA Cluster, the SAP HANA and SAP S/4HANA
or SAP NetWeaver. The setup is also dependent on the cloud provider which is used.

## Components Details

- **SAP HANA Database**:
HANA might be deployed as a single SAP HANA database instance,
or as a two-node configuration with system replication.
Even HANA Scale-Out scenarios can be deployed, depending on the cloud provider (see _Features_ section).
In addition a SUSE HA cluster can be set on top of that.
Please also have a look at [Preparing SAP software](doc/sap_software.md)

- **SAP S/4 HANA (or NetWeaver)**:
S/4HANA can be deployed with a single PAS instance or as
a full stack including ASCS, ERS, PAS and AAS (multiple) instances.
In the latter sce case, a SUSE HA cluster is set on top of ASCS/ERS.
For more information see [S/4HANA and NetWeaver](doc/netweaver.md) and [Preparing SAP software](doc/sap_software.md).

- **ISCSI server**:
This provides Stonith Block Devices used by the
_sbd fencing_ mechanism. Also see [Fencing mechanism](doc/fencing.md)
_Native fencing_ mechanisms are available for some cloud environments (see _Features_ section).

- **Monitoring server**:
The monitoring solution is based on [prometheus๐Ÿ”—](https://prometheus.io) and
[grafana๐Ÿ”—](https://grafana.com/).
It provides informative and customizable dashboards to users and administrators.
Every node has prometheus exporters installed which are used to collect the needed metrics.
For more information see [Monitoring of cluster](doc/monitoring.md).

- **DRBD cluster**:
It is used to provide a highly available NFS server for cloud providers that lack a native solution.
It will be used to mount SAP NetWeaver shared files.
For more information see [DRBD](doc/drbd.md).
Some cloud providers have native solutions for high available NFS (see _Features_ section),
which should be preferred over the DRBD solution.

- **Bastion server**:
A bastion server is used to have a single internet-facing entry point (`ssh`) for the administrator and the provisioning process.
Security-wise, it is a best practice to access you machines this way.
The availability of this solution depends again on the used cloud provider (see _Features_ section).

For more on various topics have a look on the following documentation:

- [SUSE saptune](doc/saptune.md)

## Products

This repository supports deployment with following products:

| Vendor | Product |
| ----------- | -------------------------------------------------------- |
| SUSE | SUSE Linux Enterprise Server for SAP Applications 12 SP5
Certification: [SLES for SAP๐Ÿ”—](https://www.suse.com/products/sles-for-sap/) and [SAP Process Automation๐Ÿ”—](https://store.sap.com/dcp/en/product/display-0000059520_live_v1/SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications) |
| SUSE | SUSE Linux Enterprise Server for SAP Applications 15 SP4 (or older)
Certification: [SLES for SAP๐Ÿ”—](https://www.suse.com/products/sles-for-sap/) and [SAP Process Automation๐Ÿ”—](https://store.sap.com/dcp/en/product/display-0000059520_live_v1/SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications) |
| SAP | SAP HANA 2.0 with SPS >= 02 |
| SAP | SAP NETWEAVER 7.5 (and later) |
| SAP | SAP S/4HANA 1610 |
| SAP | SAP S/4HANA 1709 |
| SAP | SAP S/4HANA 1809 |
| SAP | SAP S/4HANA 1909 |
| SAP | SAP S/4HANA 2020 |
| SAP | SAP S/4HANA 2021 |

## Cloud Providers

This repository supports deployment on the following SAP certified providers cloud providers:

| Vendor | Product | Certification |
| ----------- | -------------------------------------------------------- | --------------------------------- |
| Amazon | Amazon Web Services (AWS) | [SAP Hardware Directory for AWS๐Ÿ”—](https://www.sap.com/dmc/exp/2014-09-02-hana-hardware/enEN/#/solutions?filters=ve:23) |
| Microsoft | Azure | [SAP Hardware Directory for Azure๐Ÿ”—](https://www.sap.com/dmc/exp/2014-09-02-hana-hardware/enEN/#/solutions?filters=ve:24) |
| Google | Google Cloud Platform (GCP) | [SAP Hardware Directory for GCP๐Ÿ”—](https://www.sap.com/dmc/exp/2014-09-02-hana-hardware/enEN/#/solutions?filters=ve:29) |
| OpenInfra | OpenStack | Depends on deployed hardware,
get an overview in [SAP's Hardware Directory๐Ÿ”—](https://www.sap.com/dmc/exp/2014-09-02-hana-hardware/enEN/#/solutions) |
| libvirt.org | Libvirt | not certified |

## Features

The following features are implemented:

| Feature | AWS | Azure | GCP | OpenStack | Libvirt |
| :------ | :---: | :---: | :---: | :-------: | :-----: |
| **SUSE saptune / SAP sapnotes**
SUSE's saptune is applied with the correct solution template to configure the systems based on SAP sapnotes recommendations.
For additional information see [Tuning Systems with saptune๐Ÿ”—](https://documentation.suse.com/sles-sap/15-SP4/html/SLES-SAP-guide/cha-tune.html). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **HANA single node**
Deployment of HANA on a single node.
For additional information see [SAP Hardware Directory for AWS๐Ÿ”—](https://www.sap.com/dmc/exp/2014-09-02-hana-hardware/enEN/#/solutions?filters=ve:23) | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **HANA Scale-Up - performance optimized**
Deployment of HANA with system replication in a performance optimized setup.
For addition information see [SAP HANA System Replication Scale-Up - Performance Optimized Scenario๐Ÿ”—](https://documentation.suse.com/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **HANA Scale-Up - cost optimized**
Deployment of HANA with system replication in a cost optimized (additional tenant DB) setup.
For additional information see [SAP HANA System Replication Scale-Up - Cost Optimized Scenario๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SLES4SAP-hana-sr-guide-costopt-15/). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **HANA Scale-Out - performance optimized**
Deployment of HANA Scale-Out (multi node) with system replication in a performance optimized setup.
For additional information see [SAP HANA System Replication Scale-Out - Performance Optimized Scenario๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SLES4SAP-hana-sr-guide-costopt-15/) and [SAP HANA System Replication Scale-Out High Availability in Amazon Web Services๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SLES-SAP-hana-scaleOut-PerfOpt-12-AWS/). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **HANA Scale-Out - with standby nodes (HANA Host-Auto-Failover)**
Deployment of HANA Scale-Out (multi node) with system replication and Host-Auto-Failover via standby nodes.
For additional information see [Setting Up Host Auto-Failover๐Ÿ”—](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/879d9dc46bb64ccda028872c86c70afc.html?version=2.0.05) and [Azure: Deploy a SAP HANA scale-out system with standby node on Azure VMs by using Azure NetApp Files on SUSE Linux Enterprise Server๐Ÿ”—](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/sap-hana-scale-out-standby-netapp-files-suse). | ๐Ÿšซ | โ˜’ | ๐Ÿšซ | โ˜’ | โ˜ |
| **SAP S/4HANA ENSA 1**
Deployment of a SAP S/4HANA in Enqueue Replication (ENSA) 1 scenario.
For additional information see [SAP NetWeaver Enqueue Replication 1 High Availability Cluster - Setup Guide for SAP NetWeaver 7.40 and 7.50 ๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SAP-nw740-sle15-setupguide/). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **SAP S/4HANA ENSA 2**
Deployment of a S/4HANA in Enqueue Replication (ENSA) 2 scenario.
For additional information see [SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide ๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SAP-S4HA10-setupguide-sle15/index.html). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **SAP S/4HANA single PAS**
Deployment of a single S/4HANA PAS (primary instance).
For additional information see [SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide ๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SAP-S4HA10-setupguide-sle15/index.html). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **SAP S/4HANA High Availability Cluster**
Deployment of a full SAP S/4HANA stack including ASCS, ERS, PAS and AAS (multiple) instances.
For additional information see [SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide ๐Ÿ”—](https://documentation.suse.com/sbp/all/html/SAP-S4HA10-setupguide-sle15/index.html). | โ˜’ | โ˜’ | โ˜’ | โ˜’ | โ˜’ |
| **Deployment in different Availability Zones/Sets**
Deployment of virtual instances in different Availability Zones/Sets for HA on hardware level. | โ˜’ | โ˜’ | โ˜’ | โ˜ | โ˜ |

**Legend:**

| Symbol | Explanation |
| :---: | :------------------------------------- |
| โ˜’ | feature implemented in this repository |
| โ˜ | not implemented in this repository |
| ๐Ÿšซ | not recommended by vendor |

# Project Structure

This project heavily uses [terraform๐Ÿ”—](https://www.terraform.io/) and
[salt๐Ÿ”—](https://www.saltstack.com/) for configuration and deployment.

**Terraform** is used to create the required infrastructure in the specified cloud.

The code is divided into sub directories for each terraform provider and
split into different terraform modules. There are also some abstracted _generic_modules_

```
./ha-sap-terraform-deployments
โ”œโ”€โ”€ aws
โ”‚ย ย ย ย โ””โ”€โ”€ modules
โ”œโ”€โ”€ azure
โ”‚ย ย ย ย โ””โ”€โ”€ modules
โ”œโ”€โ”€ generic_modules
โ”‚ย ย ย ย โ””โ”€โ”€ ...
โ”œโ”€โ”€ gcp
โ”‚ย ย ย ย โ””โ”€โ”€ modules
โ”œโ”€โ”€ libvirt
โ”‚ย ย ย ย โ””โ”€โ”€ modules
โ”œโ”€โ”€ openstack
โ”‚ย ย ย ย โ””โ”€โ”€ modules
โ€ฆ
```

This makes the code modular and more maintainable.

**Salt** configures all virtual machine instances that are provisioned by terraform.
This includes configuring the operating system, mounting filesystems,
installing SAP software, installing HA components.
It does so by using `pillars` and `grains` which are injected by terraform
in a flexible and customizable way.

```
./ha-sap-terraform-deployments
โ”œโ”€โ”€ pillar_examples
โ”‚ย ย ย ย โ””โ”€โ”€ automatic
โ”‚ย ย ย ย  โ””โ”€โ”€ drbd
โ”‚ย ย ย ย  โ””โ”€โ”€ hana
โ”‚ย ย ย ย  โ””โ”€โ”€ netweaver
โ”œโ”€โ”€ salt
โ”‚ย ย ย ย โ””โ”€โ”€ bastion
โ”‚ย ย ย ย โ””โ”€โ”€ cluster_node
โ”‚ย ย ย ย โ””โ”€โ”€ ...
โ€ฆ
```

Terraform will first build up the infrastructure/machines and salt will do the actual provisioning.

Under the hood, [shaptools๐Ÿ”—](https://github.com/SUSE/shaptools) and [salt-shaptools๐Ÿ”—](https://github.com/SUSE/salt-shaptools) are used, to have a stable API to access
SAP HANA and Netweaver functionalities.

The whole architecture stack can be seen here:

![Architecture](doc/project-architecture.png)

This repository is intended to be configured and run from a local workstation, but should also be runnable from your cloud provider's cloud shell.

**Each provider folder has it own provider relevant documentation,**
**modules and example configuration.**
**Be sure to get familiar with these before trying this out.**

# Getting started

![SUSE/SAP HA automation project](doc/sap-workload-automation-suse-flow.png)

The SAP software media has to be available and prepared according to [Preparing SAP software](doc/sap_software.md).

After you prepared the SAP software, make sure to have terraform and salt installed.
Clone this repository and follow the quickstart guides of the favored provider.
They can be found in `.//README.md` or linked below:

- [Amazon Web Services (AWS)](aws/README.md#quickstart) (pdf guide [SUSE SAP automation guide AWS๐Ÿ”—](https://raw.githubusercontent.com/petersatsuse/SA-SAP-Automation/master/build/SA/SA_color_en_aws.pdf))
- [Microsoft Azure](azure/README.md#quickstart) (pdf guide [SUSE SAP automation guide Azure๐Ÿ”—](https://raw.githubusercontent.com/petersatsuse/SA-SAP-Automation/master/build/SA/SA_color_en_azure.pdf))
- [Google Cloud Platform (GCP)](gcp/README.md#quickstart) (pdf guide [SUSE SAP automation guide GCP๐Ÿ”—](https://raw.githubusercontent.com/petersatsuse/SA-SAP-Automation/master/build/SA/SA_color_en_gcp.pdf))
- [OpenStack](openstack/README.md#quickstart)
- [libvirt/KVM](libvirt/README.md#quickstart)

The _SUSE SAP automation guides_ contain a lot more detailed explanations than the short quick start guides.

Each provider folder contains a minimal working configuration example
`terraform.tfvars.example`.

**Please be careful which instance type you will use! The selection of
systems certified by SAP could lead to expensive unexpected costs.**

# Troubleshooting

In case you have some issue, take a look at this [troubleshooting guide](doc/troubleshooting.md).