https://github.com/suse/saphanabootstrap-formula
SAP HANA platform bootstrap salt formula
https://github.com/suse/saphanabootstrap-formula
clusters hana saltstack-formula sap saphanabootstrap-formula
Last synced: 5 months ago
JSON representation
SAP HANA platform bootstrap salt formula
- Host: GitHub
- URL: https://github.com/suse/saphanabootstrap-formula
- Owner: SUSE
- License: apache-2.0
- Created: 2018-11-07T12:03:55.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-11-08T10:20:36.000Z (over 1 year ago)
- Last Synced: 2024-04-07T01:37:47.983Z (about 1 year ago)
- Topics: clusters, hana, saltstack-formula, sap, saphanabootstrap-formula
- Language: SaltStack
- Size: 419 KB
- Stars: 18
- Watchers: 15
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/SUSE/saphanabootstrap-formula/actions/workflows/formulaCI.yml)
# SAP HANA platform bootstrap Salt formula
Salt formula to bootstrap and manage a multi SAP HANA platform environment.
## Features
The formula provides the capability to create a multi node SAP HANA environment. Here are some of the features:
- Install one or multiple SAP HANA instances (in one or multiple nodes)
- Setup a System replication configuration between two SAP HANA nodes
- Extract the required files from the provided `.tar`, `.sar`, `.exe` files
- Apply saptune to the nodes with the needed SAP notes
- Enable all of the pre-requirements to setup a HA cluster in top of SAP HANA system replication cluster
- Install and configure the [handb_exporter](https://github.com/SUSE/hanadb_exporter)## Installation
The project can be installed in many ways, including but not limited to:
1. [RPM](#rpm)
2. [Manual clone](#manual-clone)### RPM
On openSUSE or SUSE Linux Enterprise use `zypper` package manager:
```shell
zypper install saphanabootstrap-formula
```**Important!** This will install the formula in `/usr/share/salt-formulas/states/hana`. In case the formula is used in a masterless mode, make sure that the `/usr/share/salt-formulas/states` entry is correctly configured in the `file_roots` entry of the Salt minion configuration.
Depending on the patch level of the target system and the release cycle of this project, the package in the regular repository might not be the latest one. If you want the latest features, have a look in the test development repositories at SUSE's Open Build Service [network:ha-clustering:sap-deployments:devel/saphanabootstrap-formula](https://build.opensuse.org/package/show/network:ha-clustering:sap-deployments:devel/saphanabootstrap-formula).
### Manual Installation
A manual installation can be done by cloning this repository:
```
git clone https://github.com/SUSE/saphanabootstrap-formula
```**Important!** This will not install the the formula anywhere where salt can find it. If the formula is used in a masterless mode, also make sure to copy the complete `netweaver` subdirectory to location defined in `file_roots` entry of your Salt minion configuration.
I. e.:
```
cd saphanabootstrap-formula
cp -R hana /srv/salt
```**Important!** The formulas depends on [salt-shaptools](https://github.com/SUSE/salt-shaptools) package. Make sure it is installed properly if you follow the manual installation (the package can be installed as a RPM package too).
## Usage
Follow the next steps to configure the formula execution. After this, the formula can be executed using `master/minion` or `masterless` options:
1. Modify the `top.sls` file (by default stored in `/srv/salt`) including the `hana` entry.
Here is an example to execute the HANA formula in all of the nodes:
```
# This file is /srv/salt/top.sls
base:
'*':
- hana
```2. Customize the execution pillar file. Here an example of a pillar file for this formula with all of the options: [pillar.example](https://github.com/SUSE/saphanabootstrap-formula/blob/master/pillar.example)
The `pillar.example` can be found either as a link to the file in the master branch or a file in the file system at `/usr/share/salt-formulas/metadata/hana/pillar.example`.3. Set the execution pillar file. For that, modify the `top.sls` of the pillars (by default stored in `/srv/pillar`) including the `hana` entry and copy your specific `hana.sls` pillar file in the same folder.
Here an example to apply the recently created `hana.sls` pillar file to all of the nodes:
```
# This file is /srv/pillar/top.sls
base:
'*':
- hana
```4. Execute the formula.
1. Master/Minion execution.
`salt '*' state.highstate`
2. Masterless execution.
`salt-call --local state.highstate`
**Important!** The hostnames and minion names of the HANA nodes must match the output of the `hostname` command.
### Salt pillar encryption
Pillars are expected to contain private data such as user passwords required for the automated installation or other operations. Therefore, such pillar data need to be stored in an encrypted state, which can be decrypted during pillar compilation.
SaltStack GPG renderer provides a secure encryption/decryption of pillar data. The configuration of GPG keys and procedure for pillar encryption are described in the Saltstack documentation guide:
- [SaltStack pillar encryption](https://docs.saltstack.com/en/latest/topics/pillar/#pillar-encryption)
- [SALT GPG RENDERERS](https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html)
**Note:**
- Only passwordless gpg keys are supported, and the already existing keys cannot be used.
- If a masterless approach is used (as in the current automated deployment) the gpg private key must be imported in all the nodes. This might require the copy/paste of the keys.
## OBS Packaging
The CI automatically publishes new releases to SUSE's Open Build Service every time a pull request is merged into `master` branch. For that, update the new package version in [\_service](https://github.com/SUSE/saphanabootstrap-formula/blob/master/_service) and
add the new changes in [saphanabootstrap-formula.changes](https://github.com/SUSE/saphanabootstrap-formula/blob/master/saphanabootstrap-formula.changes).The new version is published at:
- https://build.opensuse.org/package/show/network:ha-clustering:sap-deployments:devel/saphanabootstrap-formula
- https://build.opensuse.org/package/show/openSUSE:Factory/saphanabootstrap-formula (only if the spec file version is increased)