- SAP HANA VM Deployments
- Deployment Framework
- HANA VM Sizes and Storage Configurations
- Prerequesites for DevOps Deployments
- Setup the Azure DevOps Pipeline
- Run the Azure DevOps Pipeline
- HANA Cloud Measurement Test Results
- SAP VM Deployment
- Todo
- Troubleshooting
- FAQ
- Disclaimer
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
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.
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
-
Azure DevOps and Github account
-
SAP User for the Software Downloads
-
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.)
Use this button to setup all of the above for a basic landing zone. When done continue with 5.iii
For production workloads use the Microsoft Cloud Adoption Framework to build the SAP landing zone
-
Setup the Deployment Agent in an existing landing zone
-
Required target Subnet ID can be retrieved in cloudshell via
az network vnet subnet list -g [ResourceGroup] --vnet-name [Name] --query [].id
-
- Deploy an Ubuntu 18.04 VM. Use a public ssh-key.
- Install PowerShell
- Install Ansible 2.10.*
- Setup an Azure DevOps Deployment Agent in your landing zone Use this tested agent version 2.184.2 as the latest version doesn't handel SLES 15 SP2 correctly
- Install Azure CLI:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
and performaz login --use-device-code
. Preferable for a permanent login create a service principle
-
- 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 - 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.
- Login with your ssh user and
-
- Fork this repository in Github or create your own new Repository based on this template
- Create a Project in Azure DevOps
- 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
- Add the Ansible Extension to your DevOps Project
- 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
inAnsible/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. - In case the target networks don't have access to the internet
- Upload diskConfig.sh in the storage container and adapt variables
url-disk-cfg
in the Pipeline - Upload msawb-plugin-config-com-sap-hana.sh to the container and adapt variable
url_msawb_plugin
inAnsible/vars/defaults.yml
- Upload diskConfig.sh in the storage container and adapt variables
- Adapt Target Subnet parameter, section:
- name: vnet_subnet
in the pipeline to match your landing zone target - Setup the Azure Service Connection in project settings
- Enter the required variables to the pipeline configuration. Use the values corresponding to your target landing zone:
Now you're ready to deploy the SAP HANA VM including subsequent tasks.
-
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
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.
- SAP Installation
- HA Cluster Setup
- HANA Scale-Out Deployments
- 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
- On the deployment agent set
- Where is the HCMT result?
- How do I create the service principle?
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.