Skip to content

Soontao/cloud-native-cap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-native-cap

node-test

build SAP CAP project with cloud native architecture

build images

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

prepare HANA secrets

deploy

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

tooltips

typescript support

fresh typescript support from SAP CAP framework

builtin debug configuration (nodejs) and docker image example

convert cf credentials to k8s secret

# login to cf firstly
cf service-key $SERVICE_INSTANCE $SERVICE_KEY_NAME | node scripts/to_secret.js > config-hana-dev.yml 

convert cds modeling to xs-security.json (manually adjustment required)

cds compile srv --to xsuaa

add xsuaa authentication/authorization for service

MERGE following part to package.json

{
  "cds": {
    "requires": {
      "[production]": {
        "auth": {
          "strategy": "xsuaa"
        },
        "uaa": {
          "kind": "xsuaa"
        }
      }
    }
  }
}

built-in jest support

$ 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)

other topics

  • static resources
  • k8s Job network access failed (for HANA)

About

cloud native cap project template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published