Friday 10 July 2020

Install the Four Pillars of a Quality Organization to Create Better Products

Docker Containers subject has been rolling around for quite some time now. Even it has gained much more interest with SAP R&D team for reducing the hardware cost, resource consumption, easy maintenance, etc…  There has been many blogs and research already rolling out on this subject integrating SAP with Docker containers.

For a many months now, even SAP LABS people are constantly working on and releasing SAP HANA Express edition Docker image ready edition to use in Docker Hub, using which we can directly try SAP HANA Express Edition for free up to 32GB RAM usage. There are two images provided, one with SAP HANA Express Edition DB only image and other with SAP HANA Express Edition + XS Applications.

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

Therefore, in this blog I am going to explain how to install SAP HANA Express Edition + XS Application Docker image with systematic instructions.

System Requirements


Memory: 24GB Minimum (I am using 32GB)
CPU: 4 Minimum (I am using 8 CPU)
HDD: 80GB (I am using 200GB)
Host OS: Any OS which can run Docker engine (I am using Ubuntu Server 20.04 LTS)
Docker engine version 19.0+

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

Instructions


1. We need to prepare Docker engine and the Host compatible to run HANA Express edition, so first need to add overlay storage driver with ext4 or xfs file system as backend. Create or edit the file /etc/docker/daemon.json and add/modify the below lines. Note:-Please do not use “devicemapper” as storage driver it is no longer supported.

{
"storage-driver": "overlay2"
}

Then Restart Docker service to make the changes effective.

#>systemctl restart docker.service

2. Add required kernel parameters on the host machine to support HANA database container by adding the below entries to /etc/sysctl.conf file. Once added run “/sbin/sysctl -p” command to make the changes effective.

fs.file-max=20000000
fs.aio-max-nr=262144
vm.memory_failure_early_kill=1
vm.max_map_count=135217728
net.ipv4.ip_local_port_range=60000 65535

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

3. Make sure you have added the host entry to /etc/hosts file for the hostname of HANA container host.

#>sh -c 'echo <hxehost_IP_address>    hxehost >> /etc/hosts'​

4. Next Login to your Docker Hub account to pull HANA Express edition container image.

#>sudo docker login​

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

5. tup Password for HANA express Edition. We can create our own password for HANA and applications Login by creating a master password file. For that create a a json file which contains password. In our case i have used /data/haexp directory and created a json file with name maspasswd.json. We can even specify a single master password or individual password for system and tenant DB. The password must comply with the rules like at least 8 character in length, 1 upper case, 1 lower case and 1 number letter must be present. Also make sure the permission for the file is modified as below.

{
"master_password" : "<password>"
}

or for multiple password

{
"system_user_password" : "<password>",
"default_tenant_system_user_password" : "<second_password>"

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

6. We are ready now to launch HANA Express container. To pull the image and get the container running we can use the below command.

Note:- In the Docker Hub Documentation it has mentioned to keep kernel.shmmni=524288. However, this value is not accepted by container so had to keep a value lower where i have used kernel.shmmni=4096. Here we are not using proxy server for internet connection so those command lines are not included.

docker run -p 39013:39013 -p 39015:39015 -p 39041-39045:39041-39045 -p 1128-1129:1128-1129 -p 59013-59014:59013-59014  -p 39030-39033:39030-39033 -p 51000-51060:51000-51060  -p 53075:53075  \
-h hxehost \
-v /data/haexp:/hana/mounts \
--ulimit nofile=1048576:1048576 \
--sysctl kernel.shmmax=1073741824 \
--sysctl net.ipv4.ip_local_port_range='60000 65535' \
--sysctl kernel.shmmni=4096 \
--sysctl kernel.shmall=8388608 \
--name hxecont \
store/saplabs/hanaexpressxsa:2.00.045.00.20200121.1 \
--agree-to-sap-license \
--passwords-url file:///hana/mounts/maspasswd.json​

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

7. Once we get the message as ‘Startup finished!’ message, it indicates that the container image build and instance creation is complete. We can now start using the HANA Database. First of open a new SSH session of the same host leaving the start-up screen as is. Moreover, we can login to Docker instance using the below command, then try checking HDB info to check the DB & application run status.

#>docker exec -it <container_name> bash​

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

8. Further, we can test the XSA login from command prompt, also use the browser navigation for login, and check XSA cockpit, HANA Admin cockpit, HANA cockpit, Web IDE etc… Make sure you add host entry of the Docker engine host from where you are trying to login via Web browser.

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

XSA Cockpit


SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

HANA Admin Cockpit


SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

HANA Cockpit


SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

HANA License Info


SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

Web IDE (https://hxehost:53075)


SAP HANA Study Material, SAP HANA Exam Prep, SAP HANA Tutorial and Material, SAP HANA Learning

No comments:

Post a Comment