Skip to content
/ sap-hana-vm Public template
forked from mimergel/sap-hana-vm

Deploy a HANA DB VM -> FS Setup -> -> OS Preparations -> DB Installation -> Backup Setup -> Performance Testing -> Cleanup

Notifications You must be signed in to change notification settings

maxvolkm/sap-hana-vm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAP HANA VM deployments

This Repository can be used with Azure DevOps to deploy a SAP HANA DB 2.0 with the following features:

  • 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 DB Installation
  • Backup Integration into an Azure Recovery Service Vault including execution of initial OS & HANA backups
  • Selective disk backup (removing hana log & data from OS backups)
  • Execution of HANA Clound Measurement Tool (HCMT)
  • Removal of the complete deployment

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

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)
512_GB M64ls 1xP6(64GB) + 4xP10(128GB) + 3xP10(128GB) + 1xP20(512GB) + 1xP20(512GB)
1.000_GB M64s 1xP6(64GB) + 4xP15(256GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
1.792_GB M64ms 1xP6(64GB) + 4xP20(512GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
2.000_GB M128s 1xP10(128GB) + 4xP20(512GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
2.850_GB M208sv2 1xP10(128GB) + 4xP30(1024GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
3.892_GB M128ms 1xP10(128GB) + 5xP30(1024GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
5.700_GB M416sv2 1xP10(128GB) + 4xP40(2048GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)
11.400_GB M416msv2 1xP10(128GB) + 4xP50(4096GB) + 3xP15(256GB) + 1xP30(1TB) + 1xP30(1TB)

Prerequesites

  1. Azure Subscription
  2. Azure DevOps and Github account
  3. S-User for SAP Software Downloads
  4. Basic Resources
    • VNET + Subnet
    • Recovery Service Vault with Policies for HANA & OS Backups, "HANA-Non-PRD", "HANA-PRD", "OS-Non-PRD", "OS-PRD"
    • Storage Account (For SAP binaries, Scripts & Boot Diagnostics)
    • Private DNS Zone (Makes everything easier)
    • For green field deployments and especially production workloads please consider using the Microsoft Cloud Adoption Framework for SAP on Azure
  5. Setup your own DevOps Deployment Agent within the same or peered VNET
    • Option A) Manually

      • Deploy an Ubuntu 18.04 VM. Use a public ssh-key
      • Store you private ssh-key in ~.ssh/id_rsa. Ensure correct file permission. This step is required for Ansible remote ssh to deployed HANA VMs
      • Install PowerShell
      • Install Ansible 2.10.*
      • Setup an Azure DevOps Deployment Agent in your landing zone
      • Add your private ssh key to the os user on the agent (.ssh/id_rsa)
      • Install Azure CLI: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash and perform az login --use-device-code. Preferable for a permanent login create a service principle
      • User a puplic ssh-key
    • Option B) With this ARM-Template

      Deploy To Azure

      • Complete the DevOps Deployment Agent Setup with
        1. 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
        2. sudo ./svc.sh install ; sudo ./svc.sh start
        3. az login
        4. put your private ssh-key in ~.ssh/id_rsa (ensure 600 file permission)

Deployment via Azure DevOps

  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 => "/sap-hana-vm"
    • Configure your pipeline => "Existing Azure Pipeline YAML file"
    • Branch "Main"
    • Path "/DevOpsPipeline/azure-pipelines.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. Enter your required variables to the pipeline configuration, example here
  5. Add the Ansible Extension to your DevOps Project
  6. Download the SAP Binaries IMDB_SERVER*, HCMT* & SAPCAR* and store them in a storage container. Get the new URLs from for the files and update the variables url_sapcar, url_hdbserver, url_hcmt in Ansible/vars/defaults.yml
  7. Upload diskConfig.sh in the container and adapt variables url-disk-cfg in the Pipeline
  8. Upload msawb-plugin-config-com-sap-hana.sh to the container and adapt variable url_msawb_plugin in Ansible/vars/defaults.yml
  9. Adapt Target Subnet parameter, section: - name: vnet_subnet in the pipeline to match your landing zone target
  10. Setup the Azure Service Connection in project settings
  11. Run the pipeline

Todo in future releases

  • ASCS & DI Installation
  • Cluster Setup

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
  • ...

FAQ

  • Where is the HCMT result? => :/hana/shared/install/setup/hcmtresult-.zip
  • ...

About

Deploy a HANA DB VM -> FS Setup -> -> OS Preparations -> DB Installation -> Backup Setup -> Performance Testing -> Cleanup

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 49.5%
  • Jinja 27.8%
  • Shell 22.7%