The sybase DB license included in the original distrib expired on March 2021. The new license can be obtained as described here: https://blogs.sap.com/2018/08/30/as-abap-7.5x-ase-license-available/
In order to include this file into a new installation:
- Place the
SYBASE_ASE_TestDrive.lic
file into distrib folder, nearinstall.sh
script. - Edit
Vagrantfile
, uncommentconfig.vm.provision "shell", path: "scripts/provision/patch_install_script.sh"
line near the end of the file. - This will adjust the
install.sh
script so that it find and copies the new licence after uncompressing the files and before start of the SAP installation.
This repo contains a Vagrant script and set of deployment scripts which installs SAP NW752 SP01 dev edition in Ubuntu in Virtual Box environment with minimal manual steps required. The target is that you copy the script, download distribs, run Vagrant which will do allmost of steps from the offical guide and some more, and then you have ready system which just needs the post install license steps. In addition to the official installation guide the script does:
- configures NW to autostart on virtual machine startup
- can optionally install github and gitlab SSL certificates to use with abapGit
- can optionally install latest abapGit
For a quick start watch this video
Confirmed to work with NW752 SP01 and the newer SP04.
- install virtual box
- install vagrant. Note: vagrant may require Powershell 3 on Window 7. If this is an issue check this.
- download this repository (as zip or
git clone
) - put uncompressed distribution files into
distrib
subfolder of the cloned dir - open shell in cloned directory (where
Vagrantfile
is) - run
vagrant up
- wait for installation to finish ... (took ~1-1.5 hours on my laptop)
- you can connect to the system and follow the post-install steps from the official guide (in particular SAP licence installation). The system will be at 127.0.0.1, 00, NPL
- optionally, run
vagrant ssh -c "sudo /vagrant/scripts/install_addons.sh"
to install SSL certificates mentioned above and latest abapGit. This can only be done AFTER licence installation.
Starting from v1.1 of this repo the scripts install sapnw as a systemd
service and enables it by default. So the netveawer should automatically start on boot (note that it will take a minute or two after the machine is up) and you should be able to connect. On the system halt the service will attempt to gracefully stop NW (with 5 min timeout). If you want to disable the service for whatever reason run vagrant ssh -c "sudo systemctl disable sapnw"
, then start/stop sap manually (see below).
- all the below assumes you started the console in the
Vagrantfile
directory - whenever you want to start NW
- start vm with
vagrant up
- start vm with
- to stop instance
- run
vagrant halt
- run
- to go inside linux
- run
vagrant ssh
- run
- completely remove virtual machine destroying all data
- run
vagrant destroy
- run
Alternatively you can run VM directly from virtual box, Vagrant did it's job by now and now it is just a convenient option.
- the following commands can be issued either with
vagrant ssh -c "<command>"
or when logged in the system withvagrant ssh
- check service status
sudo systemctl status sapnw
- starting/stopping
sudo systemctl start sapnw
- manually start the servicesudo systemctl stop sapnw
- manually stop the servicesudo systemctl enable sapnw
- enable service autostartsudo systemctl disable sapnw
- disable service autostartsudo systemctl daemon-reload
- reload service script in case you changed it manually (/etc/systemd/system/sapnw.service
)
- see the journal (start/stop output)
sudo journalctl -u sapnw -b
sudo journalctl -u sapnw -f
- output last message and follow new ones (useful after manualsudo systemctl start sapnw
)sudo cat /var/log/syslog | grep sapnw
- same but from system log (may have more info)sudo cat /var/log/syslog | grep SAPNPL
- to see sap instance messages
- useful links about systemd services digitalocean systemd guide, systemd wiki, freedesktop systemd docs
- assuming you started the console in the
Vagrantfile
directory and started the vm ... vagrant ssh -c startsap.sh
- start sap systemvagrant ssh -c stopsap.sh
- stop sap system
specify - this was deprecated in v1.3.1. Unfortunately, parsing command line args in Vagrant file conflicts with it's native args (see more in this issue). Instead a new approach was implemented via environment variables (see below).--vm-name
parameter to set virtual machine name...
The default name for VM is defined at the beginning of the Vagrant file in argMachineName
variable. It is used in the code after to define the virtual machine name. You can override it by setting VAGRANT_SAPNW_VM_NAME
environment variable for the session (or, optionally, redefine it directly in the file).
The way depends on your shell:
- cmd -
set VAGRANT_SAPNW_VM_NAME=my_new_sapnw
- powershell -
$env:VAGRANT_SAPNW_VM_NAME="my_new_sapnw"
(mind the double-quotes !) - bash -
export VAGRANT_SAPNW_VM_NAME=my_new_sapnw
or specifying the var in front of the command e.g.VAGRANT_SAPNW_VM_NAME=my_new_sapnw vagrant ssh -c "ls -AFl"
Don't forget to set the variable, especially before the sensitive commands like up
and destroy
. If you work with several instances a lot you might want to create dedicated script/batch files.
Example (cmd):
set VAGRANT_SAPNW_VM_NAME=my_new_sapnw
vagrant up
vagrant ssh -c "sudo /vagrant/scripts/install_addons.sh"
- you may start the vm from any directory but then you need to address it by id or name. Run
vagrant global-status
to check the name. It should besapnw
. So the command to vm would look likevagrant up sapnw
orvagrant ssh sapnw -c <command>
startsap.sh
andstopsap.sh
are shortcuts that are placed to/usr/local/bin
during installation. They contain command likesudo -i -u npladm startsap
A tool to setup virtual environments conveniently. No need to go through boring installation process which is a plus. Basic virtual machine is created within seconds (for popular flavors that exist in vagrant cloud repository).
- Imho docker is supposed to be stateless. Databases should be in volumes, not inside docker layer.
- Besides, docker storage layer is slower than volumes (AFAIK)
P.S.: Probably this can be solved. /sybase
directory can be mounted to volume. Also logs and transports should be considered. Well, I don't have enough basis skills for this :) Maybe someday.
P.P.S.: Docker has a lot of potential in terms of composability. E.g. compose several pods with NW dev edition, HANA express for sidecar, configured SMTP server and make them interact. Feel free to reuse the scripts from the repo, they should be very portable to docker, in fact they work inside Ubuntu so might be zero changes needed.
- Ubuntu is very popular linux flavor. The community is huge and there are a lot of materials on how to solve this or that issue
- Bare ubuntu server is just ~1 GB in size
- and yes, I know debian-like system better than other flavors ;) might be the main reason.
Currently machine is setup to consume 6GB. Though in my experiance 4GB is usually enough (ungrounded opinion). One option to decrease memory usage is to activate swap. To do this:
- uncomment
vb.memory = "4096"
inVagrantfile
(and comment the one with 6GB) - uncomment
config.vm.provision "shell", path: "scripts/add_swap.sh"
- this will activate swap during installation. Or just run it after install via ssh/vagrant/scripts/add_swap.sh
SSL certificates installation can be triggered by /vagrant/scripts/install_addons.sh
or separate /vagrant/scripts/addons/install_ssl_certificates.sh
scripts. It install the files from certificates
directory. The repositiry contains certificates of github and gitlab. However, you can add more (in *.cer format) before running the script above. The script will install all the certificates that are in the folder. In order to initiate certificate script again later (if you don't want to install certificates manually via STRUST
), login to ssh and run /vagrant/scripts/addons/install_ssl_certificates.sh
.
- Installing NetWeaver AS ABAP 7.52 SP 01 Developer Edition with Vagrant and Ubuntu
- How to easily install SAP NetWeaver developer edition 7.52 and abapGit with Vagrant in 10 man-minutes
- Video with installation process
- AS ABAP 752 SP01, developer edition, official announce
- AS ABAP 7.52 SP01, developer edition: Concise installation guide
- got some script ideas (expect) from https://github.com/tobiashofmann/sap-nw-abap-docker
- https://github.com/wechris/SAPNW75SPS02 as an inspiration
- concept on how to create additional VB drives in VM folder from https://gist.github.com/leifg/4713995
- cool guide on swap file in ubuntu: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
- @filak-sap and https://github.com/filak-sap/sap-nw-abap-docker for ideas and inspiration
- https://github.com/SAP/node-rfc - nodejs lib to call SAP RFCs, used for SSL certificate installation
- @marcellourbani for his https://github.com/marcellourbani/abap-adt-api (cool!)
- AS ABAP 752 SP04, developer edition: NOW AVAILABLE
- AS ABAP 7.52 SP04, Developer Edition: Concise Installation Guide
- download github/lab certificates directly from internet ?
- migrate to Ubuntu 18.04 LTS (Bionic Beaver)
- improve abapdeploy.js
- early detect presence of distrib