Coder Social home page Coder Social logo

sscs-hmc-stub's Introduction

SSCS HMC Stub

Coverage Code Smells Duplicated Lines (%) Maintainability Rating Reliability Rating Technical Debt

HMC Stub is a spring boot based application to mock HMC requests

Notes

Since Spring Boot 2.1 bean overriding is disabled. If you want to enable it you will need to set spring.main.allow-bean-definition-overriding to true.

JUnit 5 is now enabled by default in the project. Please refrain from using JUnit4 and use the next generation

Building and deploying the application

Building the application

The project uses Gradle as a build tool. It already contains ./gradlew wrapper script, so there's no need to install gradle.

To build the project execute the following command:

  ./gradlew build

Running the application

Create the image of the application by executing the following command:

  ./gradlew assemble

Create docker image:

  docker-compose build

Run the distribution (created in build/install/sscs-hmc-stub directory) by executing the following command:

  docker-compose up

This will start the API container exposing the application's port (set to 8100 in this template app).

In order to test if the application is up, you can call its health endpoint:

  curl http://localhost:8100/health

You should get a response similar to this:

  {"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}

Alternative script to run application

To skip all the setting up and building, just execute the following command:

./bin/run-in-docker.sh

For more information:

./bin/run-in-docker.sh -h

Script includes bare minimum environment variables necessary to start api instance. Whenever any variable is changed or any other script regarding docker image/container build, the suggested way to ensure all is cleaned up properly is by this command:

docker-compose rm

It clears stopped containers correctly. Might consider removing clutter of images too, especially the ones fiddled with:

docker images

docker image rm <image-id>

There is no need to remove postgres and java or similar core images.

Other

Hystrix offers much more than Circuit Breaker pattern implementation or command monitoring. Here are some other functionalities it provides:

License

This project is licensed under the MIT License - see the LICENSE file for details

sscs-hmc-stub's People

Contributors

adusumillipraveen avatar alexsoliri avatar chris-pateman avatar chrisgrimble avatar david-gimelle avatar dependabot-preview[bot] avatar dependabot[bot] avatar doncem avatar endakelly avatar hannah38 avatar kevinjcross avatar klawani avatar lgonczar avatar linusnorton avatar louisehuyton avatar luigibk avatar mokainos avatar msl8r avatar nitinprabhu avatar njrich28 avatar paulridout avatar raghera avatar reespozzi avatar renovate[bot] avatar rkondratowicz avatar sparkeroo96 avatar tabbyc avatar teawithlucas avatar timja avatar

Watchers

 avatar  avatar  avatar

sscs-hmc-stub's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update Spring All (major) (org.springframework.cloud:spring-cloud-dependencies, org.springframework.boot:spring-boot-starter-activemq)
  • Update dependency com.github.hmcts:service-auth-provider-java-client to v5.2.0
  • Update Logging to v1.5.7 (ch.qos.logback:logback-classic, ch.qos.logback:logback-core)
  • Update hmctspublic.azurecr.io/base/java Docker tag to v21
  • Update Testing (org.junit:junit-bom, com.github.ben-manes.versions)
  • Update Tools - General (commons-io:commons-io, jakarta.servlet:jakarta.servlet-api)
  • Update Networking (io.rest-assured:rest-assured, org.springdoc:springdoc-openapi-starter-webmvc-ui)
  • Update dependency hashicorp/terraform to v1.9.4
  • Update Github to v4 (major) (actions/checkout, actions/setup-java)
  • Update Helm release java to v5
  • Update dependency pmd to v7
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 17-distroless
github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • actions/setup-java v3
gradle
build.gradle
  • io.spring.dependency-management 1.1.0
  • org.springframework.boot 3.0.2
  • org.owasp.dependencycheck 8.0.1
  • com.github.ben-manes.versions 0.46.0
  • org.sonarqube 3.5.0.2730
  • checkstyle 10.6.0
  • pmd 6.55.0
  • org.springframework.boot:spring-boot-starter-activemq 2.7.8
  • org.springframework.cloud:spring-cloud-starter 4.0.1
  • org.springframework.cloud:spring-cloud-starter-openfeign 4.0.1
  • com.github.hmcts:service-auth-provider-java-client 5.0.0
  • com.github.hmcts:sscs-common 4.24.3
  • org.apache.qpid:qpid-jms-client 2.5.0
  • jakarta.jms:jakarta.jms-api 3.1.0
  • jakarta.servlet:jakarta.servlet-api 6.0.0
  • org.springdoc:springdoc-openapi-starter-webmvc-ui 2.5.0
  • com.github.hmcts.java-logging:logging 5.1.9
  • org.apache.logging.log4j:log4j-to-slf4j 2.23.1
  • ch.qos.logback:logback-core 1.5.5
  • ch.qos.logback:logback-classic 1.5.5
  • io.rest-assured:rest-assured 5.4.0
  • commons-io:commons-io 2.11.0
  • org.junit:junit-bom 5.9.2
  • org.springframework.cloud:spring-cloud-dependencies 2022.0.1
  • org.yaml:snakeyaml 1.33
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 7.6.4
helm-requirements
charts/sscs-hmc-stub/Chart.yaml
  • java 4.0.11
helm-values
charts/sscs-hmc-stub/values.yaml
helmv3
charts/sscs-hmc-stub/Chart.yaml
  • java 4.0.11
terraform
infrastructure/main.tf
infrastructure/service-bus.tf
infrastructure/state.tf
  • azurerm ~> 3.6.0
terraform-version
infrastructure/.terraform-version
  • hashicorp/terraform 1.8.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.