Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions guides/deployment/microservices.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,17 +571,17 @@ npm i @sap-cloud-sdk/resilience --workspace bookstore
```
:::

### Approuter
### App Router

Add [approuter configuration](../deployment/to-cf#add-app-router) using the command:
Add _App Router_ configuration using the command:

```shell
cds add approuter
```

The approuter serves the UIs and acts as a proxy for requests toward the different apps.
The App Router serves the UIs and acts as a proxy for requests toward the different apps.

Since the approuter folder is only necessary for deployment, we move it into a `.deploy` folder.
Since the App Router folder is only necessary for deployment, we move it into a `.deploy` folder.

```shell
mkdir .deploy
Expand All @@ -602,7 +602,7 @@ modules:

#### Static Content

The approuter can serve static content. Since our UIs are located in different NPM workspaces, we create symbolic links to them as an easy way to deploy them as part of the approuter.
The App Router can serve static content. Since our UIs are located in different NPM workspaces, we create symbolic links to them as an easy way to deploy them as part of the App Router.

```shell
mkdir .deploy/app-router/resources
Expand All @@ -614,7 +614,7 @@ cd ../../..
```

::: warning Simplified Setup
This is a simplified setup which deploys the static content as part of the approuter.
This is a simplified setup which deploys the static content as part of the App Router.
See [Deploy to Cloud Foundry](./to-cf#add-ui) for a productive UI setup.
:::

Expand Down Expand Up @@ -753,7 +753,7 @@ cds up

[Learn more about `cds up`.](./to-cf#build-and-deploy){.learn-more}

Once the app is deployed, you can get the url of the approuter via
Once the app is deployed, you can get the url of the App Router via

```shell
cf apps # [!code focus]
Expand Down
53 changes: 34 additions & 19 deletions guides/deployment/to-cf.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,49 +166,64 @@ The roles/scopes are derived from authorization-related annotations in your CDS

### 3. MTA-Based Deployment { #add-mta-yaml}

We'll be using the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-tool/) to execute the deployment. The modules and services are configured in an `mta.yaml` deployment descriptor file, which we generate with:
We'll be using the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-tool/) to execute the deployment. The modules and services are configured in an _mta.yaml_ deployment descriptor:

```sh
cds add mta
```

[Learn more about MTA-based deployment.](https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/d04fc0e2ad894545aebfd7126384307c.html?locale=en-US){.learn-more}

### 4. App Router as Gateway { #add-app-router}
### 4. User Interfaces { #add-ui }

The _App Router_ acts as a single point-of-entry gateway to route requests to. In particular, it ensures user login and authentication in combination with XSUAA.
#### Option A: SAP Cloud Portal

Two deployment options are available:
If you intend to deploy **multitenant** applications with a UI, we recommend to set up the [HTML5 Application Repository](https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service) in combination with the [SAP Cloud Portal service](https://discovery-center.cloud.sap/serviceCatalog/cloud-portal-service):

- **Managed App Router**: for SAP Build Work Zone, the Managed App Router provided by SAP Fiori Launchpad is available.
- **Custom App Router**: for custom scenarios without SAP Fiori Launchpad, the App Router needs to be deployed along with your application.
In this case, use the following command to enhance the application configuration:
```sh
cds add portal
```

```sh
cds add approuter
```
::: tip `cds add portal` adds an _App Router_ configuration to your project
The App Router acts as a single point-of-entry gateway to route requests to.
In particular, it ensures user login and authentication in combination with XSUAA or IAS.
:::

[Learn more about the SAP BTP Application Router.](https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/01c5f9ba7d6847aaaf069d153b981b51.html?locale=en-US){.learn-more}
#### Option B: SAP BTP Application Frontend <Beta />

### 5. User Interfaces { #add-ui }
For **single-tenant** applications, you can use the new [SAP BTP Application Frontend](https://help.sap.com/docs/application-frontend-service) service:

#### Option A: SAP Cloud Portal
```sh
cds add app-frontend
```
[Enable the service for consumption in your subaccount](https://help.sap.com/docs/application-frontend-service/application-frontend-service/enabling-service?locale=en-US){.learn-more}

If you intend to deploy **multi-tenant** user interface applications, you also need to set up the [HTML5 Application Repository](https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service) in combination with the [SAP Cloud Portal service](https://discovery-center.cloud.sap/serviceCatalog/cloud-portal-service):
::: details Other deployment variants...

For **single-tenant** applications, you can integrate with SAP Build Work Zone, standard edition:

```sh
cds add portal
cds add workzone
```

#### Option B: SAP BTP Application Frontend <Beta />
This approach uses the **managed App Router** provided by SAP Fiori Launchpad&nbsp;—&nbsp;you don't need to deploy your own. Instead, destinations are configured.

For **single-tenant** applications, you can use the new [SAP BTP Application Frontend](https://help.sap.com/docs/application-frontend-service) service:
<br>

You might also use a custom App Router setup without SAP BTP Cloud Portal service:

```sh
cds add app-front
cds add approuter
```
[Learn more about the SAP BTP Application Router.](https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/01c5f9ba7d6847aaaf069d153b981b51.html?locale=en-US){.learn-more}
<br>
However, in this case, you need to create symlinks from your _app_ folders to make them visible to the deployed App Router.
The [samples _modulith_](https://github.com/capire/samples) project uses this setup for serving a static _index.html_ consuming Vue.js via CDN.

[Find the symlink directory in the App Router's _resources_ folder](https://github.com/capire/samples/tree/main/.deploy/app-router/resources){.learn-more}
:::

### 6. Optional: Multitenancy { #add-multitenancy }
### 5. Optional: Multitenancy { #add-multitenancy }

To enable multitenancy for production, run the following command:

Expand Down
21 changes: 8 additions & 13 deletions guides/multitenancy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,19 +713,19 @@ Now, open or refresh <http://localhost:4004/#Books-manage> again as _alice_ and

In order to get your multitenant application deployed, follow this excerpt from the [deployment to CF](../deployment/to-cf) and [deployment to Kyma](../deployment/to-kyma) guides.

Once: Add SAP HANA Cloud, XSUAA, and [App Router](../deployment/to-cf#add-app-router) configuration. The App Router acts as a single point-of-entry gateway to route requests to. In particular, it ensures user login and authentication in combination with XSUAA.
**Once**, add SAP HANA Cloud and XSUAA configuration:

```sh
cds add hana,xsuaa
```

If you intend to serve UIs you can easily set up the SAP Cloud Portal service:
If you intend to serve UIs you can set up the SAP Cloud Portal service:

```sh
cds add portal
```

Once: add a **deployment descriptor**:
**Once**, add a **deployment descriptor**:

::: code-group

Expand All @@ -739,25 +739,20 @@ cds add kyma

:::

::: code-group
Now deploy the application:

```sh [Cloud Foundry]
```sh
cds up
```

```sh [Kyma]
cds up --to k8s
```

:::
:::tip For manual setups, ensure the metadata container (`t0`) is unique

:::tip Ensure a unique metadata container
To prevent potential conflicts during the initial creation of the MTXS metadata container (`t0`), it is recommended to perform the initial deployment with only one instance of the MTXS sidecar.
If you’re not running `cds-mtx upgrade *` as a [Cloud Foundry hook](#run-as-cloud-foundry-hook) (as set up by `cds add multitenancy`) and instead use a custom setup, deploy the MTX sidecar with a single instance for the initial rollout. This avoids conflicts when `t0` is created.

Alternatively, you can run `cds-mtx upgrade t0` beforehand, such as in a [Cloud Foundry hook](#run-as-cloud-foundry-hook).
:::



### Subscribe

**Create a BTP subaccount** to subscribe to your deployed application. This subaccount has to be in the same region as the provider subaccount, for example, `us10`.
Expand Down
4 changes: 2 additions & 2 deletions node.js/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ If a CSRF token is cached, it can potentially be reused in multiple requests, de

#### Using App Router

The _App Router_ is configured to require a _CSRF_ token by default for all protected routes and all HTTP requests methods except _HEAD_ and _GET_. Thus, by adding the _App Router_ as described in the [Deployment Guide: Using App Router as Gateway](../guides/deployment/to-cf#add-app-router), endpoints are CSRF protected.
The _App Router_ is configured to require a _CSRF_ token by default for all protected routes and all HTTP requests methods except _HEAD_ and _GET_. Thus, by using an _App Router_ as described in the [_Deployment_ guide](../guides/deployment/to-cf#add-ui), endpoints are CSRF protected.

[Learn more about CSRF protection with the **App Router**](https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/c19f165084d742e096c5d1625cecd2d4.html?q=csrf#loioc19f165084d742e096c5d1625cecd2d4__section_xj4_pcg_2z){.learn-more}

Expand Down Expand Up @@ -278,7 +278,7 @@ cds.on('bootstrap', app => app.use ((req, res, next) => {

#### Configuring CORS in App Router

The _App Router_ has full support for CORS. Thus, by adding the _App Router_ as described in the [Deployment Guide: Using App Router as Gateway](../guides/deployment/to-cf#add-app-router), CORS can be configured in the _App Router_ configuration.
The _App Router_ has full support for CORS. Thus, by adding the _App Router_ as described in the [_Deployment_ guide](../guides/deployment/to-cf#add-ui), CORS can be configured in the _App Router_ configuration.

[Learn more about CORS handling with the **App Router**](https://help.sap.com/docs/BTP/65de2977205c403bbc107264b8eccf4b/ba527058dc4d423a9e0a69ecc67f4593.html?q=allowedOrigin#loioba527058dc4d423a9e0a69ecc67f4593__section_nt3_t4k_sz){.learn-more}

Expand Down