Skip to content

Commit 62cc7d1

Browse files
committed
aws tests
1 parent 55ba859 commit 62cc7d1

6 files changed

Lines changed: 136 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Monitoring using Hystrix dashboard and Turbine, Administrating using Spring admi
1111
Log management with Elastic search, Logstash and Kibana (ELK), Server load balancing with Nginx,
1212
Infrastructure management with Docker-compose, JMX application monitoring,
1313
Security with Spring Security OAuth, Oauth2 with JWT, Aspect Oriented Programing,
14-
Distributed events with Kafka, Maven Multimodule project, Event Sourcing,
14+
Distributed events with Kafka, Spring Stream Maven Multimodule project, Event Sourcing,
1515
CQRS, REST, Web Sockets, Continuous deploy with Jenkins, and all developed using Java 8.
1616

1717
![Alt text](microservices-architecture.jpg?raw=true "microservices architecture")

aws-compose.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
version: '2'
2+
3+
services:
4+
5+
config:
6+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:config-server
7+
ports:
8+
- 8888:8888
9+
hostname: config
10+
container_name: config
11+
external_links:
12+
- elk
13+
- kafka
14+
mem_limit: 1025288000
15+
cpu_shares: 100
16+
extra_hosts:
17+
- "eureka:52.51.233.183"
18+
19+
20+
user:
21+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:user-service
22+
ports:
23+
- 8016:8016
24+
networks:
25+
- net
26+
depends_on:
27+
- eureka
28+
- admin
29+
hostname: user
30+
container_name: user
31+
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
32+
external_links:
33+
- elk
34+
- kafka
35+
mem_limit: 1025288000
36+
cpu_shares: 100
37+
extra_hosts:
38+
- "config:52.51.233.183"
39+
- "eureka:52.51.233.183"
40+
41+
42+
oauth:
43+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:oauth-server
44+
ports:
45+
- 8017:8017
46+
depends_on:
47+
- eureka
48+
- user
49+
- admin
50+
hostname: oauth
51+
container_name: oauth
52+
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
53+
external_links:
54+
- elk
55+
mem_limit: 1025288000
56+
cpu_shares: 100
57+
extra_hosts:
58+
- "config:52.51.233.183"
59+
- "eureka:52.51.233.183"
60+
61+
62+
63+
mail:
64+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:mail-service
65+
ports:
66+
- 8020:8020
67+
depends_on:
68+
- eureka
69+
- admin
70+
hostname: mail
71+
container_name: mail
72+
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
73+
external_links:
74+
- elk
75+
- kafka
76+
mem_limit: 1025288000
77+
cpu_shares: 100
78+
extra_hosts:
79+
- "config:52.51.233.183"
80+
- "eureka:52.51.233.183"
81+
82+
83+
admin:
84+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:admin-server
85+
depends_on:
86+
- eureka
87+
container_name: admin
88+
ports:
89+
- 8026:8026
90+
environment:
91+
- EUREKA_SERVICE_URL=http://eureka:8010
92+
- EUREKA_INSTANCE_PREFER_IP_ADDRESS=true
93+
- LOGGING_FILE=/tmp/admin.log
94+
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
95+
external_links:
96+
- elk
97+
mem_limit: 1225288000
98+
cpu_shares: 100
99+
extra_hosts:
100+
- "config:52.51.233.183"
101+
- "eureka:52.51.233.183"
102+
103+
eureka:
104+
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:eureka-server
105+
ports:
106+
- 8010:8010
107+
depends_on:
108+
- config
109+
hostname: eureka
110+
container_name: eureka
111+
command: ["./wait-for-it.sh","config:8888","--timeout=100","--","/usr/local/bin/start.sh"]
112+
external_links:
113+
- elk
114+
mem_limit: 1025288000
115+
cpu_shares: 100
116+
extra_hosts:
117+
- "config:52.51.233.183"
118+
119+
120+
volumes:
121+
todo_data:
122+
external: true
123+
todo_elk:
124+
external: true
125+

infra-docker-compose.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ services:
77
- 5601:5601
88
- 9200:9200
99
- 5044:5044
10-
- 5000:5000
10+
- 5001:5000
1111
networks:
1212
- net
1313
volumes:
1414
- todo_elk:/var/lib/elasticsearch
1515
hostname: elk
1616
container_name: elk
17+
mem_limit: 4925288000
18+
cpu_shares: 500
1719

1820
zookeeper:
1921
image: wurstmeister/zookeeper
2022
ports:
2123
- 2181:2181
2224
networks:
2325
- net
24-
26+
mem_limit: 925288000
27+
cpu_shares: 100
28+
2529
kafka:
2630
image: wurstmeister/kafka
2731
ports:
@@ -38,7 +42,8 @@ services:
3842
container_name: kafka
3943
networks:
4044
- net
41-
45+
mem_limit: 925288000
46+
cpu_shares: 100
4247

4348
volumes:
4449
todo_data:

jmx-monitoring/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>com.apssouza.monitoring</groupId>
87
<artifactId>jmx-monitoring</artifactId>
98
<version>0.0.1-SNAPSHOT</version>
109
<packaging>jar</packaging>

package-projects.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -ex
44

5-
mvn clean package
5+
mvn clean install
66
mvn -f ./remainder-service/pom.xml -Pdockerimage docker:build
77
mvn -f ./eureka-server/pom.xml -Pdockerimage docker:build
88
mvn -f ./config-server/pom.xml -Pdockerimage docker:build

remainder-service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</dependency>
5757

5858
<dependency>
59-
<groupId>com.apssouza.monitoring</groupId>
59+
<groupId>com.apssouza</groupId>
6060
<artifactId>jmx-monitoring</artifactId>
6161
<version>0.0.1-SNAPSHOT</version>
6262
</dependency>

0 commit comments

Comments
 (0)