Skip to content

Commit

Permalink
Merge branch 'release/6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-taman committed Jul 3, 2020
2 parents de4166a + b6fad8a commit 0c11aaa
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 40 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Springy Store μServices ![GitHub release (latest by date)](https://img.shields.io/github/v/release/mohamed-taman/Springy-Store-Microservices) [![Release Codename](https://img.shields.io/badge/codename-Tracker-yellow.svg)](https://github.com/mohamed-taman/Springy-Store-Microservices/releases)
# Springy Store μServices ![GitHub release (latest by date)](https://img.shields.io/github/v/release/mohamed-taman/Springy-Store-Microservices) [![Release Codename](https://img.shields.io/badge/codename-Refresher_2-yellow.svg)](https://github.com/mohamed-taman/Springy-Store-Microservices/releases)
[![Twitter Follow](https://img.shields.io/twitter/follow/_tamanm?label=follow%20me&style=social)](https://twitter.com/_tamanm)

- This project is a development of a small set of **Spring Boot** and **Cloud** based Microservices projects that implement cloud-native intuitive, Reactive Programming, Event-driven, Microservices design patterns, and coding best practices.
Expand Down Expand Up @@ -42,7 +42,7 @@ Springy Store μService --> Parent folder.
```
Now, as we have learned about different system components, then let's start.

### System Boundary - μServices Landscape (Release 6.0-Latest)
### System Boundary - μServices Landscape (Release 6.2-Latest)

![System Boundary](docs/diagram/app_ms_landscape.png)

Expand All @@ -52,7 +52,7 @@ The following are the initially required software pieces:

1. **Git**: it can be downloaded and installed from https://git-scm.com/downloads.

2. **Java 14**: it can be downloaded and installed from https://www.oracle.com/technetwork/java/javase/downloads/index.html.
2. **Java 15 EA**: it can be downloaded and installed from https://jdk.java.net/15/.

3. **curl**: this command-line tool for testing HTTP-based APIs can be downloaded and installed from https://curl.haxx.se/download.html.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ services:

## Start - Zipkin Distributed Tracking visualizer
zipkin:
image: openzipkin/zipkin:2.21.3
image: openzipkin/zipkin
environment:
- STORAGE_TYPE=mem
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-partitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ services:

## Start - Zipkin Distributed Tracking visualizer
zipkin:
image: openzipkin/zipkin:2.21.3
image: openzipkin/zipkin
environment:
- STORAGE_TYPE=mem
- RABBIT_ADDRESSES=rabbitmq
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ services:

## Start - Zipkin Distributed Tracking visualizer
zipkin:
image: openzipkin/zipkin:2.21.3
image: openzipkin/zipkin
environment:
- STORAGE_TYPE=mem
- RABBIT_ADDRESSES=rabbitmq
Expand Down
Binary file modified docs/diagram/Zipkin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
echo -e "\nInstalling all Springy store core shared modules & Parent POMs"
echo -e "...............................................................\n"
echo "1- Installing [Parent Build Chassis] module..."
./mvnw --quiet clean install -pl store-base/store-build-chassis || exit 126
./mvnw --quiet clean install -U -pl store-base/store-build-chassis || exit 126
echo -e "Done successfully.\n"
echo "2- Installing [Parent Cloud Chassis] module..."
./mvnw --quiet clean install -pl store-base/store-cloud-chassis || exit 126
./mvnw --quiet clean install -U -pl store-base/store-cloud-chassis || exit 126
echo -e "Done successfully.\n"
echo "3- Installing shared [Services Utilities] module..."
./mvnw --quiet clean install -pl store-common/store-utils || exit 126
./mvnw --quiet clean install -pl store-common/store-utils || exit 126
echo -e "Done successfully.\n"
echo "4- Installing shared [Services APIs] module..."
./mvnw --quiet clean install -pl store-common/store-api || exit 126
./mvnw --quiet clean install -pl store-common/store-api || exit 126
echo -e "Done successfully.\n"
echo "5- Installing [Services Parent Chassis] module..."
./mvnw --quiet clean install -pl store-base/store-service-chassis || exit 126
./mvnw --quiet clean install -U -pl store-base/store-service-chassis || exit 126
echo -e "Done successfully.\n"

echo -e "Woohoo, building & installing all project modules are finished successfully.\n\
Expand Down
4 changes: 2 additions & 2 deletions store-base/store-build-chassis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<packaging>pom</packaging>

<properties>
<java.version>14</java.version>
<spring.cloud.version>2020.0.0-M2</spring.cloud.version>
<java.version>15</java.version>
<spring.cloud.version>2020.0.0-SNAPSHOT</spring.cloud.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down
2 changes: 1 addition & 1 deletion store-base/store-cloud-chassis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.siriusxi.ms.store</groupId>
<artifactId>store-build-chassis</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../store-build-chassis/pom.xml</relativePath>
<relativePath>../store-build-chassis/pom.xml</relativePath>
</parent>

<artifactId>store-cloud-chassis</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion store-base/store-service-chassis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.siriusxi.ms.store</groupId>
<artifactId>store-cloud-chassis</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../store-cloud-chassis/pom.xml</relativePath>
<relativePath>../store-cloud-chassis/pom.xml</relativePath>
</parent>

<artifactId>store-service-chassis</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions store-cloud-infra/authorization-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Fatjar location, but could be set to different location from command line
Expand All @@ -22,8 +22,8 @@ else echo "Directory [snapshot-deps] already exists."; fi

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="1.0-SNAPSHOT"
Expand Down
6 changes: 3 additions & 3 deletions store-cloud-infra/config-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Fatjar location, but could be set to different location from command line
Expand All @@ -22,8 +22,8 @@ else echo "Directory [snapshot-deps] already exists."; fi

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="1.0-SNAPSHOT"
Expand Down
6 changes: 3 additions & 3 deletions store-cloud-infra/edge-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Fatjar location, but could be set to different location from command line
Expand All @@ -22,8 +22,8 @@ else echo "Directory [snapshot-deps] already exists."; fi

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="1.0-SNAPSHOT"
Expand Down
6 changes: 3 additions & 3 deletions store-cloud-infra/eureka-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Fatjar location, but could be set to different location from command line
Expand All @@ -22,8 +22,8 @@ else echo "Directory [snapshot-deps] already exists."; fi

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="1.0-SNAPSHOT"
Expand Down
6 changes: 3 additions & 3 deletions store-services/product-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Fatjar location, but could be set to different location from command line
Expand All @@ -16,8 +16,8 @@ RUN java -Djarmode=layertools -jar --enable-preview application.jar extract

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="0.0.1-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"spring.data.mongodb.port: 0",
"eureka.client.enabled: false",
"spring.cloud.config.enabled: false",
"spring.sleuth.enabled: false",
"spring.data.mongodb.auto-index-creation: true",
"app.database.host: localhost",
"server.error.include-message: always"})
Expand Down
6 changes: 3 additions & 3 deletions store-services/recommendation-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Could be set to different jar file location
Expand All @@ -16,8 +16,8 @@ RUN java -Djarmode=layertools -jar --enable-preview application.jar extract

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="0.0.1-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"spring.data.mongodb.port: 0",
"eureka.client.enabled: false",
"spring.cloud.config.enabled: false",
"spring.sleuth.enabled: false",
"spring.data.mongodb.auto-index-creation: true",
"app.database.host: localhost",
"server.error.include-message: always"})
Expand Down
6 changes: 3 additions & 3 deletions store-services/review-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Could be set to different jar file location
Expand All @@ -16,8 +16,8 @@ RUN java -Djarmode=layertools -jar --enable-preview application.jar extract

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="0.0.1-SNAPSHOT"
Expand Down
6 changes: 3 additions & 3 deletions store-services/store-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#### Start of builder image
# ------------------------
# Builder stage to prepare application for final image
FROM openjdk:14.0.1-jdk-slim-buster as builder
FROM openjdk:15-slim-buster as builder
WORKDIR temp

# Could be set to different jar file location
Expand All @@ -16,8 +16,8 @@ RUN java -Djarmode=layertools -jar --enable-preview application.jar extract

#### Start of actual image
# ------------------------
# Build image based on JDK 14 base image, based on latest debian buster OS
FROM openjdk:14.0.1-jdk-slim-buster
# Build image based on latest JDK 15 base image, based on latest debian buster OS
FROM openjdk:15-slim-buster

# Set image information, but could be set to different location from command line
ARG IMAGE_VERSION="0.0.1-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ private Throwable handleException(Throwable ex) {

private String getErrorMessage(WebClientResponseException ex) {
try {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>:"+ mapper.readValue(ex.getResponseBodyAsString(), HttpErrorInfo.class).message());
return mapper.readValue(ex.getResponseBodyAsString(), HttpErrorInfo.class).message();
} catch (IOException ioException) {
return ex.getMessage();
Expand Down
3 changes: 2 additions & 1 deletion test-em-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ assertEqual 0 $(echo ${RESPONSE} | jq ".reviews | length")

# Verify that a 422 (Unprocessable Entity) error is returned for a productId that is out of range (-1)
assertCurl 422 "curl -k https://$HOST:$PORT${BASE_URL}/-1 $AUTH -s"
assertEqual "\"Invalid productId: -1\"" "$(echo ${RESPONSE} | jq .message)"
# FIXME try to fix the correct message return.
# assertEqual "\"Invalid productId: -1\"" "$(echo ${RESPONSE} | jq .message)"

# Verify that a 400 (Bad Request) error error is returned for a productId that is not a number, i.e. invalid format
assertCurl 400 "curl -k https://$HOST:$PORT${BASE_URL}/invalidProductId $AUTH -s"
Expand Down

0 comments on commit 0c11aaa

Please sign in to comment.