Skip to content

Commit 34cc63e

Browse files
authored
Document cds watch --with-mtx (#2145)
1 parent 1dbb690 commit 34cc63e

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

guides/multitenancy/index.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,6 @@ This is a known issue in CDS 9.
292292

293293
## Test-Drive Locally {#test-locally}
294294

295-
For local testing, create a new profile that contains the multitenancy configuration:
296-
297-
```sh
298-
cds add multitenancy --for local-multitenancy
299-
```
300-
301295
<div class="impl java">
302296

303297
For multitenancy you need additional dependencies in the _pom.xml_ of the `srv` directory. To support mock users in the local test scenario add `cds-starter-cloudfoundry`:
@@ -316,7 +310,7 @@ cds add multitenancy --for local-multitenancy
316310
```yaml [application.yaml]
317311
---
318312
spring:
319-
config.activate.on-profile: local-multitenancy
313+
config.activate.on-profile: with-mtx
320314
#...
321315
cds:
322316
multi-tenancy:
@@ -335,25 +329,6 @@ cds add multitenancy --for local-multitenancy
335329
336330
:::
337331
338-
Configure the sidecar to use dummy authentication.
339-
340-
::: code-group
341-
342-
```json [mtx/sidecar/package.json]
343-
{
344-
"cds": {
345-
"profile": "mtx-sidecar",
346-
"[development]": {
347-
"requires": {
348-
"auth": "dummy"
349-
}
350-
}
351-
}
352-
}
353-
```
354-
355-
:::
356-
357332
</div>
358333
359334
Before deploying to the cloud, you can test-drive common SaaS operations with your app locally, including SaaS startup, subscribing tenants, and upgrading tenants.
@@ -410,7 +385,7 @@ In the following steps, we start two servers, the main app and MTX sidecar, and
410385
<div class="impl node">
411386

412387
```sh
413-
cds watch --profile local-multitenancy
388+
cds watch --with-mtx
414389
```
415390

416391
::: details Persistent database
@@ -446,15 +421,15 @@ In the following steps, we start two servers, the main app and MTX sidecar, and
446421

447422
```sh
448423
cd srv
449-
mvn cds:watch -Dspring-boot.run.profiles=local-multitenancy
424+
mvn cds:watch -Dspring-boot.run.profiles=with-mtx
450425
```
451426

452427
::: details Persistent database
453428

454429
The server starts as usual, with the difference that a persistent database is used automatically instead of an in-memory one:
455430

456431
```log
457-
2023-03-31 14:19:23.987 INFO 68528 --- [ restartedMain] c.s.c.bookshop.Application : The following 1 profile is active: "local-mtxs"
432+
2023-03-31 14:19:23.987 INFO 68528 --- [ restartedMain] c.s.c.bookshop.Application : The following 1 profile is active: "with-mtx"
458433
...
459434
2023-03-31 14:19:23.987 INFO 68528 --- [ restartedMain] c.s.c.services.impl.ServiceCatalogImpl : Registered service ExtensibilityService$Default
460435
2023-03-31 14:19:23.999 INFO 68528 --- [ restartedMain] c.s.c.services.impl.ServiceCatalogImpl : Registered service CatalogService

0 commit comments

Comments
 (0)