Skip to content

Commit

Permalink
Merge pull request #2340 from zebrunner/develop
Browse files Browse the repository at this point in the history
1.28 rc
  • Loading branch information
vdelendik authored Apr 24, 2023
2 parents 9eb826e + 32067ef commit 4973110
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env.original
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TAG_REPORTING_UI=1.26.0
TAG_REPORTING_SERVICE=1.26.2
TAG_REPORTING_SERVICE=1.28.0
TAG_ARTIFACTS_PROXY_SERVICE=1.8.0
TAG_MAIL_SERVICE=1.5
TAG_IAM_SERVICE=1.15.0
Expand Down
10 changes: 10 additions & 0 deletions configuration/zebrunner-proxy/nginx.conf.original
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ http {
resolver 127.0.0.11 valid=30s;
resolver_timeout 10s;

# Uncomment below block to setup SSL on this NGiNX instance. make sure to put ssl.crt and ssl.key to nginx/ssl shared folder
# ssl_certificate /etc/nginx/ssl/ssl.crt;
# ssl_certificate_key /etc/nginx/ssl/ssl.key;
# ssl_session_timeout 5m;
# ssl_session_cache shared:SSL:10m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
# ssl_prefer_server_ciphers on;


location / {
proxy_pass http://reporting-ui-server/;
}
Expand Down
33 changes: 33 additions & 0 deletions configuration/zebrunner-proxy/ssl/ssl.crt.original
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----BEGIN CERTIFICATE-----
MIIFrzCCA5egAwIBAgIUdm5LjzUnY31xxP+cyfqkDSEFBjwwDQYJKoZIhvcNAQEL
BQAwZzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlSb3Nldmls
bGUxFjAUBgNVBAoMDVplYnJ1bm5lciBJbmMxCzAJBgNVBAsMAlFBMRIwEAYDVQQD
DAlsb2NhbGhvc3QwHhcNMjExMDA5MTE1MjI5WhcNMzExMDA3MTE1MjI5WjBnMQsw
CQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCVJvc2V2aWxsZTEWMBQG
A1UECgwNWmVicnVubmVyIEluYzELMAkGA1UECwwCUUExEjAQBgNVBAMMCWxvY2Fs
aG9zdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAOYJs/SBjPNBoiuk
m0HKMBgsmSerEmx99uMjRJn9+KXi6m198hPEQOjXQklsxP9sdQYMFQTx9JTFQ9SG
uuNzrAq2npkndNoT5czWNib/hPc6xg50ujBldugcHfNE1enqxq8ysltkeN3cz50g
auYKro7jdzBRUKwhB+AOHdmv/Sx5wHpSTOJHtvB40I1/5Com+ysvG3vhoNuupUE0
sdOs8Tqdgo8fW4gYFkb/a0s7boNrE27qbP0ImPnaRMP3nNe3ug29AiB71Z/FNSpN
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lXnMZuzRAcF1POnuHx6FOF/EzQJ+9fh9jFf1DDE2YlL
I/7mhKe4ieLU2Z3xl7KRcrG3B85r57/qgDfGDffzKfE0ZS6U725Z/NaxQBgfxM/7
FIG3pLwOV3OzdUDEZz4sfvitzqprzBUzVSmfD2PbPapQwz6dvWanXjoSsMBMMZTt
BzZO47rvBFbQR0Es4v8f/dUq6Q==
-----END CERTIFICATE-----
52 changes: 52 additions & 0 deletions configuration/zebrunner-proxy/ssl/ssl.key.original
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDmCbP0gYzzQaIr
pJtByjAYLJknqxJsffbjI0SZ/fil4uptffITxEDo10JJbMT/bHUGDBUE8fSUxUPU
hrrjc6wKtp6ZJ3TaE+XM1jYm/4T3OsYOdLowZXboHB3zRNXp6savMrJbZHjd3M+d
IGrmCq6O43cwUVCsIQfgDh3Zr/0secB6UkziR7bweNCNf+QqJvsrLxt74aDbrqVB
NLHTrPE6nYKPH1uIGBZG/2tLO26DaxNu6mz9CJj52kTD95zXt7oNvQIge9WfxTUq
TUsIv71kWEDZY9LPAhan6MkG6g9TPXuVHi9o+Pdu6BO8tdEDSfD6SLMtvKYHrrXC
BDnKEIGcjc6jmIGFV+m/joASkISyYU1hpPcrgFI6RhSAYnh1/gNZyk6SnZEFg6l5
4z5LX2dZKXDZzyL15R4C0lfrpQbEBr0RsL6ytBRsZzEF3LqQvTZsRjscXbdEzwGE
V1NopyCTqPrdywyWddaRVAm2iRvXjeU8mbueJdmXLcgvsj3dnY5sBWPaStexcirv
zbCW6WEuBYFj1BWdafDpqGSMsQrph31Lc+HAetIKGZ1sz5TBahjjxPK+4gQyyY09
2IOVdFpXgyyXa0kJnVz1ZalkF3RKBU8hwAePhZpznGF0UXHZmT5aRMBITngtDCsk
61z99lxJ+JVFBAQHUgRX8OmjswP1WwIDAQABAoICAQCl4ZtWFtGo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CLMsJ5Z+IfgSsMZBzZh86FeIby4s0Fg0694w2aQw5PoinZHnsqS0553BbfUcFsp
MnDagb8NtbePPob8KNN6r8gZZuvPNjMXIdxNkKf6umxfCmqyuESe2XNJ0xDyuqdq
uzse7sAfxT963MmzLTIbNgHegI5CC+pwtcvyoa0vwzNzxu10qWdYddJ3/Ib/vuOG
hXLTCbSCu+KjA21QQqc5D1+OReT+p2PogCMu/uuPj4L4tsAxyt4n8kJxrzzqLgCU
i3gD47/Gq1yAhveMR3sGCBpJHZIXF/g=
-----END PRIVATE KEY-----
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
container_name: zebrunner-proxy
volumes:
- "./configuration/zebrunner-proxy/nginx.conf:/etc/nginx/nginx.conf:ro"
- "./configuration/zebrunner-proxy/ssl:/etc/nginx/ssl:ro"
ports:
- "${REPORTING_PORT}:80" # primary HTTP port
# - "15672:15672" # RabbitMQ administration, optional
Expand Down
50 changes: 50 additions & 0 deletions zebrunner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@
fi

cp configuration/zebrunner-proxy/nginx.conf.original configuration/zebrunner-proxy/nginx.conf

if [[ "$ZBR_PROTOCOL" == "https" ]] && [[ $ZBR_INSTALLER -ne 1 ]]; then
# configure ssl only for independent setup!
replace configuration/zebrunner-proxy/nginx.conf "listen 80" "listen 80 ssl"

# uncomment default ssl settings
replace configuration/zebrunner-proxy/nginx.conf "# ssl_" " ssl_"

if [[ ! -f configuration/zebrunner-proxy/ssl/ssl.crt ]]; then
echo "using self-signed certificate..."
cp configuration/zebrunner-proxy/ssl/ssl.crt.original configuration/zebrunner-proxy/ssl/ssl.crt
fi
if [[ ! -f configuration/zebrunner-proxy/ssl/ssl.key ]]; then
echo "using self-signed key..."
cp configuration/zebrunner-proxy/ssl/ssl.key.original configuration/zebrunner-proxy/ssl/ssl.key
fi

fi

if [[ $ZBR_MINIO_ENABLED -eq 0 ]]; then
# use case with AWS S3
replace configuration/zebrunner-proxy/nginx.conf "custom_secret_value" "${ZBR_STORAGE_AGENT_KEY}"
Expand Down Expand Up @@ -91,6 +110,12 @@

# export all ZBR* variables to save user input
export_settings

if [[ "$ZBR_PROTOCOL" == "https" ]] && [[ $ZBR_INSTALLER -ne 1 ]]; then
#warn about ssl only in case of independent setup
echo_warning "Replace self-signed ssl.crt and ssl.key in ./configuration/zebrunner-proxy/ssl/ onto valid ones!"
fi

}

shutdown() {
Expand All @@ -99,6 +124,22 @@
exit 0 #no need to proceed as nothing was configured
fi

if [[ ! -f .env ]]; then
echo_warning "Unable to erase as nothing is configured!"
exit 0 #no need to proceed as nothing was configured
fi


if [[ -z ${SHUTDOWN_CONFIRMED} ]] || [[ ${SHUTDOWN_CONFIRMED} -ne 1 ]]; then
# ask about confirmation if it is not confirmed in scope of CE
echo_warning "Shutdown will erase all settings and data for \"${BASEDIR}\"!"
confirm "" " Do you want to continue?" "n"
if [[ $? -eq 0 ]]; then
exit
fi
fi


docker-compose --env-file .env -f docker-compose.yml down -v

rm -f .env
Expand All @@ -119,6 +160,9 @@
rm -f configuration/reporting-service/variables.env
rm -f configuration/reporting-ui/variables.env

rm -f configuration/zebrunner-proxy/ssl/ssl.crt
rm -f configuration/zebrunner-proxy/ssl/ssl.key

minio-storage/zebrunner.sh shutdown
}

Expand All @@ -127,6 +171,12 @@
exit 0
fi

if [ ! -f .env ]; then
# need proceed with setup steps in advance!
setup
exit -1
fi

# create infra network only if not exist
docker network inspect infra >/dev/null 2>&1 || docker network create infra

Expand Down

0 comments on commit 4973110

Please sign in to comment.