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
The following was added to the bookshop example:
- Configuration for single tenant deployment
- Configuration for multi tenant deployment
- Handlers for multi tenant subscription
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,9 @@ Framework and Infrastructure-related Features:
43
43
-[Application configuration](https://cap.cloud.sap/docs/java/development#application-configuration) for Spring and CDS using [application.yaml](srv/src/main/resources/application.yaml)
44
44
-[Mocking users](/srv/src/main/resources/application.yaml) for local development
45
45
-[Authentication & Authorization](https://cap.cloud.sap/docs/java/advanced#security) (including user-specific restrictions with `@restrict` in the [Admin Service](/srv/admin-service.cds))
46
+
-[Cloud Foundry Deployment using MTA](https://cap.cloud.sap/docs/advanced/deploy-to-cloud#deploy-using-mta) with XSUAA [Service Bindings](mta-single-tenant.yaml)
47
+
- Application Router configuration including authentication via the XSUAA Service. See [package.json](app/package.json), [xs-app.json](app/xs-app.json) and [cds-security.json](cds-security.json)
48
+
-[Multitenancy configuration](https://cap.cloud.sap/docs/java/multitenancy) via [mta-multi-tenant.yaml](mta-multi-tenant.yaml), [.cdsrc.json](.cdsrc.json), [sidecar module](mtx-sidecar)
46
49
47
50
Domain Model related Features:
48
51
@@ -140,7 +143,7 @@ Optionally, use the following steps to import the project to Eclipse:
140
143
141
144
## Database Setup and Spring Profiles
142
145
143
-
The application comes with three predefined profiles: `default`, `sqlite`, and `cloud` (see `src/main/resources/application.yaml`).
146
+
The application comes with three predefined profiles: `default`, `sqlite`, and `cloud` (see `srv/src/main/resources/application.yaml`).
144
147
145
148
- The `default` profile specifies to use an in-memory SQLite database.
146
149
The in-memory database is set up automatically during startup of the application.
@@ -165,6 +168,30 @@ To switch from the default in-memory SQLite database to a file-based SQLite data
165
168
166
169
2. Edit your Run Configuration via **Run** > **Run Configurations...** and select enter the **Profile**`sqlite` on tab **Spring** and click **Run**.
167
170
171
+
## Deploy to SAP Cloud Platform
172
+
173
+
CAP Java applications can be deployed to the SAP Cloud Platform either in single tenant or in multitenancy mode (see [Multitenancy in CAP Java](https://cap.cloud.sap/docs/java/multitenancy) for more information.
174
+
175
+
Prerequisites:
176
+
- Install the [Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-tool/): `npm install -g mbt
177
+
- Install the [Cloud Foundry Command Line Interface](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html)
178
+
- Get a SAP Cloud Platform account to deploy the services and applications
179
+
180
+
Deploy as Single Tenant Application
181
+
- Rename `mta-single-tenant.yaml` to `mta.yaml`
182
+
- Run `mbt build`
183
+
- Run `cf login`
184
+
- Run `cf deploy mta_archives/bookshop-java-public_1.0.0.mtar`
185
+
186
+
Deploy as Multitenant Application:
187
+
- Create a SAP HANA Cloud Instance in your SAP Cloud Platform space
188
+
- Rename `mta-multi-tenant.yaml` to `mta.yaml`
189
+
- Run `mbt build`
190
+
- Run `cf login`
191
+
- Run `cf deploy mta_archives/bookshop-java-public_1.0.0.mtar`
192
+
- Go to another subaccount in your global account, under subscriptions and subscribe to the application you deployed
193
+
- Run `cf map-route bookshop-java-public-approuter <YOUR DOMAIN> --hostname <SUBSCRIBER TENANT>-<ORG>-<SPACE>-bookshop-java-public-approuter` or create and bind the route manually
194
+
168
195
# Get Support
169
196
170
197
Check out the documentation at [https://cap.cloud.sap](https://cap.cloud.sap).
0 commit comments