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:
SYBASE_ASE_TestDrive.lic
file into distrib folder, near install.sh
script.Vagrantfile
, uncomment config.vm.provision "shell", path: "scripts/provision/patch_install_script.sh"
line near the end of the file.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:
For a quick start watch this video
Confirmed to work with NW752 SP01 and the newer SP04.
git clone
)distrib
subfolder of the cloned dirVagrantfile
is)vagrant up
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).
Vagrantfile
directoryvagrant up
vagrant halt
vagrant ssh
vagrant destroy
Alternatively you can run VM directly from virtual box, Vagrant did it's job by now and now it is just a convenient option.
systemd
service controlvagrant ssh -c "<command>"
or when logged in the system with vagrant ssh
sudo systemctl status sapnw
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
)sudo journalctl -u sapnw -b
sudo journalctl -u sapnw -f
- output last message and follow new ones (useful after manual sudo 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 messagesVagrantfile
directory and started the vm ...vagrant ssh -c startsap.sh
- start sap systemvagrant ssh -c stopsap.sh
- stop sap systemspecify - 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:
set VAGRANT_SAPNW_VM_NAME=my_new_sapnw
$env:VAGRANT_SAPNW_VM_NAME="my_new_sapnw"
(mind the double-quotes !)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"
vagrant global-status
to check the name. It should be sapnw
. So the command to vm would look like vagrant up sapnw
or vagrant ssh sapnw -c <command>
startsap.sh
and stopsap.sh
are shortcuts that are placed to /usr/local/bin
during installation. They contain command like sudo -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).
1) Imho docker is supposed to be stateless. Databases should be in volumes, not inside docker layer. 2) 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.
1) 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 2) Bare ubuntu server is just ~1 GB in size 3) 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:
vb.memory = "4096"
in Vagrantfile
(and comment the one with 6GB)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
.