-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'RM-4731_load_test_setup' into 'master'
RM-4730/4731: cdoc2-shares-server load testing setup See merge request cdoc2/cdoc2-gatling-tests!5
- Loading branch information
Showing
7 changed files
with
95 additions
and
69 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
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
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
12 changes: 12 additions & 0 deletions
12
cdoc2-shares-server/setup-load-testing/run-cdoc2-shares-server-liquibase.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,12 @@ | ||
#!/bin/bash | ||
|
||
# initialize or update database for cdoc2-shares-server | ||
source variables.sh | ||
|
||
DOCKER_IMAGE=${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/cdoc2-shares-server-liquibase:$SHARES_SERVER_VERSION | ||
|
||
docker run --rm \ | ||
--env DB_URL=$POSTGRES_URL/$POSTGRES_DB \ | ||
--env DB_PASSWORD=$POSTGRES_PASSWORD \ | ||
--env DB_USER=$POSTGRES_USER \ | ||
$DOCKER_IMAGE |
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
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 |
---|---|---|
@@ -1,5 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
source variables.sh | ||
|
||
scp -r ../setup-load-testing $LOAD_TEST_HOST:~/ | ||
|
||
echo "Coping to $DEST_HOST:$DEST_DIR" | ||
|
||
ssh $DEST_HOST "mkdir -p $DEST_DIR" | ||
ssh $DEST_HOST "mkdir -p $DEST_CONF_DIR" | ||
|
||
scp $CDOC2_SHARES_SERVER_DIR/shares-server/config/application.properties.docker $DEST_HOST:$DEST_CONF_DIR | ||
scp -r $CDOC2_SHARES_SERVER_DIR/shares-server/src/test/resources/sid-trusted-issuers $DEST_HOST:$DEST_CONF_DIR/ | ||
scp -r $CDOC2_SHARES_SERVER_DIR/shares-server/src/test/resources/keystore $DEST_HOST:$DEST_CONF_DIR/ | ||
scp $CDOC2_SHARES_SERVER_DIR/shares-server/src/test/resources/logback.xml $DEST_HOST:$DEST_CONF_DIR/ | ||
|
||
scp variables.sh $DEST_HOST:$DEST_DIR/ | ||
scp run-cdoc2-shares-server.sh $DEST_HOST:$DEST_DIR/ | ||
scp run-cdoc2-shares-server-liquibase.sh $DEST_HOST:$DEST_DIR/ |
32 changes: 24 additions & 8 deletions
32
cdoc2-shares-server/setup-load-testing/variables.sh.sample
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 |
---|---|---|
@@ -1,13 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
DOCKER_REGISTRY=ghcr.io | ||
DOCKER_REPOSITORY=open-eid | ||
SHARES_SERVER_VERSION=0.4.1-SNAPSHOT.0-3553a87e54851276c82ee734eebcc207aaf90088 | ||
|
||
# directory containing source cloned from https://github.com/open-eid/cdoc2-shares-server | ||
# used to copy development keys | ||
CDOC2_SHARES_SERVER_DIR=$(pwd)/../../cdoc2-shares-server | ||
# used to copy development keys and configuration files | ||
CDOC2_SHARES_SERVER_DIR=$(pwd)/../../../cdoc2-shares-server | ||
|
||
# linux host with docker installed in format username@host | ||
DEST_HOST=<user>@<host> | ||
|
||
# will contain cdoc2-shares-server configuration and scripts required to run cdoc2-shares-server in Docker | ||
DEST_DIR="~/shares-server" | ||
|
||
# cdoc2-shares-server configuration directory. Will contain application.properties and certificates | ||
DEST_CONF_DIR="${DEST_DIR}/config" | ||
|
||
# cdoc2-shares-server existing database (emtpy or existing) properties | ||
POSTGRES_URL=<DB_HOST>:5432 | ||
POSTGRES_DB=cdoc2-shares | ||
POSTGRES_USER=cdoc2 | ||
POSTGRES_PASSWORD=<DB_PASSWORD> | ||
|
||
CDOC2_DB_URL=jdbc:postgresql://<DB_HOST>/cdoc2 | ||
CDOC2_DB_USERNAME=<DB_USERNAME> | ||
CDOC2_DB_PASSWORD=<DB_PASSWORD> | ||
|
||
# host running cdoc2-shares-server Docker containers, with username | ||
# username@host | ||
LOAD_TEST_HOST=ubuntu@<RUN_HOST> | ||
# used to access https://$DEST_HOST:18442/actuator/prometheus and other endpoint | ||
CDOC2_ACTUATOR_USERNAME=username | ||
CDOC2_ACTUATOR_PASSWORD=change_it |