Important Links
General
SAP BTP, Kyma Runtime scenario
SAP BTP, Cloud Foundry Runtime scenario
|
Dear community,
This goes out to all the fans of the fabulous
CAP framework and all of you being interested in building
multitenant Software as a Service (SaaS) solutions on the
SAP Business Technology Platform (BTP)!
We are overly excited to bring you some excellent news that is freshly baked and ready to be shared. For readers who've followed our blog posts on building SaaS applications within
SAP BTP, Kyma, and
Cloud Foundry, we've got an announcement that will capture your attention.
We are pleased to announce the
"reloaded" release of our latest
SAP-samples contributions, which harmoniously
merges both code lines and
documentation from these two environments.
This aligns seamlessly with our goal of providing all of our SAP BTP service offerings, along with our sample applications,
agnostic to a
specific runtime (neglecting ABAP environment for now). Our aim is to empower our
partners and
customers with the freedom to choose the runtime that perfectly aligns with their preferences and needs. To explore further, simply follow this link to our new
SAP-samples GitHub repository.
https://github.com/SAP-samples/btp-cap-multitenant-saas
If you're new to the concept of multitenant SaaS applications on SAP BTP, we invite you to explore our previously published blog posts. These posts offer valuable insights that will provide you with a solid understanding of the subject matter at hand.
Multitenant SaaS basics and Cloud Foundry scenario
Advanced multitenant SaaS in a Kyma Scenario
Comparing the Cloud Foundry and Kyma runtime
If you are already
acquainted with our
previous releases, you can continue reading this blog post to delve into the details of our newly
merged repository and its implications for you. As mentioned, what sets this repository apart is its
runtime agnosticism. In practical terms, this signifies that deploying the
Sustainable SaaS sample solution becomes a seamless endeavour.
Whether your preference leans towards a
Kyma Cluster or a
Cloud Foundry Landscape, you can achieve this with a single, unified repository. Furthermore, our sample application is crafted on the foundation of the
latest CAP release, providing you access to the latest and greatest features.
Great news ahead - since the availability of the SAP Cloud Identity Services like SAP Identity Authentication Service in
Trial Environments, even the
Advanced Features of ours samples scenario can now be deployed to all available SAP BTP account types. So why not giving it a try in your own account using the latest
free tier or
trial service plans?
Moreover, we have taken a thoughtful approach to handle
runtime-specific code where it is necessary (e.g., handling Cloud Foundry Routes or Kyma API Rules). This is accomplished through the utilization of
distinct classes that
extend from a
shared base class when needed. This architecture ensures a streamlined experience, offering you the flexibility to tailor our project to the unique requirements of each environment. You can find a sample of the mentioned approach as part of our Subscriber Onboarding automation logic (
click here).
// Shared logic
class TenantAutomator
// Runtime-specific extensions and overwrites
class CloudFoundry extends TenantAutomator
class Kyma extends TenantAutomator
// Module returns runtime-specific class
// VCAP_APPLICATION only available in Cloud Foundry
export default (process.env.VCAP_APPLICATION ? CloudFoundry : Kyma)
In addition, we have streamlined our
branch structure by consolidating it into a
singular main branch (compared to three branches in our former Cloud Foundry repository). This modification simplifies the navigation and access to our codebase. Within this code, you will find
intelligent checks that determine the availability of service bindings necessary for
advanced features.
Consequently, certain code snippets related to
Advanced Version features, are
executed selectively based on this determination. So, in short, the new repository has code for both the
Basic and
Advanced Version setup. But which code runs depends on how you've set up your services and deployed the sample application to your target runtime.
class UserManagement {
constructor(token) {
this.ias = this.#checkIASBinding();
}
// Public method creating a new SaaS application user
async createUser(userInfo) {
try {
// SAP IAS user only created if SAP IAS service binding exists
if (this.ias) {
user.iasLocation = await this.createIASUser(userInfo)
}
}
}
// Private method checking for the SAP IAS service binding
#checkIASBinding() {
try {
return xsenv.getServices({ ias:{ label: 'identity' } }) && true;
} catch (error) {
return false
}
}
}
In addition to combining the code, there are more improvements in this new repository, especially when it comes to our detailed
documentation and
step-by-step tutorials:
- Comprehensive overhaul of documentation
- Optimization of deployment procedures
- Streamlined approaches to local and hybrid testing
- Introduction of exclusive new expert features
Take a look at the
new header section of the different documentation chapters. This will help you determine if the steps provided are applicable to your runtime. Keep in mind that certain tutorials are tailored specifically for either the
Kyma or Cloud Foundry environment.
We invite you to explore this refreshed repository while we are
concurrently working on updating our existing blog posts and GitHub repositories to ensure they seamlessly direct you to the most up-to-date content henceforth.
If you have previously engaged with any of our existing repositories, we kindly encourage you to acquaint yourself with this
new release. Moving forward, updates and maintenance will be exclusive to the new version. Maintaining multiple closely parallel codebases would be unsustainable over time, so we appreciate your understanding for this decision.
Your
insights and
feedback are of great value to us. We invite you to share your thoughts and suggestions in the comments. Additionally, you can effortlessly initiate discussions or report issues on GitHub, should you come across any areas where refinement is possible. Your collaboration contributes significantly to our ongoing improvement efforts.
All the best and
stay curious!
alperdedeoglu & martinfrick