Developing multi-tenant applications on the SAP Cloud Platform- Introduction
Consider the following scenario:
‘ITeLO Consulting’ is a trusted SAP partner company that specializes in providing solutions for the Oil and Gas industry. They have adopted the SAP Cloud Platform as the innovation platform to build and run their applications on the cloud. They choose to deliver their solutions via the Software as a service (SaaS) model in which the software is deployed as a hosted service and is available to customers over the internet.
ITeLO Consulting has developed a pollution monitoring dashboard that helps Oil & Gas companies view a comparison of the air pollution levels onsite (at the plant) vs. the air pollution levels at the city (where the plant is located). They have found interest for this solution from certain Oil & Gas companies that want to adopt measures for proactive pollution prevention.
‘ABC PetroCorp’ and ‘XYZ EnergyCorp’ are two such Oil & Gas companies based out of Canada and US respectively, that are buying this solution from ITeLO.
‘Robert’ works for ITeLO Consulting and is the architect for this project. ITeLO has bought an SAP Cloud Platform package enabled with the services required to build this application. They have received a SAP CP account with the services provisioned for the account. Robert is assigned the role of an Administrator in the SAP CP account. Now he is eager to explore how such an application can be built and delivered to his customers as a SaaS application.
An effective solution architecture in Robert’s scenario is to develop a true mutli-tenant SaaS application and deliver it to his customers. Firstly, let’s reach a common understanding of the concept of multi-tenancy itself.
Multi-tenancy is an architecture in which a single instance of a software application serves multiple customers. Each customer is called a tenant.
As a development platform for cloud application development, the SAP Cloud Platform has been designed with multi-tenancy built into its services. Using this capability, Robert can develop and run tenant-aware applications i.e. applications running on shared (virtualized) resources that can be used by multiple consumers (tenants).
There are several benefits that multi-tenant cloud applications bring:
- Reduced TCO: Due to sharing of underlying IT resources and operational costs across customers, the TCO for such an application is low. The cost savings increase as the number of customers served by the multitenant application increases.
- Operational efficiency: Application upgrades, bug fixes can be applied to all tenants by updating the single instance of the provider application.
- Scalability: Helps build and deliver services quickly to customers. On boarding a new customer is a matter of creating a new subscription for that customer.
- Configurability: Allows individual customers to configure their own user store, backend services etc. as required by the application.
Accounts and subscriptions in SAP CP
As shown in the diagram, there is an SAP CP “Provider” account that hosts the applications. The virtualized resources (Java compute unit), database etc… are allotted to this account. The SAP CP applications will actually run within this account, data generated from the applications is stored on the database within this account.
There is an SAP CP “Consumer” account that “subscribes” to the applications running within the provider account. Note that the applications are not copied or run inside the consumer account. Typically a consumer represents a customer. The end users at the customer organization access the subscribed application through a dedicated application URL. When an application is accessed via a consumer specific URL, the application environment is able to identify the current consumer.
Within the consumer account, there is the ability to add configurations that are applied only to that consumer. For e.g. Identity Provider – It is possible to configure the customer’s own Identity Provider as the user store for the SAP CP applications. Or configure the SAP CP destinations that can be points to the on-premise backend services running in the customer’s landscape.
Note: The SAP Cloud Platform itself follows the multi-tenant application architecture for many of its services. You may have used services like the Web IDE, Portal services, IoT services for developing your applications on SAP CP. These are offered to you as subscriptions to the services running on SAP’s own provider accounts.
SAP CP Account Setup for ITeLO
Let’s take the case of ITeLO Consulting to see how the SAP CP accounts can be setup for their multi-tenant application.
Remember that Robert is the administrator of the SAP CP account on which the resources have been allotted. This SAP CP account acts as the Provider account where the multitenant application for pollution monitoring is deployed and run.
Robert then creates 2 new SAP CP accounts which act as Consumer Accounts, each one mapping to a customer – one account for ABC PetroCorp and another account for XYZ EnergyCorp. Then he creates subscriptions from these consumer accounts to the application(s) running in the provider account.
For the customer-specific configuration that needs to be done on the consumer accounts, Robert plans to collaborate with the customer organization.
‘Emily’ is an employee of the IT department of ABC PetroCorp. She has been assigned to work on this project with the Robert.
For XYZ EnergyCorp, ‘Stephen’ is an employee of the IT department who will work with Robert.
Robert adds Emily as a co-administrator of the consumer account for ABC PetroCorp and Stephen as a co-administrator for the consumer account for XYZ EnergyCorp. Afterwards, Emily and Stephen will do the required configuration in their respective accounts.
Note: It is also possible that the consumer account is completely configured/operated by the partner.
- We started the scenario of a partner who wants to use SAP CP to deliver SaaS applications to his customers.w
- We got a high level overview of the multi-tenancy concept within SAP CP and an idea of how SAP CP accounts can be setup for the same.
Robert uses SAP CP to build such a multitenant application and this will be covered (step by step) in the following blog posts
- Part2. Application Overview- Introduction to solution, services and its architecture
- Part3. Project Setup – Create and deploy of MTAR, DB Binding and consumer subscriptions
- Part4. Persistence multitenancy – Data initialization and isolation
- Part5.1 Identity Management – Setup of SCI Tenant
- Part5.2 Identity Management – Setup of SCI Tenant
- Part6. On-Premise Connectivity service – On premise setup and configure connectivity service
- Part7. Cloud Connectivity services – Configure Connectivity services
- Part8. Fiori Launchpad – Configuring tile for multi-tenant application