Git Product home page Git Product logo

kyma-demo's Introduction

Prerequisites

You need to have ( as manual prep)

  • an administrative access to an SAP BTP Global Account.
  • a shared mailbox .
  • a custom SAP IAS tenant
  • trust established between your global account and custom IAS tenant.
  • address of the shared maibloxbot added to administrator role collection on global account level.

Copy env/.env-template into env/.env file and fill in the missing variables:

  • Use email address of a shared mailbox (bot user) as a value for BTP_BOT_USER.
  • Invite bot user as as a P-user in the custom SAP IAS tenant. Having access to the shared mailbox, complete the invitation flow and set a strong password and store tha password in a secure vault. Use the password for BTP_BOT_PASSWORD.
  • The env-template assumes that canary landscape is used. It contains already proper values for BTP_BACKEND_URL and BTP_CUSTOM_IAS_DOMAIN. Adjust the values if needed.
  • Use the tenant name of your custom SAP IAS tenant as BTP_CUSTOM_IAS_TENANT
  • Adjust the BTP_KYMA_PLAN, BTP_SA_REGION and BTP_KYMA_REGION

Automated bootstrap

The following command ( executed from /hack folder) would

  • create btp platform resources, such as subaccount, entitlements, service instances for SAP IAS Application and Kyma environment
  • craft a one-off headless kubeconfig for initial access to kyma environment
  • download and use kyma@v3 CLI to create a service account based access
  • enable docker registry in the kyma environment
  • build the image of the bookstore service and push it to the kyma's internal docker registry.
  • deploy the bookstore service manifests

Pass an additional human user as a second argument in order to provide yourself access to the kyma runtime. Make sure you are also added to the users of the custom SAP IAS tenant.

cd hack 
./bootstrap.sh bla [email protected]

How it works

diagram

Verify

Read books

GET https://books.e9b2722.stage.kyma.ondemand.com

Add book

Issue JWT

export CLIENT_ID={IAS_APP_CLIENT_ID}
export CLIENT_SECRET={IAS_APP_CLIENT_SECRET}

export ENCODED_CREDENTIALS=$(echo -n "$CLIENT_ID:$CLIENT_SECRET" | base64)

curl -X POST "https://${IAS_TENANT}.accounts400.ondemand.com/oauth2/token?grant_type=client_credentials" -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic $ENCODED_CREDENTIALS"

export TOKEN={ACCESS_TOKEN}

Post a book

curl  -X POST https://books.e9b2722.stage.kyma.ondemand.com -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"author":"Astrid Lindgren","title":"Pippi Goes On Board"}'  

Traces

Enable telemetry module

Deploy Jaeger (with dependencies )and configure it as backend for traces in telemetry module:

make deploy_tracing

Inspect traces in browser https://jaeger.e9b2722.stage.kyma.ondemand.com/search

traces

kyma-demo's People

Contributors

kwiatekus avatar strekm avatar

Watchers

 avatar

Forkers

strekm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.