├── .editorconfig ├── .gitignore ├── Dockerfile ├── install.exp └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # see http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = tab 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | # npm is using 2 spaces when modifying package.json 13 | [package.json] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | indent_style = space 20 | indent_size = 2 21 | 22 | [install.exp] 23 | trim_trailing_whitespace = false 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build artefacts 2 | build 3 | dist 4 | 5 | # user project config 6 | .user.nabi.json 7 | 8 | # Eclipse 9 | .project 10 | .classpath 11 | .settings/ 12 | .launch 13 | .launch/ 14 | 15 | # Netbeans 16 | nb-configuration.xml 17 | 18 | # IntelliJ 19 | .idea/ 20 | *.iml/ 21 | *.iws 22 | 23 | # visual studio code 24 | .vscode 25 | 26 | # Mac 27 | .DS_Store 28 | 29 | # Maven 30 | target/ 31 | 32 | # Node 33 | node_modules 34 | npm-debug.log 35 | 36 | # bower 37 | bower_components 38 | 39 | # eslint 40 | eslint.log 41 | eslint.tap 42 | 43 | # Other 44 | todo 45 | download 46 | sapdownloads 47 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM opensuse/leap:latest 2 | 3 | ENV LANG=en_US.UTF-8 4 | 5 | RUN zypper --non-interactive install --replacefiles which hostname expect net-tools iputils wget vim iproute2 unrar less tar gzip uuidd tcsh libaio 6 | #RUN zypper refresh && zypper --non-interactive up 7 | 8 | # uuidd is needed by nw abap 9 | RUN mkdir /run/uuidd && chown uuidd /var/run/uuidd && /usr/sbin/uuidd 10 | 11 | # Copy expect script + the extracted SAP NW ABAP files to the container 12 | COPY install.exp /tmp/sapdownloads/ 13 | COPY sapdownloads /tmp/sapdownloads/ 14 | 15 | WORKDIR /tmp/sapdownloads 16 | 17 | RUN chmod +x install.sh install.exp 18 | 19 | # Important ports to be exposed (TCP): 20 | # HTTP 21 | EXPOSE 8000 22 | # HTTPS 23 | EXPOSE 44300 24 | # ABAP in Eclipse 25 | EXPOSE 3300 26 | # SAP GUI 27 | EXPOSE 3200 28 | # SAP Cloud Connector 29 | # EXPOSE 8443 30 | 31 | # Unfortunatelly, we cannot run the automated installation directly here! 32 | # Solution: run original install.sh or the automated install.exp after the image has been created 33 | # RUN ./install.exp 34 | 35 | -------------------------------------------------------------------------------- /install.exp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/expect -f 2 | # 3 | # Prepare the script to install NW ABAP without asking for user input (using expect). 4 | # For details see https://likegeeks.com/expect-command/. 5 | # 6 | # This Expect script was generated by autoexpect on Thu Apr 19 11:46:04 2018 7 | # Expect and autoexpect were both written by Don Libes, NIST. 8 | # 9 | # Note that autoexpect does not guarantee a working script. It 10 | # necessarily has to guess about certain things. Two reasons a script 11 | # might fail are: 12 | # 13 | # 1) timing - A surprising number of programs (rn, ksh, zsh, telnet, 14 | # etc.) and devices discard or ignore keystrokes that arrive "too 15 | # quickly" after prompts. If you find your new script hanging up at 16 | # one spot, try adding a short sleep just before the previous send. 17 | # Setting "force_conservative" to 1 (see below) makes Expect do this 18 | # automatically - pausing briefly before sending each character. This 19 | # pacifies every program I know of. The -c flag makes the script do 20 | # this in the first place. The -C flag allows you to define a 21 | # character to toggle this mode off and on. 22 | 23 | set force_conservative 0 ;# set to 1 to force conservative mode even if 24 | ;# script wasn't run conservatively originally 25 | if {$force_conservative} { 26 | set send_slow {1 .1} 27 | proc send {ignore arg} { 28 | sleep .1 29 | exp_send -s -- $arg 30 | } 31 | } 32 | 33 | set timeout -1 34 | set password "Down1oad" 35 | 36 | # see doco inside install.sh for options, i.e. -h -s -k -g, but we won't use any of them 37 | spawn ./install.sh 38 | 39 | expect "Your distribution 'opensuse-leap' was not tested. Do you want to continue?" 40 | send -- "yes\r" 41 | #expect "Hit enter to continue!" 42 | #send -- "\rq" 43 | expect "Do you agree to the above license terms? yes/no:" 44 | send -- "yes\r" 45 | expect "Please enter a password:" 46 | send -- "$password\r" 47 | expect "Please re-enter password for verification:" 48 | send -- "$password\r" 49 | expect eof 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SAP NW ABAP 7.52 SP01 Trial in Docker 2 | 3 | **UPDATE:** Meanwhile, SAP has published a Docker Image, for details see [SAP ABAP Platform 1909, Developer Edition: AVAILABLE NOW](https://blogs.sap.com/2021/02/15/sap-abap-platform-1909-developer-edition-available-soon/). SAP's official Docker Image is the preferred way to get the latest ABAP Dev Edition up and running easily. 4 | 5 | Useful for setting up a local ABAP for own education. Not intended for production. After all, we're putting a fat monolith into Docker. However, using Docker still allows you to keep your host system clean of all the mess any installation can cause. 6 | 7 | See my YouTube video for additional details: [Installing SAP NW ABAP 7.51 SP02 into Docker](https://www.youtube.com/watch?v=H0GEg8r7P48) 8 | 9 | Check also my blog [Installing SAP NW ABAP into Docker](https://blogs.sap.com/2018/05/30/installing-sap-nw-abap-into-docker/). There you'll find links to the whole blog series. 10 | 11 | **HINTS:** 12 | 13 | - Looking for NW ABAP 7.51 SP02? See [branch nw-abap-7.51](https://github.com/nzamani/sap-nw-abap-trial-docker/tree/nw-abap-7.51) 14 | 15 | For additional details about NW ABAP 7.52 SP04 see the [official SAP announcement by Julie Plummer](https://blogs.sap.com/2019/07/01/as-abap-752-sp04-developer-edition-to-download/). 16 | 17 | ## Attribution 18 | 19 | The Dockerfile is based on: 20 | 21 | - [This Dockerfile by Gregor Wolf](https://bitbucket.org/gregorwolf/dockernwabap750/src/25ca7d78266bef8ed41f1373801fd5e63e0b9552/Dockerfile?at=master&fileviewer=file-view-default) 22 | - [This Dockerfile by Tobias Hofmann](https://github.com/tobiashofmann/sap-nw-abap-docker/blob/master/Dockerfile) 23 | 24 | ## Instructions 25 | 26 | 1. Install [Docker](https://www.docker.com/community-edition) 27 | 28 | 1. Increase the `Disc Image Size` in your Docker preferences 29 | - Just add 100 GB to the existing value :-) 30 | - You may want to increase the `Memory` in Docker's advanced settings (I chose `6 GiB`) 31 | 32 | **IMPORTANT:** if you skip this step you may get an error during installation! 33 | 34 | 1. Set **vm.max_map_count** to avoid intsallation error 35 | 36 | For **NW ABAP 7.52** the installation tries to set **vm.max_map_count** in case it assumes it's value is too low. However, if that's the case you'll get an error similar to **sysctl: setting key "vm.max_map_count": Read-only file system**. So before starting the installation it’s important to set the value for **vm.max_map_count** to something equal to or higher than what the installation needs, otherwise the installation will try to increase the value and you’ll get the same error again and again... For me the value 1000000 worked just fine. Here is how you can change the value: 37 | 38 | - Linux: 39 | 40 | ```sh 41 | sysctl -w vm.max_map_count=1000000 42 | ``` 43 | 44 | - macOS wit Docker for Mac (FYI see also here): 45 | 46 | ```sh 47 | screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty 48 | sysctl -w vm.max_map_count=1000000 49 | ``` 50 | 51 | - Windows and macOS with Docker Toolbox 52 | 53 | ```sh 54 | docker-machine ssh 55 | sudo sysctl -w vm.max_map_count=1000000 56 | ``` 57 | 58 | Finally, check via `sysctl vm.max_map_count` and exit via `crtl+a` and `ctrl+d`. 59 | 60 | For additional details see [here](https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-cli-run-prod-mode), [here](https://deployeveryday.com/2016/09/23/quick-tip-docker-xhyve.html), and [SAP Note 900929](https://launchpad.support.sap.com/#/notes/900929) which even recommends to use the maximum possible value of 2147483647 **for the sake of simplicity** (in a slightly different context). 61 | 62 | 1. Install [Git](https://git-scm.com) 63 | 64 | On Windows I suggest to install Git Bash as well (you'll be asked during the installation process). 65 | 66 | **Hint:** Installing git is actually not really needed. Alternatively, you could also copy/download this Dockerfile etc. to your machine. 67 | 68 | 1. Clone this repo 69 | 70 | ```sh 71 | git clone https://github.com/nzamani/sap-nw-abap-trial-docker.git 72 | cd sap-nw-abap-trial-docker 73 | ``` 74 | 75 | 1. Download [SAP NW ABAP 7.52 SP01 Trial from SAP](https://developers.sap.com/germany/trials-downloads.html) (search for **7.52**), then: 76 | - create a folder `sapdownloads` inside the clone 77 | - `mkdir sapdownloads` 78 | - extract the downloaded rar files into the folder we just created (just extract the first rar file), i.e. assuming you have unrar installed (else use your tool of choice) 79 | - `unrar x TD752SP01.part01.rar ./sapdownloads` 80 | 81 | **Hint:** SAP wants to know who downloads the NW ABAP Trial version. Thus, you will have to logon with your own account before you can start the download. Creating an account is free, so is the download. The account can be the same account you use for the SAP Communitiy / SCN. 82 | 83 | 1. Build the Docker image 84 | 85 | - Without Proxy 86 | 87 | ```sh 88 | docker build -t nwabap:7.52 . 89 | ``` 90 | 91 | - Behind a Proxy 92 | 93 | ```sh 94 | docker build --build-arg http_proxy=http://proxy.mycompany.corp:1234 --build-arg https_proxy=http://proxy.mycompany.corp:1234 -t nwabap:7.52 . 95 | ``` 96 | 97 | **Hint:** In a proxy environment your `docker build` command (see above) will fail in case you don't set the proxy as mentioned above or in case you use wrong proxy settings. Also consider that you might have to set the proxy manually for some software installed in the container. 98 | 99 | 1. Create/Start a container with one of the following commands: 100 | 101 | - Use this if you want to map the default SAP ports as they come on localhost (preferred) 102 | 103 | ```sh 104 | docker run -p 8000:8000 -p 44300:44300 -p 3300:3300 -p 3200:3200 -h vhcalnplci --name nwabap752 -it nwabap:7.52 /bin/bash 105 | ``` 106 | 107 | - Use this one if "random" ports on localhost are fine for you 108 | 109 | ```sh 110 | docker run -P -h vhcalnplci --name nwabap752 -it nwabap:7.52 /bin/bash 111 | ``` 112 | 113 | **Hint:** You could also use `--rm` to make the container is removed after you exit your cli/terminal, i.e.: 114 | 115 | ```sh 116 | docker run -p 8000:8000 -p 44300:44300 -p 3300:3300 -p 3200:3200 -h vhcalnplci --rm --name nwabap752 -it nwabap:7.52 /bin/bash 117 | ``` 118 | 119 | 1. Now start the installation of SAP NW ABAP 7.52 Trial 120 | 121 | - Auto install via Expect script (suggested for simplicity) 122 | 123 | ```sh 124 | /usr/sbin/uuidd 125 | ./install.exp 126 | ``` 127 | 128 | - Or the standard way 129 | 130 | ```sh 131 | /usr/sbin/uuidd 132 | ./install.sh 133 | ``` 134 | 135 | Your installation has been successful if you see the followong message: **Installation of NPL successful** 136 | 137 | **Hint:** This installation will take about 20-30 minutes. Once done your SAP is running. Next, stop the system and exit the container. 138 | 139 | ## Starting and Stopping the NW ABAP 7.52 Trial 140 | 141 | 1. Starting the container + SAP NW ABAP Trial (use this from now on instead of `docker run ...` from above) 142 | 143 | ```sh 144 | docker start -i nwabap752 145 | /usr/sbin/uuidd 146 | su npladm 147 | startsap ALL 148 | ``` 149 | 150 | 1. Stopping SAP NW ABAP Trial and container (`ALL` can be omitted) 151 | 152 | ```sh 153 | su npladm 154 | stopsap ALL 155 | exit 156 | exit 157 | ``` 158 | 159 | **Hint:** After the second `exit` the Docker container is stopped. 160 | 161 | ## Important Post Installation Steps 162 | 163 | 1. Updating License 164 | 165 | - Open SAP GUI and logon 166 | - **User:** SAP* 167 | - **Password:** Down1oad 168 | - **Client:** 000 169 | 170 | - Open Transaction `SLICENSE` 171 | - From the Screen copy the value of field `Active Hardware Key` 172 | - Go to [SAP License Keys for Preview, Evaluation, and Developer Versions](https://go.support.sap.com/minisap/#/minisap) in your browser 173 | - Choose `NPL - SAP NetWeaver 7.x (Sybase ASE)` 174 | - Fill out the fields. Use the `Hardware Key` you copied from `SLICENSE` 175 | - Keep the downloaded file `NPL.txt` and go back to the `SLICENSE` 176 | - Delete the `Installed License` from the table 177 | - Press the button `Install` below the table 178 | - Choose the downloaded file `NPL.txt` 179 | - Done - happy learning. Now logon with the dev user. 180 | 181 | You can now logon to `client 001` with any of the following users (all share the same password `Down1oad`, typically you would work with `DEVELOPER`): 182 | 183 | - **User:** DEVELOPER (Developer User) 184 | - **User:** BWDEVELOPER (Developer User) 185 | - **User:** DDIC (Data Dictionary User) 186 | - **User:** SAP* (SAP Administrator) 187 | 188 | 1. Generating Test Data 189 | 190 | Execute the following to generate some test data: 191 | 192 | - **Report:** SAPBC_DATA_GENERATOR 193 | - **Transaction Code:** SEPM_DG 194 | 195 | 1. Suggestion: Activate the good old ping service 196 | 197 | - Go to Transaction `SICF` 198 | - Activate the node `/sap/public/ping` (default_host) 199 | - Test the HTTP and HTTPS connection with your browser 200 | 201 | - **HTTP:** [http://localhost:8000/sap/public/ping](http://localhost:8000/sap/public/ping) 202 | - **HTTPS:** [https://localhost:44300/sap/public/ping](https://localhost:44300/sap/public/ping) 203 | 204 | ## Logfiles 205 | 206 | Assuming you have started your container (not necessarily the NW ABAP in the container) and switched to user `npladm`: 207 | 208 | ```sh 209 | docker start -i nwabap752 210 | /usr/sbin/uuidd 211 | su npladm 212 | ``` 213 | 214 | Afterwards, type `alias` to see some shortcuts SAP has created for us: 215 | 216 | ```sh 217 | alias 218 | ``` 219 | 220 | One of them is `cdDi` which you can execute in you CLI: 221 | 222 | ```sh 223 | cdDi 224 | ``` 225 | 226 | Then, after hitting `ls -ahl` you know there is a directory `work`: 227 | 228 | ```sh 229 | cd work 230 | ``` 231 | 232 | This folder contains important log files for us, i.e. `dev_icm` and `dev_w0`: 233 | 234 | ```sh 235 | vi dev_icm 236 | vi dev_w0 237 | ``` 238 | 239 | Check their content (i.e. with vi) in case you're facing issues with your NW ABAP which you can't explain. For example, in case your NW ABAP has started successfully, but you cannot access the ping service via HTTP/HTTPS, you might find an issue in one of these files. 240 | --------------------------------------------------------------------------------