build SAP CAP project with cloud native architecture
You can use your own docker registry.
docker build -t quay.io/cloud-native-public/cloud-native-cap-srv:0.0.4 -f cap-srv.Dockerfile .
docker push quay.io/cloud-native-public/cloud-native-cap-srv:0.0.4
docker build -t quay.io/cloud-native-public/cloud-native-cap-db:0.0.4 -f cap-db.Dockerfile .
docker push quay.io/cloud-native-public/cloud-native-cap-db:0.0.4
- configure the HANA instance to accept external connection from BTP Kyma Runtime
- create a
hdi-container
for storage in SAP BTP CF Runtime - create secret key & convert them fields to base64, and fill the values to
config-hana-dev.yml
Simply use the
kubectl
to deploy the artifacts.
# create and use namespace
kubectl create ns cloud-native-cap
kubectl config set-context --current --namespace=cloud-native-cap
# deploy hana config to namespace
kubectl apply -f config-hana-dev.yml
# deploy uaa to namespace
kubectl apply -f config-uaa.yml
# deploy to the namespace
kubectl apply -f deployment.yml
fresh typescript
support from SAP CAP framework
builtin debug configuration (nodejs) and docker image example
# login to cf firstly
cf service-key $SERVICE_INSTANCE $SERVICE_KEY_NAME | node scripts/to_secret.js > config-hana-dev.yml
cds compile srv --to xsuaa
MERGE following part to
package.json
{
"cds": {
"requires": {
"[production]": {
"auth": {
"strategy": "xsuaa"
},
"uaa": {
"kind": "xsuaa"
}
}
}
}
}
$ npm run test
> cloud-native-cap@1.0.0 test
> jest --runInBand
PASS test/example.test.ts
Example Service Test Suite
✓ should support basic CRUD (140 ms)
- static resources
- k8s Job network access failed (for HANA)