Skip to content

neptune-software/neptune-dxp-on-btp

Repository files navigation

Neptune DXP on SAP BTP

Welcome to the Neptune DXP on SAP BTP repository!

This repository contains scrips for easy deployment and upgrade off the Neptune DXP - Open Edition Docker container on SAP BTP Cloud Foundry.

The manual steps for deployment of Neptune DXP - Open Edition are described in our documentation here: https://docs.neptune-software.com/neptune-dxp-open-edition/24/installation-guide/install-neptune-dxp-open-edition-on-btp-with-postgreSQL.html#_postgresql_hyperscaler_option

This setup includes a lot of manual steps and also enabeling ssh tunnels via the Cloud Foundry cli, including using Database tools (psql, DBeaver, or others) I have worked on making the deployment process easier and faster by scripting the complete setup.

Pre-requisites

Installation

The main setup script is a NodeJS application running locally which executes the Cloud Foundry CLI commands by using ShellJS a JavaScript library to run shell command from NodeJS 🚀

A couple of commands which are included are:

  • cf services to check which services are running in the SAP BTP subaccount
  • cf push to deploy the pg-init application and the Neptune DXP planet9 docker container
  • cf env to read environment variables of a deployed application
  • cf restage to restart an application after changes

Included is also another NodeJS application pg-init which will be deployed to SAP BTP, this application reads the Postgres Service binding environment variables and connects to the Postgres Database and will execute the CREATE SCHEMA IF NOT EXISTS planet9; SQL command to create the planet9 schema which is needed for running Neptune DXP - Open Edition.

Use the script

Make sure you have the CF cli and NodeJS installed locally.

Clone this repository to your local pc

git clone https://github.com/neptune-software/neptune-dxp-on-btp

To run the main script, make sure you are logged in to the SAP BTP subaccount and space wherre you want to deploy Neptune. For a Trial account this will be the dev space.

You can login with your email address of your S-User

cf login -u <email-address>

or use the --sso option to login via the browser with a temporary authentication code

cf login -u <email-address> --sso

Start the script

npm run start

Here is an asciinema recording of the script, when all prerequisites are met you can install Neptune DXP - Open Edition in just under 2 minutes 🚀

Neptune DXP Deployment script

Upgrade

For upgrading the Neptune DXP - Open Edition another script src/upgrade.js is avaiable.

Change the following line in the upgrade.js script to select the correct version you want to upgrade to

const upgrade_version = "v24.12.0"; // Version to upgrade to

You can now start the upgrade script with

npm run upgrade

The script will do 2 cf push command with 2 different yaml files. The first cf push command is pushing the new docker container with the version provided and will run the ./planet9-linux --force-upgrade command to upgrade and apply the new database schema changes. The second cf push command is starting the same docker container again but now with standard ./planet9-linux" command.

The upgrade will take a few minutes, if any error occurs please check the Cloud Foundry log files with cf logs neptune-dxp --recent.

Note

The scripts have been tested on MacOS and Linux using the latest Cloud Foundry CLI.

Please open a GitHub Issue in this repository if you encounter any problems.

About

Scripts for easy deployment/upgrades of Neptune DXP - Open Edition on SAP BTP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published