Skip to content

Commit dbd2fe2

Browse files
committed
Merge branch 'release/5.0'
2 parents b744d61 + 724fa91 commit dbd2fe2

File tree

47 files changed

+1227
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1227
-188
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ build/
5959

6060
### VS Code ###
6161
.vscode/
62+
63+
### Special files
64+
test-em-all-external-auth.sh

README.md

Lines changed: 73 additions & 73 deletions
Large diffs are not rendered by default.

config/keystore/edge.p12

2.57 KB
Binary file not shown.

docker-compose-kafka.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,21 @@ services:
120120
gateway:
121121
build: store-cloud-infra/edge-server
122122
ports:
123-
- "8080:8080"
123+
- "8443:8443"
124+
environment:
125+
- SPRING_PROFILES_ACTIVE=docker
126+
- SERVER_SSL_KEY_STORE=file:/keystore/edge.p12
127+
- SERVER_SSL_KEY_STORE_PASSWORD=password
128+
volumes:
129+
- $PWD/config/keystore:/keystore
130+
depends_on:
131+
- eureka
132+
restart: on-failure
133+
## End - Edge Server definition
134+
135+
## Start - Edge Server definition
136+
auth-server:
137+
build: store-cloud-infra/authorization-server
124138
environment:
125139
- SPRING_PROFILES_ACTIVE=docker
126140
depends_on:

docker-compose-partitions.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,21 @@ services:
106106
gateway:
107107
build: store-cloud-infra/edge-server
108108
ports:
109-
- "8080:8080"
109+
- "8443:8443"
110+
environment:
111+
- SPRING_PROFILES_ACTIVE=docker
112+
- SERVER_SSL_KEY_STORE=file:/keystore/edge.p12
113+
- SERVER_SSL_KEY_STORE_PASSWORD=password
114+
volumes:
115+
- $PWD/config/keystore:/keystore
116+
depends_on:
117+
- eureka
118+
restart: on-failure
119+
## End - Edge Server definition
120+
121+
## Start - Edge Server definition
122+
auth-server:
123+
build: store-cloud-infra/authorization-server
110124
environment:
111125
- SPRING_PROFILES_ACTIVE=docker
112126
depends_on:

docker-compose.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ services:
3737
store:
3838
build: store-services/store-service
3939
environment:
40+
# - SPRING_PROFILES_ACTIVE=external-OAuth-Provider
4041
- SPRING_PROFILES_ACTIVE=docker
4142
depends_on:
4243
- rabbitmq
@@ -54,7 +55,23 @@ services:
5455
gateway:
5556
build: store-cloud-infra/edge-server
5657
ports:
57-
- "8080:8080"
58+
- "8443:8443"
59+
environment:
60+
# - SPRING_PROFILES_ACTIVE=external-OAuth-Provider
61+
- SPRING_PROFILES_ACTIVE=docker
62+
# dynamically change certificate at run time
63+
- SERVER_SSL_KEY_STORE=file:/keystore/edge.p12
64+
- SERVER_SSL_KEY_STORE_PASSWORD=password
65+
volumes:
66+
- $PWD/config/keystore:/keystore
67+
depends_on:
68+
- eureka
69+
restart: on-failure
70+
## End - Edge Server definition
71+
72+
## Start - Edge Server definition
73+
auth-server:
74+
build: store-cloud-infra/authorization-server
5875
environment:
5976
- SPRING_PROFILES_ACTIVE=docker
6077
depends_on:

docs/diagram/app_ms_landscape.png

118 KB
Loading

docs/stage1/app_ms_landscape.png

-77.3 KB
Binary file not shown.

pom.xml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,40 @@
88
<artifactId>store-aggregator</artifactId>
99
<version>1.0-SNAPSHOT</version>
1010
<name>Springy Store Aggregator</name>
11-
<description>Aggregator pom project for Springy μServices</description>
11+
<description>Aggregator pom project for all Springy Store μServices</description>
1212
<packaging>pom</packaging>
1313

14+
<!-- Start - Springy Store Project Owner -->
15+
<developers>
16+
<developer>
17+
<id>0001</id>
18+
<name>Mohamed Taman</name>
19+
<email>mohamed.taman@gmail.com</email>
20+
<roles>
21+
<role>
22+
Sr. Enterprise Architect
23+
</role>
24+
<role>
25+
Lead Software Architect
26+
</role>
27+
</roles>
28+
</developer>
29+
</developers>
30+
<!-- End - Springy Store Project Owner -->
31+
<!-- Start - Springy Store source repository -->
32+
<scm>
33+
<connection>https://github.com/mohamed-taman/Springy-Store-Microservices.git</connection>
34+
<developerConnection>git@github.com:mohamed-taman/Springy-Store-Microservices.git</developerConnection>
35+
<tag>HEAD</tag>
36+
</scm>
37+
<!-- End - Springy Store source repository -->
38+
<!-- Start - Springy Store issue management -->
39+
<issueManagement>
40+
<system>GitHub</system>
41+
<url>https://github.com/mohamed-taman/Springy-Store-Microservices/issues</url>
42+
</issueManagement>
43+
<!-- End - Springy Store issue management -->
44+
1445
<properties>
1546
<maven.install.skip>true</maven.install.skip>
1647
<maven.deploy.skip>true</maven.deploy.skip>
@@ -28,7 +59,6 @@
2859
<module>store-services/store-service</module>
2960
<module>store-cloud-infra/eureka-server</module>
3061
<module>store-cloud-infra/edge-server</module>
31-
32-
62+
<module>store-cloud-infra/authorization-server</module>
3363
</modules>
3464
</project>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#### Start of builder image
2+
# ------------------------
3+
# Builder stage to prepare application for final image
4+
FROM openjdk:14-slim-buster as builder
5+
WORKDIR temp
6+
7+
# Fatjar location, but could be set to different location from command line
8+
ARG JAR_FILE=target/*.jar
9+
10+
# Copy fat jar file to current image builder
11+
COPY ${JAR_FILE} application.jar
12+
13+
# Extract the jar file layers
14+
RUN java -Djarmode=layertools -jar --enable-preview application.jar extract
15+
16+
# Workaround to avoid Copy command failure when directory is not exists.
17+
RUN test ! -d ./snapshot-dependencies \
18+
&& mkdir snapshot-dependencies \
19+
&& echo "Directory [snapshot-dependencies] created."
20+
21+
#### End of builder stage
22+
23+
#### Start of actual image
24+
# ------------------------
25+
# Build image based on JDK 14 base image, based on latest debian buster OS
26+
FROM openjdk:14-slim-buster
27+
VOLUME /tmp
28+
29+
# Set image information, but could be set to different location from command line
30+
ARG IMAGE_VERSION="1.0-SNAPSHOT"
31+
ARG IMAGE_NAME="Authorization Server"
32+
ARG MAINTAINER="Mohamed Taman <mohamed.taman@gmail.com>"
33+
34+
LABEL version=${IMAGE_VERSION} name=${IMAGE_NAME} maintainer=${MAINTAINER}
35+
36+
# Limiting security access to not user root user
37+
RUN addgroup siriusxi && useradd -g siriusxi -ms /bin/bash taman
38+
39+
# Setting user to current created user
40+
USER taman
41+
42+
# Set working directory to application folder
43+
WORKDIR /home/taman/application
44+
45+
# Copy all layers from builder stage to current image
46+
COPY --from=builder temp/dependencies/ ./
47+
COPY --from=builder temp/snapshot-dependencies/ ./
48+
COPY --from=builder temp/spring-boot-loader/ ./
49+
COPY --from=builder temp/application/ ./
50+
51+
# Expose current server to port 9999
52+
EXPOSE 9999
53+
54+
ARG JAVA_OPTS=""
55+
56+
# Run the application with JVM configs if any
57+
ENTRYPOINT ["bash", "-c", \
58+
"java -server --enable-preview -XX:+UseContainerSupport -XX:+ShowCodeDetailsInExceptionMessages \
59+
-XX:+AlwaysActAsServerClassMachine -XX:+UseG1GC -XX:+UseStringDeduplication ${JAVA_OPTS} \
60+
org.springframework.boot.loader.JarLauncher ${0} ${@}"]

0 commit comments

Comments
 (0)