This is a sample app for the travel reference scenario, built with the SAP Cloud Application Programming Model (CAP) and SAP Fiori Elements.
The purpose of this sample app is to:
- Demonstrate SAP Fiori annotations
- Demonstrate and compare SAP Fiori features on various stacks (CAP Node.js, CAP Java SDK, ABAP)
- Run UI test suites on various stacks
The app still contains some workarounds that are going to be addressed over time. In some cases, the model and the handlers can be improved or simplified once further planned CAP features become available. In other cases, the app itself could be improved. For example, calculation of the total price for a travel currently simply sums up the single prices ignoring the currencies.
- In a console, execute
npm ci
in the root folder of your project. - In a console, execute
cds watch
in the root folder of your project.
Open this link in your browser: http://localhost:4004/travel_processor/webapp/index.html
To start OPA tests, open this link in your browser: http://localhost:4004/travel_processor/webapp/test/integration/Opa.qunit.html
Test documentation is available at: https://ui5.sap.com/#/api/sap.fe.test
-
Login to AWS EC2 Console and create a security group called cap-samples Allow access to the following ports:
- 22 (SSH)
- 80 (HTTP)
- 81 (nginx)
- 389 (LDAP)
- 443 (HTTPS)
- 50000 (DB2)
-
Create AWS Secrets in IAM
-
Set your credentials as environment variables. You can also set them for your codespaces
-
Create a key pair called cap-samples
-
Set the private key of your key pair in Github as Codespace secret ID_RSA
-
Open repository in codespace
-
Set your values inside
ansible/external_vars.yml
-
Run in terminal
npm run ansible:create
to create and configure a new ec2 instance -
Create an Elastic IP and allocate it to the newly create EC instance
-
Register a new domain with the hoster of your choice and create the following subdomains. Set for the main and the subdomains an A record with the IP of your server - cockpit.db2-cap-samples.de - login.db2-cap-samples.de - auth.db2-cap-samples.de - proxy.db2-cap-samples.de - webhook.db2-cap-samples.de
-
Login to nginx proxy and add new proxy hosts - Initial user: admin@example.com - Initial password: changeme - login.db2-cap-samples.de Port: 4443 - auth.db2-cap-samples.de Port: 4444 - db2-cap-samples.de Port: 4004 - webhook.db2-cap-samples.de Port: 9000 - proxy.db2-cap-samples.de Port: 81 - cockpit.db2-cap-samples.de Port: 9090
-
Set a new Github Action secret
DEPLOY_WEBHOOK_URL
: https://webhook.db2-cap-samples/hooks/redeployment?secret=fancySecret -
Create a new Github Action secret
PAT
with your Personal Access Token -
Create a new deploy key and set the private key as
COMMIT_KEY