-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from soramitsu/query_with_reports
Dockerfile was added
- Loading branch information
Showing
4 changed files
with
320 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM maven:3.9.5-eclipse-temurin-11-alpine as builder | ||
|
||
RUN wget https://github.com/JetBrains/kotlin/releases/download/v1.8.0/kotlin-compiler-1.8.0.zip && \ | ||
unzip kotlin-compiler-1.8.0.zip -d /opt && \ | ||
rm kotlin-compiler-1.8.0.zip | ||
|
||
WORKDIR /app | ||
COPY pom.xml ./ | ||
COPY ./src ./src | ||
RUN mvn clean package | ||
|
||
FROM maven:3.9.5-eclipse-temurin-11-alpine | ||
|
||
ENV USER=iroha | ||
ENV UID=1000 | ||
ENV GID=1000 | ||
ENV MAVEN_CONFIG=/var/maven/.m2 | ||
USER root | ||
|
||
RUN set -ex && \ | ||
addgroup -g $GID $USER && \ | ||
adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--home /app \ | ||
--ingroup "$USER" \ | ||
--uid "$UID" \ | ||
"$USER" && \ | ||
mkdir -p $MAVEN_CONFIG && \ | ||
chown $USER:$USER -R $MAVEN_CONFIG | ||
|
||
WORKDIR /app | ||
COPY --from=builder /app/pom.xml ./ | ||
COPY --from=builder /app/target/ ./target/ | ||
|
||
USER $USER | ||
|
||
ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
version: "3" | ||
|
||
services: | ||
gatling: | ||
container_name: iroha2-perf | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
restart: unless-stopped | ||
mem_limit: 4G | ||
cpus: 16 | ||
working_dir: /app | ||
read_only: true | ||
tmpfs: | ||
- /tmp | ||
- /app/target/gatling | ||
- /var/log | ||
environment: | ||
MAVEN_CONFIG: /var/maven/.m2 | ||
command: > | ||
mvn gatling:test | ||
-Duser.home=/var/maven | ||
-Dgatling.simulationClass=jp.co.soramitsu.load.simulation.transaction.StabilitySimulation | ||
-DtargetProtocol=https | ||
-DtargetURL= | ||
-DremoteLogin= | ||
-DremotePass= | ||
-DlogLevel=INFO | ||
-Dconfiguration=standard | ||
-Dintensity=5 | ||
-DrampDuration=10 | ||
-DstageDuration=604800 | ||
networks: | ||
- iroha2-perf-net | ||
volumes: | ||
- gatling-volume:/var/maven/.m2 | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-perf' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
- 'filebeat.multiline.pattern=^\[\d{2}\.\d{2}\.\d{4}' | ||
- 'filebeat.multiline.negate=true' | ||
- 'filebeat.multiline.match=after' | ||
# - 'filebeat.module=docker' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:4567/health || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
pushgateway: | ||
container_name: pushgateway | ||
image: prom/pushgateway:v1.6.2 | ||
restart: unless-stopped | ||
mem_limit: 512M | ||
cpus: 1 | ||
ports: | ||
- "9091:9091" | ||
networks: | ||
- iroha2-perf-net | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-push-gw' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
# - 'filebeat.module=docker' | ||
|
||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:9091/-/healthy || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
networks: | ||
iroha2-perf-net: | ||
driver: bridge | ||
|
||
volumes: | ||
gatling-volume: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
version: "3" | ||
|
||
services: | ||
gatling: | ||
container_name: iroha2-perf | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
restart: unless-stopped | ||
mem_limit: 4G | ||
cpus: 16 | ||
working_dir: /app | ||
read_only: true | ||
tmpfs: | ||
- /tmp | ||
- /app/target/gatling | ||
- /var/log | ||
environment: | ||
MAVEN_CONFIG: /var/maven/.m2 | ||
command: > | ||
mvn gatling:test | ||
-Duser.home=/var/maven | ||
-Dgatling.simulationClass=jp.co.soramitsu.load.simulation.transaction.PerformanceSimulation | ||
-DtargetProtocol=https | ||
-DtargetURL= | ||
-DremoteLogin= | ||
-DremotePass= | ||
-DlogLevel=INFO | ||
-Dconfiguration=standard | ||
-DconcurrentUsers=1 | ||
-Dtimes=10000 | ||
-DeachLevelLasting=15 | ||
-DseparatedByRampsLasting=1 | ||
-DstartingFrom=0 | ||
networks: | ||
- iroha2-perf-net | ||
volumes: | ||
- gatling-volume:/var/maven/.m2 | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-perf' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
- 'filebeat.multiline.pattern=^\[\d{2}\.\d{2}\.\d{4}' | ||
- 'filebeat.multiline.negate=true' | ||
- 'filebeat.multiline.match=after' | ||
# - 'filebeat.module=docker' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:4567/health || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
pushgateway: | ||
container_name: pushgateway | ||
image: prom/pushgateway:v1.6.2 | ||
restart: unless-stopped | ||
mem_limit: 512M | ||
cpus: 1 | ||
ports: | ||
- "9091:9091" | ||
networks: | ||
- iroha2-perf-net | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-push-gw' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
# - 'filebeat.module=docker' | ||
|
||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:9091/-/healthy || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
networks: | ||
iroha2-perf-net: | ||
driver: bridge | ||
|
||
volumes: | ||
gatling-volume: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
version: "3" | ||
|
||
services: | ||
gatling: | ||
container_name: iroha2-perf | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
restart: unless-stopped | ||
mem_limit: 4G | ||
cpus: 16 | ||
working_dir: /app | ||
read_only: true | ||
tmpfs: | ||
- /tmp | ||
- /app/target/gatling | ||
- /var/log | ||
environment: | ||
MAVEN_CONFIG: /var/maven/.m2 | ||
command: > | ||
mvn gatling:test | ||
-Duser.home=/var/maven | ||
-Dgatling.simulationClass=jp.co.soramitsu.load.simulation.transaction.StressSimulation | ||
-DtargetProtocol=https | ||
-DtargetURL= | ||
-DtargetPath= | ||
-DremoteLogin= | ||
-DremotePass= | ||
-DlogLevel=INFO | ||
-Dconfiguration=standard | ||
-Dintensity=5 | ||
-DrampDuration=10 | ||
-DstageDuration=300 | ||
-DstressIntensity=20 | ||
-DstressRampDuration=1 | ||
-DstressDuration=300 | ||
networks: | ||
- iroha2-perf-net | ||
volumes: | ||
- gatling-volume:/var/maven/.m2 | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-perf' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
- 'filebeat.multiline.pattern=^\[\d{2}\.\d{2}\.\d{4}' | ||
- 'filebeat.multiline.negate=true' | ||
- 'filebeat.multiline.match=after' | ||
# - 'filebeat.module=docker' | ||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:4567/health || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
pushgateway: | ||
container_name: pushgateway | ||
image: prom/pushgateway:v1.6.2 | ||
restart: unless-stopped | ||
mem_limit: 512M | ||
cpus: 1 | ||
ports: | ||
- "9091:9091" | ||
networks: | ||
- iroha2-perf-net | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100m" | ||
max-file: "3" | ||
labels: | ||
- 'filebeat.fields.app=iroha2-push-gw' | ||
- 'filebeat.fields.env=tst' | ||
- 'filebeat.fields.project=iroha2-perf' | ||
- 'filebeat.fields.logtype=iroha2' | ||
# - 'filebeat.module=docker' | ||
|
||
healthcheck: | ||
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:9091/-/healthy || exit 1 | ||
interval: 1m | ||
timeout: 10s | ||
retries: 3 | ||
start_period: 1m | ||
|
||
networks: | ||
iroha2-perf-net: | ||
driver: bridge | ||
|
||
volumes: | ||
gatling-volume: |