{"id":21451133,"url":"https://github.com/soontao/cloud-native-cap","last_synced_at":"2026-01-03T22:13:29.683Z","repository":{"id":40926027,"uuid":"385912304","full_name":"Soontao/cloud-native-cap","owner":"Soontao","description":"cloud native cap project template","archived":false,"fork":false,"pushed_at":"2023-12-15T17:38:54.000Z","size":830,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-23T12:25:17.040Z","etag":null,"topics":["cap","cloudnative","sap"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soontao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-07-14T11:13:49.000Z","updated_at":"2022-10-21T12:43:45.000Z","dependencies_parsed_at":"2023-12-15T18:49:40.465Z","dependency_job_id":null,"html_url":"https://github.com/Soontao/cloud-native-cap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Fcloud-native-cap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Fcloud-native-cap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Fcloud-native-cap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Fcloud-native-cap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soontao","download_url":"https://codeload.github.com/Soontao/cloud-native-cap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243963769,"owners_count":20375675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cap","cloudnative","sap"],"created_at":"2024-11-23T04:18:22.622Z","updated_at":"2026-01-03T22:13:29.627Z","avatar_url":"https://github.com/Soontao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-native-cap\n\n[![node-test](https://github.com/Soontao/cloud-native-cap/actions/workflows/node-test.yml/badge.svg)](https://github.com/Soontao/cloud-native-cap/actions/workflows/node-test.yml)\n\n\u003e build SAP CAP project with cloud native architecture\n\n- [cloud-native-cap](#cloud-native-cap)\n  - [build images](#build-images)\n  - [prepare HANA secrets](#prepare-hana-secrets)\n  - [deploy](#deploy)\n  - [tooltips](#tooltips)\n    - [typescript support](#typescript-support)\n    - [convert cf credentials to k8s secret](#convert-cf-credentials-to-k8s-secret)\n    - [convert cds modeling to xs-security.json (manually adjustment required)](#convert-cds-modeling-to-xs-securityjson-manually-adjustment-required)\n    - [add xsuaa authentication/authorization for service](#add-xsuaa-authenticationauthorization-for-service)\n    - [built-in jest support](#built-in-jest-support)\n  - [other topics](#other-topics)\n\n## build images\n\n\u003e You can use your own docker registry.\n\n```bash\ndocker build -t quay.io/cloud-native-public/cloud-native-cap-srv:0.0.4 -f cap-srv.Dockerfile .\ndocker push quay.io/cloud-native-public/cloud-native-cap-srv:0.0.4\ndocker build -t quay.io/cloud-native-public/cloud-native-cap-db:0.0.4 -f cap-db.Dockerfile .\ndocker push quay.io/cloud-native-public/cloud-native-cap-db:0.0.4\n```\n\n## prepare HANA secrets\n\n* [configure the HANA instance to accept external connection from BTP Kyma Runtime](https://gist.github.com/Soontao/2d39877071ed0574377fcdb68a1c58df)\n* create a `hdi-container` for storage in SAP BTP CF Runtime\n* create secret key \u0026 convert them fields to base64, and fill the values to `config-hana-dev.yml`\n\n## deploy\n\n\u003e Simply use the `kubectl` to deploy the artifacts.\n\n```bash\n# create and use namespace\nkubectl create ns cloud-native-cap\nkubectl config set-context --current --namespace=cloud-native-cap\n# deploy hana config to namespace\nkubectl apply -f config-hana-dev.yml\n# deploy uaa to namespace\nkubectl apply -f config-uaa.yml\n# deploy to the namespace\nkubectl apply -f deployment.yml\n```\n\n## tooltips\n\n### typescript support\n\nfresh [`typescript`](https://cap.cloud.sap/docs/get-started/using-typescript) support from SAP CAP framework \n\nbuiltin debug configuration (nodejs) and docker image example\n\n### convert cf credentials to k8s secret\n\n```bash\n# login to cf firstly\ncf service-key $SERVICE_INSTANCE $SERVICE_KEY_NAME | node scripts/to_secret.js \u003e config-hana-dev.yml \n```\n\n### convert cds modeling to xs-security.json (manually adjustment required)\n\n```bash\ncds compile srv --to xsuaa\n```\n\n### add xsuaa authentication/authorization for service\n\n\u003e MERGE following part to `package.json`\n\n```json\n{\n  \"cds\": {\n    \"requires\": {\n      \"[production]\": {\n        \"auth\": {\n          \"strategy\": \"xsuaa\"\n        },\n        \"uaa\": {\n          \"kind\": \"xsuaa\"\n        }\n      }\n    }\n  }\n}\n```\n\n### built-in jest support\n\n```bash\n$ npm run test\n\n\u003e cloud-native-cap@1.0.0 test\n\u003e jest --runInBand\n\n PASS  test/example.test.ts\n  Example Service Test Suite\n    ✓ should support basic CRUD (140 ms)\n```\n\n\n## other topics\n\n* static resources\n* k8s Job network access failed (for HANA)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoontao%2Fcloud-native-cap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoontao%2Fcloud-native-cap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoontao%2Fcloud-native-cap/lists"}