Last active
March 6, 2020 07:32
-
-
Save krasnobaev/433847a25c8fc2b7844098792b9784f0 to your computer and use it in GitHub Desktop.
hana express deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOURCE https://developers.sap.com/tutorials/hxe-ua-install-using-docker.html | |
# Step 4: Download the SAP HANA, express edition Image from the Docker Library | |
```bash | |
docker login | |
docker pull store/saplabs/hanaexpressxsa:2.00.045.00.20200121.1 | |
``` | |
# Step 5: Edit the host sysctl.conf file and reboot to apply changes | |
```bash | |
echo 'fs.file-max=20000000' >> /etc/sysctl.conf | |
echo 'fs.aio-max-nr=262144' >> /etc/sysctl.conf | |
echo 'vm.memory_failure_early_kill=1' >> /etc/sysctl.conf | |
echo 'vm.max_map_count=135217728' >> /etc/sysctl.conf | |
echo 'net.ipv4.ip_local_port_range=40000 60999' >> /etc/sysctl.conf | |
``` | |
# Step 6: (Optional) Create a Directory to Persist SAP HANA, express edition Data Outside of the Container | |
```bash | |
mkdir -p /data/hanahxe | |
chown 12000:79 /data/hanahxe | |
``` | |
# Step 7: Set Up Password for SAP HANA, express edition | |
```bash | |
echo '{"master_password" : "HANApass12@#"}' > /data/hanahxe/credentials.json | |
chmod 600 /data/hanahxe/credentials.json | |
chown 12000:79 /data/hanahxe/credentials.json | |
``` | |
# Step 8: Start SAP HANA, express edition Container | |
```bash | |
docker run \ | |
-h hxehost \ | |
-p 1128-1129:1128-1129 \ | |
-p 39000-39099:39000-39099 \ | |
-p 51000-51099:51000-51099 \ # 51036 - XSA-Cockpit | |
-p 53000-53099:53000-53099 \ | |
-p 59000-59099:59000-59099 \ | |
-v /data/hanahxe:/hana/mounts \ | |
--ulimit nofile=1048576:1048576 \ | |
--sysctl kernel.shmmax=1073741824 \ | |
--sysctl net.ipv4.ip_local_port_range='40000 60999' \ | |
--sysctl kernel.shmmni=524288 \ | |
--sysctl kernel.shmall=8388608 \ | |
--add-host=hxe.yourdomain.ru:127.0.0.1 \ | |
--name hxetest1 \ | |
store/saplabs/hanaexpressxsa:2.00.045.00.20200121.1 \ | |
--passwords-url file:///hana/mounts/credentials.json \ | |
--agree-to-sap-license | |
``` | |
# helpers | |
## health checks | |
```bash | |
docker exec -it hxetest1 bash | |
HDB info | |
hdbsql -i 90 -u SYSTEM -p HANApass12@# | |
xs login | |
xs apps | |
``` | |
## rename instance | |
hxeadm password is "HXEHana1" | |
```bash | |
docker exec -uroot -it hxetest1 bash | |
vi /hana/shared/HXE/global/hdb/custom/config/xscontroller.ini | |
default_domain = hxe.yourdomain.ru | |
api_url = https://hxe.yourdomain.ru:39030 | |
cd /hana/shared/HXE/hdblcm | |
./hdblcm --action=rename_system --hostmap=hxehost=hxe.yourdomain.ru | |
exit | |
docker exec -it hxetest1 bash | |
XSA reset-certificate | |
``` | |
# references | |
* https://developers.sap.com/tutorials/hxe-ua-install-using-docker.html | |
* https://github.com/SAPDocuments/Tutorials/issues/2389 | |
* https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/2.0.00/en-US/5eb88b11192b43bf8da3abeefda23231.html | |
* https://blogs.sap.com/2018/06/20/hana-express-and-xs-advanced-when-you-cannot-modify-the-hosts-file.../ | |
* https://blogs.sap.com/2020/02/24/installing-hana-express-2.0-and-xsa-configuration/ | |
* https://blogs.sap.com/2018/09/26/upgrading-hana-xsa-webide/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment