Skip to content

Commit

Permalink
feat(cap): more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
longieirl committed Sep 28, 2023
1 parent 798e1e2 commit 42407c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
16 changes: 15 additions & 1 deletion cap/cap-fiori-hybrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,23 @@ The benefit? You can switch between local mock configuration and cloud service c
- Build the CAP and Fiori UI applications `npm run build`
- Deploy the CAP and Fiori UI applications `npm run deploy`

__CAP project is configured with security roles, any changes made locally need to be reflected both locally and remotely__

- Update the XSUAA security service `npm run cf:uaa:update`

__Ensure the security roles defined in `xs-security.json` are assigned to your user__

- [Set up the roles](https://cap.cloud.sap/docs/node.js/authentication#auth-in-cockpit) for your application

__Push some data to HANA__

The CAP project was created with samples, edit the csv file in the `data` folder

- Run `npm run deploy:hana`

__At this point, you have deployed your application to CF, if you run the CAP project locally using `npm run start` it will spin up the project using an in-memory database instance. Deployment has to occur first for the remaining steps to work as this will leverage the deployed HANA and UAA service instances__

- Bind to the XSUAA service `cds bind -2 managedAppCAPProject-xsuaa-service`
- Bind to the XSUAA service `cds bind -2 managedAppCAPProject-xsuaa-service --kind xsuaa`
- Bind to the HANA HDI service `cds bind -2 managedAppCAPProject-db`
- Spin up your CAP project in hybrid mode `npm run watch:hyrbid`

Expand Down
6 changes: 5 additions & 1 deletion cap/cap-fiori-hybrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@
"undeploy": "cf undeploy managedAppCAPProject --delete-services --delete-service-keys --delete-service-brokers",
"build": "rimraf resources mta_archives && mbt build --mtar archive",
"deploy": "cf deploy mta_archives/archive.mtar --retries 1",
"deploy:hana": "cds deploy --to hana --auto-undeploy --profile hybrid",
"watch:dummy": "cds watch --profile dummy",
"watch:hana": "cds watch --profile hana",
"watch:dev": "cds watch",
"watch:hybrid": "cds watch --profile hybrid --port 4004",
"check-uaa-config": "cds env list requires.uaa --resolve-bindings --profile hybrid",
"check-db-config": "cds env list requires.db --resolve-bindings --profile hybrid",
"install:localrouter": "cd localrouter && npm install",
"install:app": "npm install"
"install:app": "npm install",
"bind:hana": "cds bind -2 managedAppCAPProject-db --profile hybrid",
"bind:uaa": "cds bind -2 managedAppCAPProject-xsuaa-service --kind xsuaa",
"cf:uaa:update": "cf update-service managedAppCAPProject-xsuaa-service -c xs-security.json"
},
"eslintConfig": {
"extends": "eslint:recommended",
Expand Down

0 comments on commit 42407c6

Please sign in to comment.