Git Product home page Git Product logo

cloud-cf-multitenant-inventory-management's Introduction

REUSE status

Developing a SaaS Multitenant Business Application on SAP Business Technology Platform in the Cloud Foundry Environment

Warning

This code sample is deprecated in favor of a CAP-based example. See cloud-cap-multitenancy.

Description

This repository contains a sample reference application for developing and deploying a SaaS (software-as-a-service) multitenant business application on SAP Business Technology Platform, Cloud Foundry environment. Follow the instructions below to deploy the application on SAP Business Technology Platform in a subaccount that is configured for the Cloud Foundry environment.

This branch has code that uses PSQL as the back-end DB. For HANA DB please click here.

Requirements

Download and Installation

To install the app, you must clone the code from this Github repository and deploy the application on your SAP Business Technology Platform subaccount, running on the Cloud Foundry environment.

For complete setup instructions, see the Download and Installation instructions.

Known Issues

There are no known issues with this sample application. If you encounter any issues, please reach out to us through the details highlighted in the 'How to Obtain Support' section below.

How to Obtain Support

The purpose of this application is to illustrate the multitenancy capabilities of SAP Business Technology Platform running on the Cloud Foundry environment. Thus, it is provided as-is with no official lines of support.

To-Do (upcoming changes)

As a part of our future development, we plan to add functionality to the application that is based on the role of the logged-in user.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0, except as noted otherwise in the LICENSE file.

cloud-cf-multitenant-inventory-management's People

Contributors

ajinkyapatil8190 avatar andrewlunde avatar btbernard avatar jonathanbaker7 avatar rhari008 avatar sandeep-tds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-cf-multitenant-inventory-management's Issues

Inconsistent use of placeholder values in SAAS Registry Documentation

I found an inconsistency with the placeholder for the backend app URL in the SAAS Registry section of the download/installation instructions.

For example, the SAAS registry config file contains a placeholder <Your back-end app URL> to indicate the onSubscription URL. The example of what that would look like points to the inventorymanagementbackend app"

https://github.com/SAP/cloud-cf-multitenant-Inventory-management/blob/4fc53d1d2b3253245cd6b1b6e071409dccb6d0ae/Download_and_Installation_Instructions.md#L97-L101

Yet later on when providing details on what URL should be returned by the onboarding service, the same placeholder <Your back-end app URL> is used but this time the inventorymanagementui app is referenced

https://github.com/SAP/cloud-cf-multitenant-Inventory-management/blob/4fc53d1d2b3253245cd6b1b6e071409dccb6d0ae/Download_and_Installation_Instructions.md#L116-L120

So what we're seeing is that in one context, <Your back-end app URL> corresponds to inventorymanagementbackend while in another it corresponds to inventorymanagementui. Can this be revised to make it more clear which one is actually the backend app?

Provider UI application url is not working

I am trying to do a multi-tenant sample proof of concept in SAP Cloud Platform(SCP) using this repository as a reference.
I have encountered a couple of problems and I am not sure what is the problem here.
After deploying the application in subaccount1(space: APS), I went ahead and subscribed the deployed application from subaccount2. I see that the deployed application URL is not working.
It says the subaccount does not map to a valid identity zone. Screenshot attached.
capture1

Also, If I access the subaccount2's URL, I get a login screen, but after login, I am getting the following error.:
Internal Server Error
in login/callback REST call

Here is mta.yaml

`ID: attempt3
_schema-version: '2.1'
version: 0.0.1

modules:

  • name: db3
    type: hdb
    path: db3
    parameters:
    memory: 256M
    disk-quota: 256M
    requires:

    • name: hdi_db3
  • name: invbackend
    type: nodejs
    path: invbackend
    parameters:
    disk-quota: 1024M
    memory: 1024M
    provides:

    • name: invbackend_api
      properties:
      url: '${default-url}'
      requires:
      • name: hdi_db3
      • name: uaa_attempt3
        properties:
        SAP_JWT_TRUST_ACL:
      • clientid: ""
        identityzone: "
        "
  • name: invui
    type: html5
    path: invui
    parameters:
    disk-quota: 256M
    memory: 256M
    build-parameters:
    builder: grunt
    requires:

    • name: uaa_attempt3
    • name: invbackend_api
      group: destinations
      properties:
      name: invbackend_api
      url: '~{url}'
      forwardAuthToken: true
      properties:
      TENANT_HOST_PATTERN: "^(.*)-invui.cfapps.eu10.hana.ondemand.com"

resources:

  • name: hdi_db3
    parameters:
    config:
    database_id: [id placeholder]
    properties:
    hdi-container-name: ${service-name}
    type: com.sap.xs.hdi-container

  • name: uaa_attempt3
    parameters:
    path: ./xs-security.json
    service-plan: application
    service: xsuaa
    shared: true
    type: org.cloudfoundry.managed-service

Here is the config.json{
"appId": "attempt3!t9256",
"displayName": "Inventory Management HANA App",
"description": "An app to manage your inventory which uses HANA DB with Column Discrimination",
"category": "Provider XYZ",
"appUrls": {
"onSubscription": "https://-invbackend./callback/v1.0/tenants/{tenantId}"
}
}`

Here is the xs-security.json
{ "xsappname": "attempt3", "tenant-mode": "shared", "description": "Security profile of called application", "scopes": [{ "name": "$XSAPPNAME.Callback", "description": "With this scope set, the callbacks for tenant onboarding, offboarding and getDependencies can be called.", "grant-as-authority-to-apps": [ "$XSAPPNAME(application,sap-provisioning,tenant-onboarding)" ] }] }

Please note that if I make the tenant-mode as dedicated, I am able to log in through provider URL.
Let me know if anything else is required.
TIA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.