Testing CloudFoundry Apps..without CloudFoundry

About me

  • Technical Guidance Unit @ msg systems
  • organizer and speaker at #itconsapcj, now at it's 7th edition.   www.itconferencesap.com
  • Interests & Background:
    • Cloud-Native dev., CloudFoundry
    • DevOps, Continuous Everything
    • ABAP, BOPF, S/4HANA

https://people.sap.com/victor.ionescu

@ivictor88 ( <-- look here for slides )

ionescuv.github.io

Stay tuned for updates!

www.itconferencesap.com

Motivation

"create Order out of Chaos"

Sample architecture(XSA) on SAP Cloud Platform, Cloud Foundry

Test this!

Getting things to run

maven/npm

Environment

Security

Database

Downstream dependencies

Application Runtime

App Binaries

Networking

Platform services

There are many ways to get things done

"let's just disable security temporarily"

set JAVA_HOME=/jre1.8.0_121
...
doSomeLogic();
// commented out for testing
// callOtherSystem();
...

Snowflakes

Dev/Prod Parity

Test environment qualities

"Test-Environment-as-Code"

  • consistent
  • easy to set up
  • centrally managed
  • The Test Environment is your product
  • The development team is your customer

Test-Environment-as-Code

..now back to Cloud Foundry

  • open-source PaaS ("Linux of the Cloud")
  • handles building, deployment and monitoring of apps (Java, Node.JS and many more)
  • provides multiple services for the apps to use
  • hides complexities of underlying Infrastructure

Cloud Foundry Under the Hood

  • Containerization
    • => Buildpacks
  • Services
    • => Service brokers
    • => Application environment
  • Network
    • => Routes

Test Environment for SAP Cloud Platform, CF

Cloud Foundry space:

Test Environment:

Test Environment:

  • Containerization
    • => Buildpacks
  • Services
    • => Service brokers
    • => Application environment
  • Network
    • => Routes

Docker

cf service-keys

mustache
cf-local

container networking

Cloud Foundry

Test Environment

"docker-composing" the puzzle

version: '3'
services:
  launchpad:
    build: ../src/launchpad
    container_name: launchpad
    ports:
     - "8080:8080"
    networks: 
     - NET1
    environment:
     - PORT=8080
     - VCAP_SERVICES={"portal-services":[{"binding_name":null,"credentials":{...
     - DESTINATIONS=[{"name":"app1","url":"http://spring-app1","forwardAuthToken":true},...
     - sapui5url=https://sapui5.hana.ondemand.com/1.56.10
  app1:
    build: ../src/app
    container_name: spring-app1
    networks: 
     - NET1
    environment:     
     - SPRING_PROFILES_ACTIVE=cloud
     - VCAP_APPLICATION={}
     - VCAP_SERVICES={"postgresql":[{..."host":"mypostgres"..
  postgres:
    image: "postgres"
    container_name: mypostgres
    networks: 
     - NET1        
    environment:
     - POSTGRES_USER=postgres
     - POSTGRES_PASSWORD=postgres

Demo Time

or DIY:

https://people.sap.com/victor.ionescu

@ivictor88

ionescuv.github.io

Q&A

Testing CloudFoundry Apps..without CloudFoundry

By Victor Ionescu

Testing CloudFoundry Apps..without CloudFoundry

SAP InsideTrack Timisoara

  • 200
Loading comments...

More from Victor Ionescu