Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
wechris committed Oct 21, 2018
1 parent 2ae0167 commit 91451d9
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 2 deletions.
142 changes: 140 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,140 @@
# SAPNW752SP01
Vagrant Box to install SAP NetWeaver AS ABAP 752 SP01 Developer Edition
Introduction
============
The openSUSE Leap 42.3 Vagrant box can be used to create a VirtualBox instance with Vagrant to install [SAP NW AS ABAP 752 SP01 Developer Edition](https://blogs.sap.com/2018/09/13/as-abap-752-sp01-developer-edition-to-download/#comment-437359) .

All recommended system preparations are done by packer and vagrant, as described at [Installing ABAP AS on Oracle VirtualBox](https://blogs.sap.com/2018/09/13/as-abap-752-sp01-developer-edition-to-download/) without the proxy part.

The pre-built Vagrant Box is now avaiable on HashiCorps Vagrant Cloud:

https://app.vagrantup.com/wechris

The Packer calls are no longer necessary. If you want to create your own Vagrant Box with Packer see the optional section below.

The step D.1. ***sudo -i*** and ***FINALLY, we run the installation, by entering the command ./install.sh*** must be done manually!

Prerequisites
=============

On OS X VirtualBox and Vagrant, is available via [Homebrew](http://brew.sh/) on Windows via [Chocolatey](https://chocolatey.org).

OS X:
```
$ brew install virtualbox
$ brew install vagrant
```
optional:
```
$ brew install vagrant-manager
```

Usage
=====
Clone the reporitory [wechris/SAPNW752SP01](https://github.com/wechris/SAPNW752SP01).

Download and extract the [TD752SP01.partXX.rar](https://www.sap.com/developer/trials-downloads/additional-downloads/sap-netweaver-as-abap-developer-edition-sp01-7-52-15510.html) files to the folder: *./sapinst*

The actual download (in the form of several .rar files), along with more information, is available here:

[SAPStore: ABAP 7.52SP01](https://store.sap.com/sap/cp/ui/resources/store/html/SolutionDetails.html?pid=0000014492&catID=&pcntry=DE&sap-language=EN&_cp_id=id-1477346420741-0)

```
./sapinst/TD752SP01
```

**Vagrant**

Only VirtualBox:

If the german keyboard is not desired, comment the following line in the vagrant file
````
# config.vm.provision "shell", path: "install/changetogerman.sh"
````
If the gnome desktop is not desired, comment the following line in the vagrant file
````
# config.vm.provision "shell", path: "install/gnome.sh"
````

```
vagrant up --provision --provider virtualbox
```

Wait until the vagrant command is finished. Then restart the instance with:
```
vagrant reload
```

Now you can use the VirtualBox UI:

**Login**

Logins:
- vagrant/vagrant
- root/vagrant

or use SSH into a running Vagrant machine:
```
vagrant ssh
```

**Install SAP NW AS ABAP 752 SP01 Developer Edition**

The files and folder, on the same level as the vagrant file, will be available under /vagrant
````
sudo -i
<enter pwd>
cd /vagrant/sapinst
./install.sh -s
````
Installation options:

* ./install.sh – installs the Developer Edition in dark mode, the installer will configure the SAP system for usage of the physical hostname
* ./install.sh -g– will present you a SAPINST GUI allowing you to modify certain system parameters
* ./install.sh -h <own hostname>– allows you to specify your own hostname to be used by the SAP system
* ./install.sh -s – allows you to skip the hostname check )

Read and accept the license agreement.
When prompted for the OS users password enter your master password of the virtual Linux OS instance.

Start the SAP system:
- Switch to user npladm in the console : **su npladm**
- Start the SAP system : **startsap ALL**

![SAPNetWeaver7_52SP01__Running](./img/SAPNetWeaver7_52SP01__Running.jpg)

**Post and optional installation steps**

Additional informations, License key and first steps follow [SAP NW AS ABAP 7.52 SP1 – Developer Edition to Download: Concise Installation Guide](https://blogs.sap.com/2018/09/13/as-abap-7.52-sp01-developer-edition-concise-installation-guide/)

Start/Stop the VBox with:
````
vagrant up
vagrant halt
````
or with the virtualbox UI.
![Oracle_VM_VirtualBox_Manager](./img/Oracle_VM_VirtualBox_Manager.jpg)

![SAGUI](./img/sapgui.jpg)

Optional
=====

The Packer template to build the openSUSE Leap 42.3 Vagrant box is available [here](https://github.com/wechris/SAPNW752SP01/tree/master/packer/openSUSE-42.3)

**Packer**
```
cd packer
cd openSUSE-42.3
$ packer build -only=virtualbox-iso template.json
```

And change the following line in the Vagrant file:
```
config.vm.box = "openSUSE-42.3"
config.vm.hostname = "vhcalnplci"
config.vm.box_url = "./packer/openSUSE-42.3/openSUSE-42.3-virtualbox.box"
# config.vm.box = "wechris/openSUSE-42.3_sapnw751"
# config.vm.hostname = "vhcalnplci"
# config.vm.box_version = "1.0.0"
```
The Vagrant box will be loaded locally.
103 changes: 103 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
# config.vm.box = "openSUSE-42.3"
# config.vm.hostname = "vhcalnplci"
# config.vm.box_url = "./packer/openSUSE-42.3/openSUSE-42.3-virtualbox.box"

config.vm.box = "wechris/openSUSE-42.3"
config.vm.hostname = "vhcalnplci"
config.vm.box_version = "1.0.0"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 8000, host: 8000, id: "http", auto_correct: true
config.vm.network "forwarded_port", guest: 44300, host: 44300, id: "https", auto_correct: true
config.vm.network "forwarded_port", guest: 3300, host: 3300, id: "rfc", auto_correct: true
config.vm.network "forwarded_port", guest: 3200, host: 3200, id: "sapgui", auto_correct: true
config.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", auto_correct: true
#config.vm.network "forwarded_port", guest: 3306, host: 3603

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.synced_folder "", "/vagrant", :owner => "vagrant"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.name = "SAPNetWeaver7.52SP01"
vb.gui = true
vb.linked_clone = true

#vb.customize ["modifyvm", :id, "--nic2", "natnetwork", "--nat-network2", "test", "--nictype2", "virtio"]
# vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
# vb.customize ["modifyvm", :id, "--nictype2", "virtio"]

# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "8192", "--cpus", "2"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--vram", "32"]
end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL

# Installations###
# Comment the line to not to install some tool. ###
# These tools are not optional. They are used by the others installations scripts.
# config.vm.provision "shell", path: "install/uuidd.sh"

config.vm.provision "shell", path: "install/changetogerman.sh"

config.vm.provision "shell", path: "install/sapinst.sh"

config.vm.provision "shell", path: "install/gnome.sh"

end
Binary file added img/Oracle_VM_VirtualBox_Manager.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/SAPNetWeaver7_52SP01__Running.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cmdlist.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/sapgui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions install/changetogerman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

echo "change keyboard and language..."
sudo sed -i 's/"english-us,pc104"/"german,pc104"/g' /etc/sysconfig/keyboard
sudo sed -i 's/"en_US.UTF-8"/"de_DE.UTF-8"/g' /etc/sysconfig/language
sudo sed -i 's/"en_US"/"de_DE"/g' /etc/sysconfig/language
sudo echo "KEYMAP=de-latin1-nodeadkeys" > /etc/vconsole.conf
sudo sed -i 's/"KEYMAP=us"/"KEYMAP=de-latin1-nodeadkeys"/g' /etc/vconsole.conf
sudo mkinitrd
sudo localectl set-keymap de
21 changes: 21 additions & 0 deletions install/gnome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
echo "install Gnome..."
sudo zypper ar obs://GNOME:/STABLE:/3.16/openSUSE_13.2/GNOME:STABLE:3.16
sudo zypper mr -p 98 -r GNOME:STABLE:3.16
sudo zypper dup --from GNOME:STABLE:3.16
zypper install gnome-shell metatheme-adwaita-common gnome-shell-lang gnome-desktop-lang
zypper --non-interactive install --force-resolution --no-confirm --auto-agree-with-licenses patterns-openSUSE-gnome

sudo sed -i 's/"sddm"/"gdm"/g' /etc/sysconfig/displaymanager
sudo echo "/usr/bin/Xorg root:root 4711" >> /etc/permissions.local
sudo ln -svf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target
sudo chkstat --system --set

echo "install JAVA..."
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.rpm
sudo zypper --non-interactive remove --force-resolution 'java*'
sudo ln -s /usr/sbin/update-alternatives /usr/sbin/alternatives
sudo rpm -ivh --nodeps /home/vagrant/jdk-8u191-linux-x64.rpm

sudo alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.8.0_191-amd64/bin/java" 1
sudo update-alternatives --set java /usr/java/jdk1.8.0_191-amd64/bin/java

11 changes: 11 additions & 0 deletions install/sapinst.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
echo "modify hostname..."
sudo echo "10.0.2.15 vhcalnplci vhcalnplci.dummy.nodomain" > /etc/hosts

echo "install tcsh..."
zypper --non-interactive --gpg-auto-import-keys in --auto-agree-with-licenses tcsh

echo "chmod install.sh..."
if [ -f /vagrant/install.sh ]
then
sudo chmod +x /vagrant/install.sh
fi
4 changes: 4 additions & 0 deletions install/uuidd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

echo "start uuidd..."
sudo zypper --non-interactive install uuidd
sudo service uuidd start
Empty file added sapinst/all_files_here
Empty file.

0 comments on commit 91451d9

Please sign in to comment.