Uploaded image for project: 'Service Binding'
  1. Service Binding
  2. APPSVC-789

Run Spring PetClinic Sample Application

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • False
    • False
    • Undefined
    • AppSvc Sprint 194

      Ref. https://github.com/redhat-developer/service-binding-operator/issues/805

      PepClinic is a sample application for the Spring framework.

      Installing Spring PetClinic

      1. Clone repo

      git clone https://github.com/spring-projects/spring-petclinic

      2. Build package

      cd spring-petclinic
      ./mvnw package

      3. Save this into Dockerfile.sp (update version, if necessary)

      FROM openjdk:11.0.1-jre-slim-stretch
      EXPOSE 8080
      COPY readme.md /tmp
      ARG JAR=spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar
      COPY target/$JAR /app.jar
      ENTRYPOINT ["java","-jar","/app.jar"]

      3. Create docker image (replace baijum with your username)

      docker build -f ./Dockerfile.sp -t quay.io/baijum/petclinic:0.1.0 .

      3. Push the image to Quay (login is required)

      docker push quay.io/baijum/petclinic:0.1.0

      4. Login quay.io website and ensure the image is public
      (By default it will be private)

      The configuration to run the application is available in this repo:

      https://github.com/baijum/service-binding-operator (branch: petclinic)

      The files are under "examples/spring_petclinic" directory.

      You can SBO with these configurations and check if the service is coming up.

      I noticed these error in the log: https://gist.github.com/baijum/7e92a386631e4beb0c7c194785296c83

            bmuthuka Baiju Muthukadan
            bmuthuka Baiju Muthukadan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: