Coder Social home page Coder Social logo

springboot-with-scs's Introduction

SpringBoot with SCS on PAS

This is extension of springboot-performance-simulator where same project is integrated with Pivotal Spring Cloud Services This is to simulate performance by inducing latency, spiking memory usage, creating errors, etc and deploy on PCF (PAS).

Inspired by Making's spring store 2019 project

  • Pre-requisite

    a. SCS 3.1.x tile

    b. Create service for Service Registry

    cf create-service p.service-registry standard ad-registry-service
    

    c. Deploy zipkin app (for test only, ignore this if zipkin not required and remove from manifest)

    cd zipkin
    cf push --vars-file=vars-myenv.yml
    

    c. Create service for Zipkin

    cf cups adzipkin -p "{\"url\": \"https://adzipkin.apps.myenv.com\" }"
    # if you plan to use internal domain then create network policies for each app to bind to zipkin
    
  • Build & Deploy first app.

    # replace with your domain
    domain: apps.myenv.com
    
    # replace with your backend application name
    backend-app-name: backend-app
    
    # replace with your service-name for service registry
      services:
       - ad-registry-service
    
    # check application name
    # change registrationMethod to route if external route registration is required
    spring:
      application:
        name: adperfsimulator
      cloud:
        services:
          registrationMethod: direct
    
    • Build
    cd springboot-with-scs
    mvn clean package -DskipTests
    
  • Deploy app to PAS
cf7 push --vars-file=vars-myenv.yml
  • Build and Deploy second app.

Here same code is used to deploy two (2) different applications. adperformance will be configured to connect to backend-app

Flow: App to App

app_name: backend-app
# check application name
# change registrationMethod to route if external route registration is required
spring:
  application:
    name: backend-app
  cloud:
    services:
      registrationMethod: direct
  • Build app for second app deployment

  • Deploy app to PAS

    cf7 push --vars-file=vars-myenv.yml
    
  • Add network policy to allow container to container networking

    cf add-network-policy adperfsimulator --destination-app backend-app --protocol tcp --port 8080
    
  • Zipkin Dashboard Zipkin Dashboard

  • View inter service dependency Zipkin Dashboard

springboot-with-scs's People

Contributors

amlandatta avatar

Watchers

 avatar  avatar

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.