Install Neptune DXP - Open Edition on SAP BTP with PostgreSQL

In this topic, you learn how to install Neptune DXP - Open Edition on SAP BTP with PostgreSQL.

Prerequisites

Procedure

Installation

  1. Install the Neptune DXP - Open Edition inside the available subaccount "trial" and space "dev".

    sap btp psql space

PostgreSQL Hyperscaler Option

Neptune DXP - Open Edition utilizes the SQLite database by default, which is not recommended for productive use. In the event of a Docker container restart in your SAP BTP trial account, all data is lost due to the SQLite database being stored within the container.
  1. Create a new instance for PostgreSQL Hyperscaler Option in your trial subaccount.

    sap btp postgresql instance

Deploy Neptune DXP - Open Edition

  1. Install the Command Line Interface (CLI) for Cloud Foundry (cf).

    You can find the installation file for macOS, Windows, and Linux here: Downloads.
  2. Follow the installation guide here.

  3. Go to the SAP Business Technology Platform (SAP BTP).

  4. Go to the Overview page of your subaccount.

  5. Copy the API Endpoint link.

    sap btp CLI endpoint link
  6. Open a terminal. Enter the following command and replace API Endpoint with the link you have copied:

    cf login -a API Endpoint
  7. Enter your login credentials to the SAP BTP. Check if the Org name and Space name match with the details of your subaccount.

  8. Enter the following command to deploy the latest Docker container:

    cf push neptune-dxp -m 4096M -k 4096M --no-start --random-route --docker-image docker.io/neptunesoftware/planet9:v22.10.7
  9. Go to the postgres service from your instances view and select Create under Bound Applications.

    sap btp postrgres bound application
  10. Select the neptune-dxp application and select Create.

    sap btp neptune application
  11. After the binding is created, you can select View Credentials to get your PostgreSQL connection details which will be used in connecting the Neptune DXP - Open Edition.

  12. Enter the following command in your terminal, to set user variables.

    cf set-env neptune-dxp PLANET9_IP 0.0.0.0
  13. Enter the following command in your terminal, to start the application.

    cf start neptune-dxp
  14. Neptune DXP - Open Edition will start with SQLite. To change the database connection to PostgreSQL, enter the following commands in the terminal.

    cf set-env neptune-dxp DB_TYPE postgresql
    cf set-env neptune-dxp DB_URI_POSTGRES <value of uri from dialog>
    cf set-env neptune-dxp DB_PSQL_SSL true
    cf set-env neptune-dxp NODE_TLS_REJECT_UNAUTHORIZED 0
  15. Before restarting the application, you need to create the planet9 schema in your PostgreSQL database.

  16. Enable ssh on your neptune-dxp application, using the following command.

    cf enable-ssh neptune-dxp
  17. Create the ssh tunnel, with two values from your credentials file, hostname and port for PostgreSQL.

    cf ssh -L 63306:<hostname>:<port> neptune-dxp
  18. With the ssh tunnel active, you can create the schema. You can use either the psql command from the terminal, or connect with a database client such as: DBeaver.

    CREATE SCHEMA planet9;
  19. Restart the application with the following command.

    cf restart neptune-dxp
  20. After the command is successfully executed, the application is running in your SAP BTP cockpit.

    sap btp app running on btp
  21. In Application Routes, select the link. You are forwarded to the login page of Neptune DXP - Open Edition.

  22. Sign in with the Username admin and the Password admin.

    sap btp neptune dxp open edition login
  23. After login, it is recommended to change the admin password.

Results

You have installed Neptune DXP - Open Edition on SAP BTP with PostgreSQL.