Home

Awesome

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

Build Status🔗

Supported terraform version 1.1.X


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

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

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

Products

This repository supports deployment with following products:

VendorProduct
SUSESUSE Linux Enterprise Server for SAP Applications 12 SP5 <br> Certification: SLES for SAP🔗 and SAP Process Automation🔗
SUSESUSE Linux Enterprise Server for SAP Applications 15 SP4 (or older)<br> Certification: SLES for SAP🔗 and SAP Process Automation🔗
SAPSAP HANA 2.0 with SPS >= 02
SAPSAP NETWEAVER 7.5 (and later)
SAPSAP S/4HANA 1610
SAPSAP S/4HANA 1709
SAPSAP S/4HANA 1809
SAPSAP S/4HANA 1909
SAPSAP S/4HANA 2020
SAPSAP S/4HANA 2021

Cloud Providers

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

VendorProductCertification
AmazonAmazon Web Services (AWS)SAP Hardware Directory for AWS🔗
MicrosoftAzureSAP Hardware Directory for Azure🔗
GoogleGoogle Cloud Platform (GCP)SAP Hardware Directory for GCP🔗
OpenInfraOpenStackDepends on deployed hardware, <br> get an overview in SAP's Hardware Directory🔗
libvirt.orgLibvirtnot certified

Features

The following features are implemented:

FeatureAWSAzureGCPOpenStackLibvirt
SUSE saptune / SAP sapnotes <br> SUSE's saptune is applied with the correct solution template to configure the systems based on SAP sapnotes recommendations. <br> For additional information see Tuning Systems with saptune🔗.
HANA single node <br> Deployment of HANA on a single node. <br> For additional information see SAP Hardware Directory for AWS🔗
HANA Scale-Up - performance optimized <br> Deployment of HANA with system replication in a performance optimized setup. <br> For addition information see SAP HANA System Replication Scale-Up - Performance Optimized Scenario🔗.
HANA Scale-Up - cost optimized <br> Deployment of HANA with system replication in a cost optimized (additional tenant DB) setup. <br> For additional information see SAP HANA System Replication Scale-Up - Cost Optimized Scenario🔗.
HANA Scale-Out - performance optimized <br> Deployment of HANA Scale-Out (multi node) with system replication in a performance optimized setup. <br> For additional information see SAP HANA System Replication Scale-Out - Performance Optimized Scenario🔗 and SAP HANA System Replication Scale-Out High Availability in Amazon Web Services🔗.
HANA Scale-Out - with standby nodes (HANA Host-Auto-Failover) <br> Deployment of HANA Scale-Out (multi node) with system replication and Host-Auto-Failover via standby nodes. <br> For additional information see Setting Up Host Auto-Failover🔗 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🔗.🚫🚫
SAP S/4HANA ENSA 1 <br> Deployment of a SAP S/4HANA in Enqueue Replication (ENSA) 1 scenario. <br> For additional information see SAP NetWeaver Enqueue Replication 1 High Availability Cluster - Setup Guide for SAP NetWeaver 7.40 and 7.50 🔗.
SAP S/4HANA ENSA 2 <br> Deployment of a S/4HANA in Enqueue Replication (ENSA) 2 scenario. <br> For additional information see SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide 🔗.
SAP S/4HANA single PAS <br> Deployment of a single S/4HANA PAS (primary instance). <br> For additional information see SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide 🔗.
SAP S/4HANA High Availability Cluster <br> Deployment of a full SAP S/4HANA stack including ASCS, ERS, PAS and AAS (multiple) instances. <br> For additional information see SAP S/4HANA - Enqueue Replication 2 High Availability Cluster - Setup Guide 🔗.
Deployment in different Availability Zones/Sets <br> Deployment of virtual instances in different Availability Zones/Sets for HA on hardware level.

Legend:

SymbolExplanation
feature implemented in this repository
not implemented in this repository
🚫not recommended by vendor

Project Structure

This project heavily uses terraform🔗 and salt🔗 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🔗 and 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

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

The SAP software media has to be available and prepared according to Preparing SAP software.

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 ./<provider>/README.md or linked below:

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.