Skip to content

Deploy a SAP HANA DB VM + FS Setup + OS Preparations + DB Installation + Backup Setup + Azure Monitoring Extension for SAP + Performance Testing + Cleanup

License

Notifications You must be signed in to change notification settings

enterprise-1701-d/sap-hana-vm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

SAP HANA VM Deployments

This repository is used to deploy SAP HANA Databases 2.0 with Azure DevOps including the following options:

  • SLES 12 & 15
  • RHEL 7 & 8
  • VM sizes from 128GB to 12TB
  • OS Preparation with required patches and configurations according to relevant SAP notes
  • HANA 2.0 Installation
  • Backup Integration into an Azure Recovery Service Vault including execution of initial OS & HANA backups
  • Selective disk backup, which excludes hana log & data disks from the OS backups
  • Setup Azure Monitoring Extension for SAP
  • Execution of HANA Cloud Measurement Tool (HCMT)
  • Removal of the complete deployment

Deployment Framework

The DevOps Pipeline is used as a GUI to simplify deployments. It fetches the pipeline from the GitHub repository. The GitHub repository itself can be most easily adapted to your landing zone specifics with Visual Studio Code on your local PC. In the grey rectangle we see the Ubuntu VM which acts as deployment agent and the require Azure ressources like VNET, DNS, Storage, etc.

Deployment Architecture

HANA VM Sizes and Storage Configurations

Size HANA VM HANA VM Storage (EXE + DATA + LOG + SHARE + BACKUP)
128_GB E16ds_v4 1xP6(64GB) + 3xP6(64GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
160_GB E20ds_v4 1xP6(64GB) + 4xP6(64GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
192_GB M32ts 1xP6(64GB) + 4xP6(64GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
256_GB M32ls 1xP6(64GB) + 4xP6(64GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
384_GB E48ds_v4 1xP6(64GB) + 3xP15(256GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
512_GB M64ls 1xP6(64GB) + 4xP10(128GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
875_GB M64ls 1xP6(64GB) + 4xP15(256GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
1.000_GB M64ds_v2 1xP6(64GB) + 4xP15(256GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
1.792_GB M64dms_v2 1xP6(64GB) + 4xP20(512GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
2.000_GB M128ds_v2 1xP10(128GB) + 4xP20(512GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
2.850_GB M208s_v2 1xP10(128GB) + 4xP30(1024GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
3.892_GB M128dms_v2 1xP10(128GB) + 5xP30(1024GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
5.700_GB M208ms_v2 1xP10(128GB) + 4xP40(2048GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
11.400_GB M416ms_v2 1xP10(128GB) + 4xP50(4096GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)

Note: Eds_v4 Series use premium disk without write accellerations, therefore this is recommended for Non-PRD envrionments only

Deploy only a HANA VM and Storage via ARM

Deploy HANA VM to Azure

Prerequesites for DevOps Deployments

  1. Azure Subscription

  2. Azure DevOps and Github account

  3. SAP User for the Software Downloads

  4. Basic Resources

    • VNET + Subnets + NSGs
    • Recovery Service Vault with Policies for HANA & OS Backups
    • Storage Accounts (For SAP binaries, Scripts & Boot Diagnostics)
    • Private DNS Zone
    • Bastion Host
    • DevOps Deployment Agent
    • Windows 10 Admin Host (For HANA Studio, SAPGui, Easy SAPBits Upload to storage account, etc.)

    Deploy the Basic Resources

    Use this button to setup all of the above for a basic landing zone. When done continue with 5.iii

    Deploy to Azure

    For production workloads use the Microsoft Cloud Adoption Framework to build the SAP landing zone

  5. Setup the Deployment Agent in an existing landing zone

    1. Option A) With this ARM-Template

      Deploy DevOps Agent to Azure

      Required target Subnet ID can be retrieved in cloudshell via az network vnet subnet list -g [ResourceGroup] --vnet-name [Name] --query [].id

    2. Option B) Manually

    3. Finalize the Deployment Agent Setup

      • Login with your ssh user and cd devopsagent ; ./config.sh -> follow the prompts and enter required information, have the PAT (personal access token) from DevOps ready see here where to retrieve the PAT script prompts and required entries
      • Ensure the deployment agent software is automatically started as a service after each reboot: sudo ./svc.sh install ; sudo ./svc.sh start
      • az login. You might want to use a service principle
      • Save your private ssh-key in ~/.ssh/id_rsa (ensure 600 file permission). This ensures possible login from the deployment agent to the HANA VM which is required for Ansible activities.

Setup the Azure DevOps Pipeline

  1. Fork this repository in Github or create your own new Repository based on this template
  2. Create a Project in Azure DevOps
  3. In the DevOps Pipeline Area
    • Create a "New Pipeline"
    • Where is your code? => "GitHub"
    • Select a repository => "<git-user>/sap-hana-vm"
    • Configure your pipeline => "Existing Azure Pipeline YAML file"
    • Branch "Main"
    • Path "/DevOpsPipeline/hana-vm.yml"
    • Continue and Click on the right side of the Run button to "Save"
    • Optionally change the name in the Pipeline overview
    • In the process you will need to connect your Github Repository with Azure DevOps details here
  4. Add the Ansible Extension to your DevOps Project
  5. Download the required SAP Binaries SAPCAR*, IMDB_SERVER*, optionally HCMT* and XSA components. Store the files in a storage container. Get the URLs from the storage container and update the variables url_sapcar, url_hdbserver, url_hcmt in Ansible/vars/defaults.yml. An easy way to download the SAP binaries is on the sapwinadmin host where you can connect with the Azure Bastion Service. From there you can upload to the Storage Account via the Azure Portal.
  6. In case the target networks don't have access to the internet
  7. Adapt Target Subnet parameter, section: - name: vnet_subnet in the pipeline to match your landing zone target
  8. Setup the Azure Service Connection in project settings
  9. Enter the required variables to the pipeline configuration. Use the values corresponding to your target landing zone: Variables

Run the Azure DevOps Pipeline

Now you're ready to deploy the SAP HANA VM including subsequent tasks.

  • Run the pipeline Run Pipeline
  • Provide inputs as required Pipeline Inputs

HANA Cloud Measurement Test Results

  • The tests run a couple of hours. Once the execution is completed it will create a file here: [hanavm]:/hana/shared/install/setup/hcmtresult-<timestamp>.zip

  • You need to upload the results file on a SAP web site to check if the systems meet the configuration and performance requirements. Upload link: https://hotui-supportportal.dispatcher.hana.ondemand.com/index.html

  • More information on HCMT in this blog

    Example:

SAP VM Deployment

Use this ARM template to deploy the SAP Application VMs. Automated SAP Installation and deployment via an Azure DevOps Pipeline functionality will be added soon.

Deploy SAP VM to Azure

Todo

  • SAP Installation
  • HA Cluster Setup
  • HANA Scale-Out Deployments

Troubleshooting

  • ARM deployment fails because the URL to the diskConfig.sh Script is not reachable from the deployed VM. In this case login to the VM and try with wget to download the script. Use your own container in your storage account and ensure it's reachable from VMs in the target subnet
  • During Stage "Prepare_OS" ssh connection must work from the deployment agent to the HANA VM. In case of troubles try to connect from the agent maually via ssh and solve the issue. Connection must work without interactive ssh prompts. You might need to set StrictHostKeyChecking no in ~/.ssh/config when deploying VMs with different names to the same IP
  • HANA Installation fails when using forbidden SID: ADD, ALL, AMD, AND, ANY, ARE, ASC, AUX, AVG, BIT, CDC, COM, CON, DBA, END, EPS, FOR, GET, GID, IBM, INT, KEY, LOG, LPT, MAP, MAX, MIN, MON, NIX, NOT, NUL, OFF, OLD, OMS, OUT, PAD, PRN, RAW, REF, ROW, SAP, SET, SGA, SHG, SID, SQL, SUM, SYS, TMP, TOP, UID, USE, USR, VAR
  • The pipeline fails in step "Prepare OS
    • ~/.ssh/id_rsa file is missing or has wrong permissions.
    • Add host_key_checking = False to the ansible configuration file /etc/ansible/ansible.cfg. This will prevent ssh prompts during first logins.
  • Ansible stages do not run
    • Try to run the Ansible command on the deployment agent manually
    • Therefore clone the code on the deployment agent:
      • git clone https://github.com/<your-git-user-id>/sap-hana-vm.git
      • Add the fqdn of the VM into the file /etc/ansible/hosts
      • cd sap-hana-vm
      • Execute: ansible-playbook -vvvv Ansible/os-settings_playbook.yml
      • Analyse the now more detailed debugging information due to option "-vvvv"
  • Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user
    • On the deployment agent set allow_world_readable_tmpfiles = True in /etc/ansible/ansible.cfg

FAQ

Disclaimer

THIS REPOSITORY AND ALL IT'S CONTENT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

About

Deploy a SAP HANA DB VM + FS Setup + OS Preparations + DB Installation + Backup Setup + Azure Monitoring Extension for SAP + Performance Testing + Cleanup

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 53.7%
  • Jinja 24.9%
  • Shell 21.4%