You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/create-configure-approuter-multitenant-application/create-configure-approuter-multitenant-application.md
<!-- description --> Use the tenant-aware approuter application in SAP BTP, Kyma runtime.
11
11
12
12
## Prerequisites
13
-
- You have finished the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in the Kyma Runtime](deploy-nodejs-application-kyma), or cloned the repository: [btp-kyma-runtime-multitenancy-tutorial](https://github.com/SAP-samples/btp-kyma-runtime-multitenancy-tutorial) to find the source for both missions.
13
+
- You have finished the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in SAP BTP, Kyma runtime](deploy-nodejs-application-kyma), or cloned the repository: [btp-kyma-runtime-multitenancy-tutorial](https://github.com/SAP-samples/btp-kyma-runtime-multitenancy-tutorial) to find the source for both missions.
14
14
15
15
## You will learn
16
16
- What is SAP Application Router
17
17
- How to create and configure Application Router
18
-
- How to configure Destination for Application Router in Kyma Runtime
18
+
- How to configure Destination for Application Router in Kyma runtime
19
19
- How to describe Kubernetes objects for Application Router
@@ -85,7 +97,7 @@ In the folder `kyma-multitenant-approuter`, create a file `xs-app.json` with the
85
97
86
98
The destinations configuration can be provided by the `destinations` environment variable or by destination service.
87
99
88
-
In order to provide `destinations` environment variable to the approuter application, you should create a `ConfigMap` object for the approuter's reference.
100
+
In order to provide the `destinations` environment variable to the approuter application, create a `ConfigMap` object that can be referenced later.
89
101
90
102
Create a new deployment YAML file named `k8s-deployment-approuter.yaml` for the approuter app with the following content:
- <subaccount-subdomain>-approuter.<clusterdomain> # Replace <subaccount-subdomain> with the subdomain of your subaccount, and <clusterdomain> with the domain of your Kyma cluster
# Deploy a Multitenant Application to a Provider subaccount, Kyma Runtime
10
-
<!-- description --> Build a Node.js application into OCI image and push it into Docker registry. Based on that, deploy the application into the Kyma runtime.
10
+
<!-- description --> Build a Node.js application into OCI image and push it into Docker registry. Based on that, deploy the application into SAP BTP, Kyma runtime.
11
11
12
12
## Prerequisites
13
-
- You have a Kyma runtime environment on SAP Business Technology Platform (BTP) and the relevant command line tools. If not, please follow the tutorials [Enable SAP BTP, Kyma Runtime](cp-kyma-getting-started) and [Install the Kubernetes Command Line Tool](cp-kyma-download-cli).
13
+
- You have a Kyma runtime environment on SAP Business Technology Platform (BTP) and the relevant command line tools. If not, please follow the tutorials [Enable SAP BTP, Kyma runtime](cp-kyma-getting-started) and [Install the Kubernetes Command Line Tool](cp-kyma-download-cli).
14
14
- You have installed [Docker](https://docs.docker.com/get-started/#download-and-install-docker).
15
15
- You have [Docker Hub](https://hub.docker.com/) account.
16
16
- You have finished the tutorial [Register a Multitenant Application to the SAP SaaS Provisioning Service](register-multitenant-app-saas-provisioning-service).
Find the full Kyma cluster domain in the downloaded `kubeconfig.yml` file. For example: `e6803e4.kyma.shoot.live.k8s-hana.ondemand.com`.
42
-
43
-
44
-
45
-
46
-
47
-
### Build Application to OCI Image
35
+
### Build Application as OCI Image
48
36
49
37
50
38
1. Install tool
51
39
<p> </p>
52
-
In order to run your code on the Kyma Runtime (or on any Kubernetes-based platform), you need to provide an OCI image (aka Docker image) for your application. While you are in principle free to choose your image building tool, we recommend using [Cloud Native Buildpacks (CNB)](https://buildpacks.io/).
40
+
In order to run your code on Kyma runtime (or on any Kubernetes-based platform), you need to provide an OCI image (aka Docker image) for your application. While you are in principle free to choose your image building tool, we recommend using [Cloud Native Buildpacks (CNB)](https://buildpacks.io/).
53
41
<p> </p>
54
42
The command-line tool `pack` supports providing a buildpack and your local source code and creating an OCI image from it. We are working on a process to provide recommended and supported buildpacks. In the meantime, you can use the community-supported [Paketo Buildpacks](https://paketo.io/).
55
43
<p> </p>
56
-
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in the Kyma Runtime](deploy-nodejs-application-kyma), you have installed the command-line tool `pack`, if not, please follow this official guide: [Install Pack](https://buildpacks.io/docs/tools/pack/).
44
+
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in SAP BTP, Kyma runtime](deploy-nodejs-application-kyma), you have installed the command-line tool `pack`. If not, please follow this official guide: [Install Pack](https://buildpacks.io/docs/tools/pack/).
When we speak about repository name, we mean the combination of account and repo name that is usual with Docker Hub: `<docker-hub-account>/<repo-name>`. An example would be `tiaxu/multitenant-kyma-backend`.
66
54
<p> </p>
67
-
As you can only create one private repository in a free Docker hub account, Docker images stored in Docker hub will have different tag names so that they can be stored in one repository. Thus, addressing an image will include the tag name:`<docker-hub-account>/<repo-name>:<tag-name>`. An example would be `tiaxu/multitenant-kyma-backend:v1`.
55
+
As you can only create one private repository in a free Docker hub account, Docker images stored in Docker hub will have different tag names so that they can be stored in one repository. Thus, addressing an image will include the tag name:`<docker-hub-account>/<repo-name>:<tag-name>`. An example would be `tiaxu/multitenant-kyma-backend:v2`.
68
56
<p> </p>
69
-
In the directory `kyma-multitenant-approuter`, build the image for the approuter app from source, for example:
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in the Kyma Runtime](deploy-nodejs-application-kyma), you have created a namespace in Kyma dashboard called `multitenancy-ns`. If not, create a new namespace `multitenancy-ns` through Kyma dashboard or `kubectl` CLI:
106
97
107
-
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in the Kyma Runtime](deploy-nodejs-application-kyma), you have created a namespace in the Kyma environment called `multitenancy-ns`. If not, create a new namespace through the Kyma dashboard or `kubectl` CLI, for example, called `multitenancy-ns`:
Enabling Istio sidecar proxy injection for a namespace allows istiod to watch all Pod creation operations in this namespace and automatically inject newly created Pods with an Istio sidecar proxy.
110
+
Switch the toggle to enable Istio sidecar proxy injection. Click `Create` to finish namespace creation.
> For more details, refer to the [Enable Istio Sidecar Proxy Injection](https://kyma-project.io/#/istio/user/tutorials/01-40-enable-sidecar-injection?id=enable-sidecar-injection-for-a-namespace)
110
115
111
116
112
117
@@ -117,7 +122,7 @@ If you followed the tutorials [Create a Basic Node.js Application with Express G
117
122
118
123
Since the OCI image is stored in your Docker hub, you need to provide the access information to your Kyma cluster that you can pull the images from those repositories.
119
124
120
-
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in the Kyma Runtime](deploy-nodejs-application-kyma), you have configured the credential of your Docker Hub as a Secret. If not, create a new Secret with the following command, replace the placeholder values according to your account:
125
+
If you followed the tutorials [Create a Basic Node.js Application with Express Generator](basic-nodejs-application-create) and [Deploy a Node.js Application in SAP BTP, Kyma runtime](deploy-nodejs-application-kyma), you have configured the credential of your Docker Hub as a Secret. If not, create a new Secret with the following command, replace the placeholder values according to your account:
Launch Kyma dashboard from SAP BTP cockpit, then navigate to the `multitenancy-ns` namespace.
169
+
170
+
Go to `Workloads`, and then select `Deployments`. You will see deployments of **kyma-multitenant-approuter-multitenancy** and **kyma-multitenant-node-multitenancy** displayed, with their `Pods` statuses shown in green. At this point, your multitenant application has been deployed successfully.
0 commit comments