Merge branch 'master' into qualtrics

This commit is contained in:
Axel Uhl committed 2020-07-01 15:29:13 +02:00
commit 904b476e43
489 files changed
+21226 -10924

No files matched your search

+6 -3
View File
@@ -7,9 +7,12 @@
# for db in `echo "rs.slaveOk()
# show dbs
# quit()" | mongo --port $port | tail -n +3 | grep -v "^bye$" | awk '{print $1;}'`; do
# match=`echo "rs.slaveOk(); db.USERS.find({EMAIL: '$useremail'}); db.COMPETITORS.find({email: '$useremail'})" | mongo --quiet --port $port $i`
# if [ "$match" != "" ]; then
# echo ${i}: $match
# match_1=`echo "rs.slaveOk()
# db.USERS.find({EMAIL: \"$useremail\"})" | mongo --quiet --port $port $db`
# match_2=`echo "rs.slaveOk()
# db.COMPETITORS.find({email: \"$useremail\"})" | mongo --quiet --port $port $db`
# if [ "$match_1" != "" -o "$match_2" != "" ]; then
# echo ${db} on port $port: $match_1 $match_2
# fi
# done
#done
+5 -1
View File
@@ -15,6 +15,7 @@ import boto3
import email
import re
import json
import magic
from botocore.exceptions import ClientError
from email.parser import Parser
from email.policy import default
@@ -33,7 +34,10 @@ def get_message_from_s3(bucket_name, object_key):
def create_message(file):
senderMap = json.loads(os.environ["MailSenderJSON"])
recipientMap = json.loads(os.environ["MailRecipientsJSON"])
mailobject = email.message_from_string(file.decode('utf-8'))
# Check encoding, uses https://pypi.org/project/python-magic/, similar to unix "file" command.
m = magic.Magic(mime_encoding=True)
encoding = m.from_buffer(file)
mailobject = email.message_from_string(file.decode(encoding))
# Define sender, either from 'To'-Header or from 'Cc'-Header
sender = None
# Check 'To'-Header
Binary file not shown.
@@ -0,0 +1,168 @@
Use Plain-SSL 172.31.30.84 127.0.0.1 8888
## SERVER STATUS
Use Status ec2-34-250-136-229.eu-west-1.compute.amazonaws.com internal-server-status
# USSailing
Use Home-SSL ussailing.sapsailing.com 127.0.0.1 8889
# Abeam (Japanese Partner) training system
Use Plain-SSL abeam-training.sapsailing.com 127.0.0.1 8890
# TracTrac Test
Use Plain-SSL tractractest.sapsailing.com 127.0.0.1 8891
Use Home-SSL tractrac.sapsailing.com 127.0.0.1 8891
# SAP Extreme Sailing Team Training Server (Rasmus Koestner, rasmuskostner@gmail.com)
# Dismantled 2020-01-28 after checking back with Rasmus
#Use Home-SSL extreme-team.sapsailing.com 127.0.0.1 8892
# VSaW
Use Home-SSL vsaw.sapsailing.com 127.0.0.1 8893
# Bayerischer Yacht-Club (BYC)
Use Home-SSL byc.sapsailing.com 127.0.0.1 8894
# SwissTiming Test (swisstimingtest) (masnica.r@st-software.com Radek Masnica)
Use Plain-SSL swisstimingtest.sapsailing.com 127.0.0.1 8895
# IRISHDBSCDW3
Use Home-SSL irishdbscdw3.sapsailing.com 127.0.0.1 8896
# first-seascape-germany: Dieter Hagen <hagen.dieter@icloud.com> (Deutsche First & Seascape Klassenvereinigung e.V.)
Use Home-SSL first-seascape-germany.sapsailing.com 127.0.0.1 8897
# Luebecker Yacht-Club (LYC)
Use Home-SSL lyc.sapsailing.com 127.0.0.1 8898
# Keppel Bay Sailing Club (KBSC)
Use Home-SSL kbsc.sapsailing.com 127.0.0.1 8899
# Seebrucker Regattaverein am Chiemsee (SRV)
Use Home-SSL srv.sapsailing.com 127.0.0.1 8900
# Heinz Nixdorf Verein zur Foerderung des Segelsports e.V. (HNV)
Use Home-SSL hnv.sapsailing.com 127.0.0.1 8901
# Israeli Sailing Association / Carmel Sailing Society
Use Home-SSL isr.sapsailing.com 127.0.0.1 8902
Use Home-SSL cyc.sapsailing.com 127.0.0.1 8902
# Sailtracks Test Server
Use Home-SSL sailtracks.sapsailing.com 127.0.0.1 8903
# Norwegian Sailing Federation
Use Home-SSL nor.sapsailing.com 127.0.0.1 8904
# Jojos Nacra Campaign (jpolgar@aol.com)
Use Plain-SSL jojopolgar.sapsailing.com 127.0.0.1 8905
# Segelvereinigung Rhein-Neckar
Use Home-SSL srn.sapsailing.com 127.0.0.1 8906
# Yacht-Club Luzern (Arnet, Ivo [mailto:ivo.arnet@itready.net])
Use Home-SSL ycl.sapsailing.com 127.0.0.1 8907
# Segelzentrum der Universität Kiel (Hamann, Jan [mailto:jan.hamann@email.uni-kiel.de])
Use Home-SSL segelzentrum.sapsailing.com 127.0.0.1 8908
# Robert Davis Sailing, Canadian Sailing Team (Robert Davis <robertdavissailing@outlook.com>)
Use Plain-SSL rdsailing.sapsailing.com 127.0.0.1 8909
# Keith Johnson Softalk Computer Services (Keith Johnson <keith@softalk.co.uk>)
Use Plain-SSL kjscs.sapsailing.com 127.0.0.1 8910
# KSSS (Royal Swedish Sailing Club, Stefan Rahm <stefan@ksss.se>)
Use Plain-SSL ksss.sapsailing.com 127.0.0.1 8911
# Sailing Academy South Africa (instructor@sailingacademy.co.za, Neil Ashton)
Use Plain-SSL sailingacademy.sapsailing.com 127.0.0.1 8912
# StarLab (Fabiano Avancini [mailto:fabiano.avancini@gmail.com], https://www.facebook.com/events/845403545622630/)
Use Plain-SSL starlab.sapsailing.com 127.0.0.1 8913
# SingaporeSailing (Lim Han Ee <han@singaporesailing.org.sg>)
Use Plain-SSL singaporesailing.sapsailing.com 127.0.0.1 8914
# Club Nautic de Sitges (pa.ubach@gmail.com; on behalf of; Pere-Andreu Ubach <pa_ubach@alum.mit.edu>)
Use Plain-SSL sitges.sapsailing.com 127.0.0.1 8915
# Akademischer Seglerverein Aachen (Axel Schmidt, axel.sebastian.schmidt@rwth-aachen.de)
Use Plain-SSL asvia.sapsailing.com 127.0.0.1 8916
# Schwartauer Segler-Verein, www.ssv-net.de, Alexander Probst, webmaster@alexprobst.de
Use Plain-SSL ssv.sapsailing.com 127.0.0.1 8917
# SailCanada (Canadian Sailing Federation, Ken Dool, ken@sailing.ca)
Use Plain-SSL sailcanada.sapsailing.com 127.0.0.1 8918
# PMYC (Porto Montenegro Yacht Club, Tony Browne <tony@portomontenegro.com>)
Use Plain-SSL pmyc.sapsailing.com 127.0.0.1 8919
# SSC (Segeberger Segel Club, Thomas Glas, th.glas@gmail.com)
Use Plain-SSL ssc.sapsailing.com 127.0.0.1 8920
# SailRacer (Ricardas Novosinskas <ricardas@sailracer.net>)
Use Plain-SSL sailracer.sapsailing.com 127.0.0.1 8922
# Galvestaure (Mantas Klimantavicius <mantas.klimantavicius@gmail.com>)
Use Plain-SSL galvestaure.sapsailing.com 127.0.0.1 8923
# Tobias Schadewaldt <tobias.schadewaldt@me.com>
Use Plain-SSL schadewaldt.sapsailing.com 127.0.0.1 8924
# HSC Women's Team <hsc.womensteam@gmail.com>
Use Plain-SSL hsc-womensteam.sapsailing.com 127.0.0.1 8925
# aarhussejlklub.sapsailing.com (Fredrik Strange <sailor@fstrange.dk>)
Use Plain-SSL aarhussejlklub.sapsailing.com 127.0.0.1 8927
# d-labs.sapsailing.com (David Eickhoff <david.eickhoff@d-labs.com>)
Use Plain-SSL d-labs.sapsailing.com 127.0.0.1 8928
# alarie505.sapsailing.com (Peter Alarie,alarie505@gmail.com)
Use Plain-SSL alarie505.sapsailing.com 127.0.0.1 8929
# schanzenberg.sapsailing.com (Segelzentrum Schanzenberg, Florian Mösch <florian@moesch.org>)
Use Plain-SSL schanzenberg.sapsailing.com 127.0.0.1 8930
# phoenix.sapsailing.com (Team Phoenix, Douglas Edwards <doug.hemisphere@gmail.com>, Kristina Plattner <kristina.plattner@gmail.com>)
Use Plain-SSL phoenix.sapsailing.com 127.0.0.1 8931
# my.sapsailing.com (Self-Service Smartphone Tracking)
Use Home-SSL my.sapsailing.com 127.0.0.1 8932
# mdf.sapsailing.com (Medway Dragon Fleet, Chris Brealy <c.brealy@hotmail.co.uk>)
Use Home-SSL mdf.sapsailing.com 127.0.0.1 8933
# jonaswitt.sapsailing.com (Jonas Witt, jonas@sailnjord.com)
Use Plain-SSL jonaswitt.sapsailing.com 127.0.0.1 8934
# seascape.sapsailing.com (Dejan Presen <dejan.presen@gmail.com>)
use Home-SSL seascape.sapsailing.com 127.0.0.1 8935
# Port 8936 (HTTP) freed up;
# oakcliff.sapsailing.com (Patrick Burks, Director Oakcliff Sailing <regatta@oakcliffsailing.org>, Roy Craft <r.craft@sap.com>)
use Plain-SSL oakcliff.sapsailing.com 127.0.0.1 8937
# rheinwoche.sapsailing.com (Christoph Zander, praesident@h-boot.org, info@christophzander.de)
use Home-SSL rheinwoche.sapsailing.com 127.0.0.1 8938
# kyc.sapsailing.com (Kieler Yacht Club, Felix Weidling, fw@kyc.de)
use Plain-SSL kyc.sapsailing.com 127.0.0.1 8939
# schwielochsee.sapsailing.com (Segelclub Schwielochsee e.V., Maximilian Hartig, maximilian.hartig@sap.com, mh@sc-schwielochsee.de)
use Plain-SSL schwielochsee.sapsailing.com 127.0.0.1 8940
# formula18.sapsailing.com (Formula 18 Class Association, Dirk Bleiker <dirk@bleiker-db.com>)
use Plain-SSL formula18.sapsailing.com 127.0.0.1 8941
# baldeneysee.sapsailing.com (Wettfahrtgemeinschaft der Segler am Baldeneysee, https://wfg-baldeneysee.org/, Christoph Zander, vorsitzender@etuf-segeln.de, administrator@wfg-baldeneysee.org)
use Home-SSL baldeneysee.sapsailing.com 127.0.0.1 8942
# Peter Wagner, AUT, Skype: peterwagner77, +4366087100213
Use Home-SSL peter-training.sapsailing.com 127.0.0.1 8943
# Janek Balster, Schilkseer Yacht Club (SYC)
Use Home-SSL janek-training.sapsailing.com 127.0.0.1 8944
+211
View File
@@ -0,0 +1,211 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=aarhussejlklub
SERVER_NAME=AARHUSSEJLKLUB
SERVER_PORT=8927
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/AARHUSSEJLKLUB"
EXPEDITION_PORT=2049
TELNET_PORT=14927
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=abeam-training
SERVER_NAME=abeam-training
SERVER_PORT=8890
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/abeam-training?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2012
TELNET_PORT=14890
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=alarie505
SERVER_NAME=alarie505
SERVER_PORT=8929
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/alarie505"
EXPEDITION_PORT=2051
TELNET_PORT=14929
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=asvia
SERVER_NAME=ASVIA
SERVER_PORT=8916
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/ASVIA"
EXPEDITION_PORT=2038
TELNET_PORT=14916
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=baldeneysee
SERVER_NAME=baldeneysee
SERVER_PORT=8942
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/baldeneysee?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2064
TELNET_PORT=14942
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=byc
SERVER_NAME=BYC
SERVER_PORT=8894
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/BYC?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2016
TELNET_PORT=14894
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
SERVER_NAME=$1
SERVER_PORT=$2
TELNET_PORT=$((SERVER_PORT+6000))
EXPEDITION_PORT=$((2010+SERVER_PORT-8888))
MONGODB_URI=$3
cp -rp TEMPLATE $SERVER_NAME
ENV_SH=$SERVER_NAME/env.sh
echo "DEPLOY_TO=$SERVER_NAME" >>$ENV_SH
echo "SERVER_NAME=$SERVER_NAME" >>$ENV_SH
echo "SERVER_PORT=$SERVER_PORT" >>$ENV_SH
echo "MONGODB_URI=\"$MONGODB_URI\"" >>$ENV_SH
echo "EXPEDITION_PORT=$EXPEDITION_PORT" >>$ENV_SH
echo "TELNET_PORT=$TELNET_PORT" >>$ENV_SH
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=first-seascape-germany
SERVER_NAME=first-seascape-germany
SERVER_PORT=8897
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/first-seascape-germany?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2019
TELNET_PORT=14897
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=formula18
SERVER_NAME=formula18
SERVER_PORT=8941
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/formula18?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2063
TELNET_PORT=14941
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=galvestaure
SERVER_NAME=galvestaure
SERVER_PORT=8923
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/galvestaure?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2045
TELNET_PORT=14923
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=hnv
SERVER_NAME=HNV
SERVER_PORT=8901
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/HNV?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2023
TELNET_PORT=14901
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=hsc-womensteam
SERVER_NAME=hsc-womensteam
SERVER_PORT=8925
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/hsc-womensteam"
EXPEDITION_PORT=2047
TELNET_PORT=14925
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=irishdbscdw3
SERVER_NAME=IRISHDBSCDW3
SERVER_PORT=8896
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/irishdbscdw3"
EXPEDITION_PORT=2018
TELNET_PORT=14896
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=isr
SERVER_NAME=ISR
SERVER_PORT=8902
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/ISR"
EXPEDITION_PORT=2024
TELNET_PORT=14902
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=janek-training
SERVER_NAME=janekbalster
SERVER_PORT=8944
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/janekbalster"
EXPEDITION_PORT=2066
TELNET_PORT=14944
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=jojopolgar
SERVER_NAME=JOJOPOLGAR
SERVER_PORT=8905
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/JOJOPOLGAR?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2027
TELNET_PORT=14905
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=jonaswitt
SERVER_NAME=jonaswitt
SERVER_PORT=8934
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/jonaswitt?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2056
TELNET_PORT=14934
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=kbsc
SERVER_NAME=KBSC
SERVER_PORT=8899
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/KBSC"
EXPEDITION_PORT=2021
TELNET_PORT=14899
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=kjscs
SERVER_NAME=KJSCS
SERVER_PORT=8910
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/KJSCS?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2032
TELNET_PORT=14910
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=ksss
SERVER_NAME=KSSS
SERVER_PORT=8911
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/KSSS"
EXPEDITION_PORT=2033
TELNET_PORT=14911
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=kyc
SERVER_NAME=kyc
SERVER_PORT=8939
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/kyc?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2061
TELNET_PORT=14939
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
SERVER_NAME=LYC
DEPLOY_TO=lyc
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/LYC?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2020
SERVER_PORT=8898
TELNET_PORT=14898
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=mdf
SERVER_NAME=mdf
SERVER_PORT=8933
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/mdf"
EXPEDITION_PORT=2055
TELNET_PORT=14933
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=my
SERVER_NAME=my
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/my?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2054
SERVER_PORT=8932
TELNET_PORT=14932
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=nor
SERVER_NAME=NOR
SERVER_PORT=8904
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/NOR?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2026
TELNET_PORT=14904
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=oakcliff
SERVER_NAME=oakcliff
SERVER_PORT=8937
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/oakcliff?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2059
TELNET_PORT=14937
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=peter-training
SERVER_NAME=peterwagner
SERVER_PORT=8943
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/peterwagner?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2065
TELNET_PORT=14943
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=phoenix
SERVER_NAME=phoenix
SERVER_PORT=8931
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/phoenix"
EXPEDITION_PORT=2053
TELNET_PORT=14931
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=pmyc
SERVER_NAME=PMYC
SERVER_PORT=8919
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/PMYC"
EXPEDITION_PORT=2041
TELNET_PORT=14919
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=rdsailing
SERVER_NAME=RDSAILING
SERVER_PORT=8909
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/RDSAILING?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2031
TELNET_PORT=14909
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=rheinwoche
SERVER_NAME=rheinwoche2019
SERVER_PORT=8938
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/rheinwoche2019?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2060
TELNET_PORT=14938
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=sailcanada
SERVER_NAME=SAILCANADA
SERVER_PORT=8918
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/SAILCANADA"
EXPEDITION_PORT=2040
TELNET_PORT=14918
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=sailingacademy
SERVER_NAME=SAILINGACADEMY
SERVER_PORT=8912
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/SAILINGACADEMY"
EXPEDITION_PORT=2034
TELNET_PORT=14912
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=sailracer
SERVER_NAME=sailracer
SERVER_PORT=8922
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/sailracer?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2044
TELNET_PORT=14922
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS"
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_EXCHANGE_NAME=
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
#REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=sailtracks
SERVER_NAME=sailtracks
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/Sailtracks?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2025
SERVER_PORT=8903
TELNET_PORT=14903
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=schadewaldt
SERVER_NAME=schadewaldt
SERVER_PORT=8924
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/schadewaldt"
EXPEDITION_PORT=2046
TELNET_PORT=14924
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=schanzenberg
SERVER_NAME=schanzenberg
SERVER_PORT=8930
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/schanzenberg"
EXPEDITION_PORT=2052
TELNET_PORT=14930
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=schwielochsee
SERVER_NAME=schwielochsee
SERVER_PORT=8940
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/schwielochsee?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2062
TELNET_PORT=14940
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=seascape
SERVER_NAME=SEASCAPE
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/seascape?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2057
SERVER_PORT=8935
TELNET_PORT=14935
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=segelzentrum
SERVER_NAME=SEGELZENTRUM
SERVER_PORT=8908
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/SEGELZENTRUM?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2030
TELNET_PORT=14908
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=singaporesailing
SERVER_NAME=SINGAPORESAILING
SERVER_PORT=8914
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/SINGAPORESAILING"
EXPEDITION_PORT=2036
TELNET_PORT=14914
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=sitges
SERVER_NAME=SITGES
SERVER_PORT=8915
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/SITGES?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2037
TELNET_PORT=14915
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=srn
SERVER_NAME=SRN
SERVER_PORT=8906
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/SRN?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2028
TELNET_PORT=14906
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=srv
SERVER_NAME=SRV
SERVER_PORT=8900
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/SRV?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2022
TELNET_PORT=14900
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=ssc
SERVER_NAME=SSC
SERVER_PORT=8920
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/SSC"
EXPEDITION_PORT=2042
TELNET_PORT=14920
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=ssv
SERVER_NAME=SSV
SERVER_PORT=8917
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/SSV"
EXPEDITION_PORT=2039
TELNET_PORT=14917
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=starlab
SERVER_NAME=STARLAB
SERVER_PORT=8913
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/STARLAB?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2035
TELNET_PORT=14913
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=swisstimingtest
SERVER_NAME=swisstimingtest
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/swisstimingtest?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2017
SERVER_PORT=8895
TELNET_PORT=14895
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=tractractest
SERVER_NAME=TracTracTest
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/TracTracTest?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2013
SERVER_PORT=8891
TELNET_PORT=14891
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=ussailing
SERVER_NAME=USSAILING
SERVER_PORT=8889
MONGODB_URI="mongodb://dbserver.internal.sapsailing.com:10202/USSAILING"
EXPEDITION_PORT=14889
TELNET_PORT=2011
+217
View File
@@ -0,0 +1,217 @@
#!/bin/bash
# This file contains the configuration for the Java server
# *******************************************************
# ATTENTION: Make sure to always also check the variables at the end
# of this file as there could be overwritten ones!
# *******************************************************
if [ -z $SERVER_NAME ]; then
SERVER_NAME=MASTER
fi
# This is a default heap size only; the boot script of an instance (see
# configuration/sailing) will add a MEMORY assignment to this file in the
# server's directory that has a default value computed from the total
# memory installed in the machine and the number of server instances to
# start on that machine. This default can be overwritten by manually appending
# another MEMORY assignment at the end of the file or by defining an environment
# file with a MEMORY assignment which is then used in conjunction with refreshInstance.sh
# or by setting the MEMORY variable in the EC2 Instance Details section which will be appended
# at the end of the file.
MEMORY="20000m"
# Message Queue hostname where to
# send messages for replicas (this server is master)
if [ -z $REPLICATION_HOST ]; then
REPLICATION_HOST=localhost
fi
# For the port, use 0 for the RabbitMQ default or a specific port that your RabbitMQ server is listening on
if [ -z $REPLICATION_PORT ]; then
REPLICATION_PORT=0
fi
# The name of the message queuing fan-out exchange that this server will use in its role as replication master.
# Make sure this is unique so that no other master is writing to this exchange at any time.
if [ -z $REPLICATION_CHANNEL ]; then
REPLICATION_CHANNEL=sapsailinganalytics-master
fi
if [ -z $TELNET_PORT ]; then
TELNET_PORT=14888
fi
if [ -z $SERVER_PORT ]; then
SERVER_PORT=8888
fi
if [ -z $MONGODB_HOST ]; then
MONGODB_HOST=10.0.75.1
fi
if [ -z $MONGODB_PORT ]; then
MONGODB_PORT=27017
fi
if [ -z $MONGODB_NAME ]; then
MONGODB_NAME=winddb
fi
if [ -z $EXPEDITION_PORT ]; then
EXPEDITION_PORT=2010
fi
# To start replication upon startup provide the fully-qualified names of the Replicable service classes
# for which to trigger replication. If you activate this make sure to
# set the REPLICATE_MASTER_EXCHANGE_NAME variable to the
# same channel the master is using in its REPLICATION_CHANNEL variable
if [ -n "$AUTO_REPLICATE" ]; then
REPLICATE_ON_START=com.sap.sailing.server.impl.RacingEventServiceImpl,com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sse.filestorage.impl.FileStorageManagementServiceImpl,com.sap.sse.mail.impl.MailServiceImpl,com.sap.sailing.polars.impl.PolarDataServiceImpl,com.sap.sailing.domain.racelogtracking.impl.fixtracker.RegattaLogFixTrackerRegattaListener,com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl,com.sap.sailing.server.impl.com.sap.sailing.shared.server.impl.SharedSailingDataImpl
fi
# Host where the master Java instance is running
# Make sure firewall configurations allow access
#
# REPLICATE_MASTER_SERVLET_HOST=
# REPLICATE_MASTER_SERVLET_PORT=
# Host where RabbitMQ is running
# REPLICATE_MASTER_QUEUE_HOST=
# Port that RabbitMQ is listening on (normally something like 5672); use 0 to connect to RabbitMQ's default port
if [ -z $REPLICATE_MASTER_QUEUE_PORT ]; then
REPLICATE_MASTER_QUEUE_PORT=0
fi
# Exchange name that the master from which to auto-replicate is using as
# its REPLICATION_CHANNEL variable, mapping to the master's replication.exchangeName
# system property.
#
# REPLICATE_MASTER_EXCHANGE_NAME=
# Credentials for replication access to the master server
# Make sure, the user is granted the permission SERVER:REPLICATE:<server-name>
# Credentials can be provided either as a combination of username and password,
# or alternatively as a single bearer token that was obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://master-server.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the master server using your web browser and then navigating to
# https://master-server.sapsailing.com/security/api/restsecurity/access_token
#
# REPLICATE_MASTER_USERNAME=
# REPLICATE_MASTER_PASSWORD=
# REPLICATE_MASTER_BEARER_TOKEN=
# Automatic build and test configuration
DEPLOY_TO=server
BUILD_BEFORE_START=False
BUILD_FROM=master
COMPILE_GWT=True
RUN_TESTS=False
CODE_DIRECTORY=code
# Specify an email adress that should be notified
# whenever a build or install has been completed
#
# BUILD_COMPLETE_NOTIFY=
# Specify an email address that should be notified
# whenever the server has been started
#
# SERVER_STARTUP_NOTIFY=
# Specify filename that is usually located at
# http://release.sapsailing.com/ that should
# be used as a base for the server
#
# INSTALL_FROM_RELEASE=
# Specify name of file that can usually be found
# at http://release.sapsailing.com/environments
#
# USE_ENVIRONMENT=
INSTANCE_ID="$SERVER_NAME:$SERVER_PORT"
if [[ ! -d $JAVA_HOME ]] && [[ -f "/usr/libexec/java_home" ]]; then
JAVA_HOME=`/usr/libexec/java_home`
fi
JAVA_BINARY="$JAVA_HOME/bin/java"
JAVA_VERSION_OUTPUT=$("$JAVA_BINARY" -version 2>&1)
JAVA_VERSION=$(echo "$JAVA_VERSION_OUTPUT" | sed 's/^.* version "\(.*\)\.\(.*\)\..*".*$/\1.\2/; 1q')
export JAVA_11_LOGGING_ARGS="-Xlog:gc+ergo*=trace:file=logs/gc_ergo.log:time:filecount=10,filesize=100000 -Xlog:gc*:file=logs/gc.log:time:filecount=10,filesize=100000"
export JAVA_11_ARGS="-Dosgi.java.profile=file://`pwd`/JavaSE-11.profile --add-modules=ALL-SYSTEM -Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ${JAVA_11_LOGGING_ARGS}"
export JAVA_8_LOGGING_ARGS="-XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
echo JAVA_VERSION detected: $JAVA_VERSION
if echo $JAVA_VERSION | grep -q "^11\."; then
echo Java 11 detected
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_11_ARGS
else
echo Java other than 11 detected
# options for use with SAP JVM only:
if echo "$JAVA_VERSION_OUTPUT" | grep -q "SAP Java"; then
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -XX:+GCHistory -XX:GCHistoryFilename=logs/sapjvm_gc@PID.prf"
BUILD=$( echo "$JAVA_VERSION_OUTPUT" | grep "(build [^ ]*)" )
MAJOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\1/' )
MINOR=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\2/' )
UPDATE=$( echo "$BUILD" | sed -e 's/^.*(build \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)).*$/\3/' )
echo "SAP JVM $MAJOR $MINOR $UPDATE detected"
if [ $MAJOR -ge 8 -a $MINOR -ge 1 -a $UPDATE -ge 45 ]; then
echo "Update 8.1.045 or later; using Java11 GC logging options"
LOGGING_ARGS="$JAVA_11_LOGGING_ARGS"
else
echo "Update before 8.1.045; using Java8 GC logging options"
LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
else
# non-SAP JVM 8
export LOGGING_ARGS="$JAVA_8_LOGGING_ARGS"
fi
export JAVA_8_ARGS="-XX:ThreadPriorityPolicy=2 -XX:+UseG1GC ${LOGGING_ARGS}"
JAVA_VERSION_SPECIFIC_ARGS=$JAVA_8_ARGS
fi
ADDITIONAL_JAVA_ARGS="$JAVA_VERSION_SPECIFIC_ARGS $ADDITIONAL_JAVA_ARGS -Dpersistentcompetitors.clear=false -Drestore.tracked.races=true -Dpolardata.source.url=https://www.sapsailing.com -Dwindestimation.source.url=https://www.sapsailing.com -XX:MaxGCPauseMillis=500"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com, uncomment and fill in the following:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Obtain the bearer token for user security-service-replicator by logging on to https://security-service.sapsailing.com and then
# getting https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
echo ADDITIONAL_JAVA_ARGS=${ADDITIONAL_JAVA_ARGS}
ON_AMAZON=`command -v ec2-metadata`
# **** Overwritten environment variables ****
# live-master-server
REPLICATION_HOST=rabbit.internal.sapsailing.com
TELNET_PORT=14888
SERVER_PORT=8888
MONGODB_HOST=dbserver.internal.sapsailing.com
MONGODB_PORT=10202
EXPEDITION_PORT=2010
REPLICATE_ON_START=
REPLICATE_MASTER_SERVLET_HOST=
REPLICATE_MASTER_SERVLET_PORT=
REPLICATE_MASTER_QUEUE_HOST=rabbit.internal.sapsailing.com
REPLICATE_MASTER_QUEUE_PORT=5672
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Xms$MEMORY -Dorg.eclipse.jetty.LEVEL=OFF -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -XX:ThreadPriorityPolicy=2"
# To enable the use of the shared SecurityService and SharedSailingData from security-service.sapsailing.com:
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sapsailing\.com(:[0-9]*)?$"
REPLICATE_ON_START=com.sap.sse.security.impl.SecurityServiceImpl,com.sap.sailing.shared.server.impl.SharedSailingDataImpl
REPLICATE_MASTER_SERVLET_HOST=security-service.sapsailing.com
REPLICATE_MASTER_SERVLET_PORT=443
REPLICATE_MASTER_EXCHANGE_NAME=security_service
# Provide authentication credentials for a user on the security-service.sapsailing.com permitted to replicate, either by username/password...
#REPLICATE_MASTER_USERNAME=(user for replicator login on security-service.sapsailing.com server having SERVER:REPLICATE:&lt;server-name&gt; permission)
#REPLICATE_MASTER_PASSWORD=(password of the user for replication login on security-service.sapsailing.com)
# Or by bearer token, obtained, e.g., through
# curl -d "username=myuser&password=mysecretpassword" "https://security-service.sapsailing.com/security/api/restsecurity/access_token" | jq .access_token
# or by logging in to the security-service.sapsailing.com server with a user having the SERVER:REPLICATE:security-service and SERVER:READ_REPLICATOR:security-service
# permissions, using your web browser and then navigating to
# https://security-service.sapsailing.com/security/api/restsecurity/access_token
REPLICATE_MASTER_BEARER_TOKEN="Gecx+W/dwFKRAxFbIvC/IMafEnJ8kTQF+MlYNVhEwD4="
DEPLOY_TO=vsaw
SERVER_NAME=VSAW
MONGODB_URI="mongodb://mongo0.internal.sapsailing.com,mongo1.internal.sapsailing.com/VSAW?replicaSet=live&retryWrites=true"
EXPEDITION_PORT=2015
SERVER_PORT=8893
TELNET_PORT=14893
@@ -5,8 +5,8 @@ Bundle-SymbolicName: com.github.branflake2267.gwt-maps-api
Bundle-Version: 3.10.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional,
Require-Bundle: com.google.gwt.user;bundle-version="2.9.0";resolution:=optional,
com.google.gwt.dev;bundle-version="2.9.0";resolution:=optional,
com.google.gwt.ajaxloader;bundle-version="1.1.0";visibility:=reexport
Automatic-Module-Name: com.github.branflake2267.gwt-maps-api
Bundle-ClassPath: .
@@ -5,8 +5,8 @@ Bundle-SymbolicName: com.google.gwt.ajaxloader
Bundle-Version: 1.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional
Require-Bundle: com.google.gwt.user;bundle-version="2.9.0";resolution:=optional,
com.google.gwt.dev;bundle-version="2.9.0";resolution:=optional
Automatic-Module-Name: com.google.gwt.ajaxloader
Bundle-ClassPath: .
Export-Package: com.google.gwt.ajaxloader.client
+1 -1
View File
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: gwt-dev
Bundle-SymbolicName: com.google.gwt.dev
Bundle-Version: 2.8.2
Bundle-Version: 2.9.0
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/gwt-dev.jar,
Binary file not shown.
+1 -1
View File
@@ -8,6 +8,6 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.google.gwt.dev</artifactId>
<version>2.8.2</version>
<version>2.9.0</version>
<packaging>eclipse-plugin</packaging>
</project>
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Dev
Bundle-SymbolicName: com.google.gwt.servlet
Automatic-Module-Name: com.google.gwt.servlet
Bundle-Version: 2.8.2
Bundle-Version: 2.9.0
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/gwt-servlet.jar,
@@ -174,6 +174,5 @@ Export-Package: com.google.gwt.activity.shared,
com.google.web.bindery.requestfactory.vm.impl,
com.google.web.bindery.requestfactory.vm.testing,
javaemul.internal,
javaemul.internal.annotations,
jsinterop.annotations
javaemul.internal.annotations
Require-Bundle: javax.servlet;bundle-version="3.1.0"
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -8,6 +8,6 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.google.gwt.servlet</artifactId>
<version>2.8.2</version>
<version>2.9.0</version>
<packaging>eclipse-plugin</packaging>
</project>
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: gwt-user
Bundle-SymbolicName: com.google.gwt.user
Bundle-Version: 2.8.2
Bundle-Version: 2.9.0
Bundle-Vendor: GOOGLE
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/gwt-user.jar,
@@ -187,5 +187,5 @@ Export-Package: com.google.gwt.activity.shared,
jsinterop.annotations
Require-Bundle: javax.servlet;bundle-version="3.1.0",
org.junit;bundle-version="4.8.2";resolution:=optional,
com.google.gwt.dev;bundle-version="2.8.2"
com.google.gwt.dev;bundle-version="2.9.0"
Automatic-Module-Name: com.google.gwt.user
Binary file not shown.
+1 -1
View File
@@ -8,6 +8,6 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.google.gwt.user</artifactId>
<version>2.8.2</version>
<version>2.9.0</version>
<packaging>eclipse-plugin</packaging>
</project>
@@ -8,9 +8,9 @@ Bundle-Vendor: SAP
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.sap.sailing.domain,
com.sap.sailing.server.interface,
com.google.gwt.dev;bundle-version="2.8.2";resolution:=optional,
com.google.gwt.user;bundle-version="2.8.2";resolution:=optional,
com.google.gwt.servlet;bundle-version="2.8.2",
com.google.gwt.dev;bundle-version="2.9.0";resolution:=optional,
com.google.gwt.user;bundle-version="2.9.0";resolution:=optional,
com.google.gwt.servlet;bundle-version="2.9.0",
com.sap.sse.common,
com.sap.sse.debranding,
com.sap.sailing.domain.common,
@@ -37,6 +37,25 @@
<servlet-name>ClientConfigurationServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet>
<display-name>Sailing ServiceWrite</display-name>
<servlet-name>SailingServiceWrite</servlet-name>
<servlet-class>com.sap.sailing.gwt.ui.server.SailingServiceWriteImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SailingServiceWrite</servlet-name>
<url-pattern>/service/sailingmaster</url-pattern>
<url-pattern>/service/sailingmaster/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>LocaleInjectionFilter</filter-name>
<filter-class>com.sap.sse.security.ui.server.LocaleInjectionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LocaleInjectionFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter>
<filter-name>LocaleInjectionFilter</filter-name>
@@ -1,12 +0,0 @@
package com.sap.sailing.domain.common;
import java.io.Serializable;
import java.util.List;
import com.sap.sse.common.Util.Pair;
public interface PolarSheetsXYDiagramData extends Serializable {
List<Pair<Double, Double>> getPointsForAverageSpeedRegression(Tack tack, LegType legType);
}
@@ -57,6 +57,10 @@ public class BoatDTO extends NamedSecuredObjectDTO implements WithID, Serializab
return boatClass;
}
public void setBoatClass(BoatClassDTO boatClass) {
this.boatClass = boatClass;
}
public String getDisplayName() {
final StringBuilder sb = new StringBuilder();
final boolean hasSailId = sailId != null && !sailId.isEmpty();
@@ -1,6 +1,10 @@
package com.sap.sailing.domain.common.dto;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.sap.sse.common.Util;
public class PairingListTemplateDTO implements Serializable {
@@ -15,7 +19,7 @@ public class PairingListTemplateDTO implements Serializable {
private int[][] pairingListTemplate;
private double quality;
private double boatAssignmentQuality;
private Iterable<String> selectedFlightNames;
private List<String> selectedFlightNames;
public PairingListTemplateDTO() { }
@@ -50,7 +54,8 @@ public class PairingListTemplateDTO implements Serializable {
this.boatAssignmentQuality = boatAssigmentQuality;
this.quality = quality;
this.pairingListTemplate = pairingListTemplate;
this.selectedFlightNames = selectedFlightNames;
this.selectedFlightNames = new ArrayList<>();
Util.addAll(selectedFlightNames, this.selectedFlightNames);
}
public void setFlightCount(int flightCount) {
@@ -69,7 +74,7 @@ public class PairingListTemplateDTO implements Serializable {
this.boatChangeFactor = tolerance;
}
public void setSelectedFlightNames(Iterable<String> selectedFlightNames) {
public void setSelectedFlightNames(List<String> selectedFlightNames) {
this.selectedFlightNames = selectedFlightNames;
}
@@ -109,7 +114,7 @@ public class PairingListTemplateDTO implements Serializable {
return boatChangeFactor;
}
public Iterable<String> getSelectedFlightNames() {
public List<String> getSelectedFlightNames() {
return selectedFlightNames;
}
@@ -1,29 +0,0 @@
package com.sap.sailing.domain.common.impl;
import java.util.List;
import java.util.Map;
import com.sap.sailing.domain.common.LegType;
import com.sap.sailing.domain.common.PolarSheetsXYDiagramData;
import com.sap.sailing.domain.common.Tack;
import com.sap.sse.common.Util.Pair;
public class PolarSheetsXYDiagramDataImpl implements PolarSheetsXYDiagramData {
private static final long serialVersionUID = 778667444303004468L;
PolarSheetsXYDiagramDataImpl() {
}
private Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> pointsForAverageSpeedRegression;
public PolarSheetsXYDiagramDataImpl(
Map<Pair<LegType, Tack>, List<Pair<Double, Double>>> regressionSpeedDataLists) {
pointsForAverageSpeedRegression = regressionSpeedDataLists;
}
@Override
public List<Pair<Double, Double>> getPointsForAverageSpeedRegression(Tack tack, LegType legType) {
return pointsForAverageSpeedRegression.get(new Pair<LegType, Tack>(legType, tack));
}
}
@@ -117,7 +117,7 @@ public interface ORCCertificate extends WithID, Serializable {
* The different division intervals are - in contrast to the intervals of the GPH - set by the Offshore Race Committee and not by the national association for a uniform handling.
* The higher the value, the higher the overall performance, it is measured in meters.
*/
double getCDL();
Double getCDL();
/**
* Returns the LOA (length over all) of the {@link Competitor} boat which this certificate belongs to.
@@ -252,7 +252,7 @@ public class ORCCertificateImpl implements ORCCertificate {
}
@Override
public double getCDL() {
public Double getCDL() {
return cdl;
}
@@ -16,6 +16,7 @@ public class FlatSmartphoneUuidAndGPSFixMovingJsonSerializer {
public static final String LON_DEG = "longitude";
public static final String LAT_DEG = "latitude";
public static final String TIME_MILLIS = "timestamp";
public static final String TIME_ISO = "timestamp-iso";
public static final String SPEED_M_PER_S = "speed";
public static final String BEARING_DEG = "course";
}
@@ -3,6 +3,7 @@ package com.sap.sailing.domain.deckmanadapter;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import com.sap.sailing.domain.common.Position;
@@ -37,7 +38,11 @@ public class Record implements Timed, Positioned {
public Record(Map<FieldType, String> fieldsAsString) throws ParseException {
this.fieldsAsString = fieldsAsString;
timePoint = new MillisecondsTimePoint(dateFormat.parse(this.fieldsAsString.get(FieldType.date)));
final Date date;
synchronized (dateFormat) {
date = dateFormat.parse(this.fieldsAsString.get(FieldType.date));
}
timePoint = new MillisecondsTimePoint(date);
position = new DegreePosition(Double.valueOf(this.fieldsAsString.get(FieldType.latitude)),
Double.valueOf(this.fieldsAsString.get(FieldType.longitude)));
final SpeedWithBearing speed = new KnotSpeedWithBearingImpl(Double.valueOf(this.fieldsAsString.get(FieldType.sog)),
@@ -54,8 +54,6 @@ public interface MongoObjectFactory {
*/
void removeLeaderboard(String leaderboardName);
void renameLeaderboard(String oldName, String newName);
/**
* Stores the group, if it doesn't exist or updates it. Leaderboards in the group, which aren't stored in the
* database, will be stored. If the leaderboard group has an {@link LeaderboardGroup#getOverallLeaderboard() overall
@@ -337,10 +337,12 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
}
public static TimePoint loadTimePoint(Document object, String fieldName) {
TimePoint result = null;
final TimePoint result;
Number timePointAsNumber = (Number) object.get(fieldName);
if (timePointAsNumber != null) {
result = new MillisecondsTimePoint(timePointAsNumber.longValue());
} else {
result = null;
}
return result;
}
@@ -351,12 +353,15 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
public static TimeRange loadTimeRange(Document object, FieldNames field) {
Document timeRangeObj = (Document) object.get(field.name());
final TimeRange result;
if (timeRangeObj == null) {
return null;
result = null;
} else {
TimePoint from = loadTimePoint(timeRangeObj, FieldNames.FROM_MILLIS);
TimePoint to = loadTimePoint(timeRangeObj, FieldNames.TO_MILLIS);
result = new TimeRangeImpl(from, to);
}
TimePoint from = loadTimePoint(timeRangeObj, FieldNames.FROM_MILLIS);
TimePoint to = loadTimePoint(timeRangeObj, FieldNames.TO_MILLIS);
return new TimeRangeImpl(from, to);
return result;
}
/**
@@ -585,8 +590,6 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
+ " for corresponding regatta leaderboard. Not loading regatta leaderboard.");
} else {
result = new RegattaLeaderboardImpl(regatta, resultDiscardingRule);
result.setName(leaderboardName); // this will temporarily set the display name; it will be adjusted later if
// a display name is found
}
return result;
}
@@ -1165,7 +1168,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
UUID id = (UUID) eventDBObject.get(FieldNames.EVENT_ID.name());
TimePoint startDate = loadTimePoint(eventDBObject, FieldNames.EVENT_START_DATE);
TimePoint endDate = loadTimePoint(eventDBObject, FieldNames.EVENT_END_DATE);
if (endDate.before(startDate)) {
if (endDate != null && startDate != null && endDate.before(startDate)) {
logger.warning("End date "+endDate+" of event "+name+" with ID "+id+" is before its start date "+
startDate+"; adjusting such that end date equals start date.");
endDate = startDate;
@@ -2631,23 +2634,24 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
public Collection<DynamicCompetitor> loadAllCompetitors() {
Map<Serializable, DynamicCompetitor> competitorsById = new HashMap<>();
MongoCollection<Document> collection = database.getCollection(CollectionNames.COMPETITORS.name());
try {
final JsonWriterSettings writerSettings = JsonWriterSettings.builder().outputMode(JsonMode.RELAXED).build();
for (Document o : collection.find()) {
JSONObject json = Helpers.toJSONObjectSafe(new JSONParser().parse(o.toJson(writerSettings)));
DynamicCompetitor c = competitorWithBoatRefDeserializer.deserialize(json);
// ensure that in case there should be multiple competitors with equal IDs in the DB
// only one will survive
if (competitorsById.containsKey(c.getId())) {
collection.deleteOne(o);
} else {
competitorsById.put(c.getId(), c);
try {
JSONObject json = Helpers.toJSONObjectSafe(new JSONParser().parse(o.toJson(writerSettings)));
DynamicCompetitor c = competitorWithBoatRefDeserializer.deserialize(json);
// ensure that in case there should be multiple competitors with equal IDs in the DB
// only one will survive
if (competitorsById.containsKey(c.getId())) {
collection.deleteOne(o);
} else {
competitorsById.put(c.getId(), c);
}
} catch (Exception e) {
logger.log(Level.SEVERE, "Error connecting to MongoDB, unable to load competitors: "+
o.toString());
logger.log(Level.SEVERE, "loadCompetitors", e);
}
}
} catch (Exception e) {
logger.log(Level.SEVERE, "Error connecting to MongoDB, unable to load competitors.");
logger.log(Level.SEVERE, "loadCompetitors", e);
}
return competitorsById.values();
}
@@ -497,14 +497,6 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
leaderboardCollection.deleteOne(query);
}
@Override
public void renameLeaderboard(String oldName, String newName) {
MongoCollection<Document> leaderboardCollection = database.getCollection(CollectionNames.LEADERBOARDS.name());
Document query = new Document(FieldNames.LEADERBOARD_NAME.name(), oldName);
Document renameUpdate = new Document("$set", new Document(FieldNames.LEADERBOARD_NAME.name(), newName));
leaderboardCollection.withWriteConcern(WriteConcern.ACKNOWLEDGED).updateOne(query, renameUpdate);
}
@Override
public void storeLeaderboardGroup(LeaderboardGroup leaderboardGroup) {
MongoCollection<Document> leaderboardGroupCollection = database.getCollection(CollectionNames.LEADERBOARD_GROUPS.name());
@@ -1434,8 +1426,8 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
private void storeCompetitorWithoutBoat(Competitor competitor) {
MongoCollection<Document> collection = database.getCollection(CollectionNames.COMPETITORS.name());
JSONObject json = competitorSerializer.serialize(competitor);
Document query = Document.parse(CompetitorJsonSerializer.getCompetitorIdQuery(competitor).toString());
Document entry = Document.parse(json.toString());
Document query = Document.parse(CompetitorJsonSerializer.getCompetitorIdQuery(competitor).toJSONString());
Document entry = Document.parse(json.toJSONString());
collection.withWriteConcern(WriteConcern.ACKNOWLEDGED).replaceOne(query, entry, new UpdateOptions().upsert(true));
}
@@ -99,7 +99,7 @@ public class RaceLogRaceTracker extends AbstractRaceTrackerBaseImpl {
private static final Logger logger = Logger.getLogger(LOGGER_AND_LOGAUTHOR_NAME);
private final AbstractLogEventAuthor raceLogEventAuthor = new LogEventAuthorImpl(LOGGER_AND_LOGAUTHOR_NAME, 0);
private final Map<AbstractLog<?, ?>, Object> visitors = new HashMap<AbstractLog<?, ?>, Object>();
private final Map<AbstractLog<?, ?>, Object> visitors = new HashMap<>();
private final RaceLogConnectivityParams params;
private final WindStore windStore;
@@ -232,7 +232,6 @@ public class RaceLogRaceTracker extends AbstractRaceTrackerBaseImpl {
// into the race log
raceLog.add(new RaceLogEndOfTrackingEventImpl(MillisecondsTimePoint.now(), raceLogEventAuthor, raceLog.getCurrentPassId()));
}
// remove listeners on logs
for (Entry<AbstractLog<?, ?>, Object> visitor : visitors.entrySet()) {
visitor.getKey().removeListener(visitor.getValue());
@@ -1,16 +1,9 @@
package com.sap.sailing.domain.abstractlog.race.impl;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.sap.sailing.domain.abstractlog.race.RaceLog;
import com.sap.sailing.domain.abstractlog.race.RaceLogChangedListener;
import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
import com.sap.sse.util.WeakReferenceWithCleanerCallback;
/**
* A listener that unregisters itself from the race log's listeners if its notification target is no longer strongly
@@ -23,32 +16,7 @@ import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
*
*/
public class WeakRaceLogChangedVisitor extends AbstractRaceLogChangedVisitor {
private static final Logger logger = Logger.getLogger(WeakRaceLogChangedVisitor.class.getName());
private static ReferenceQueue<? super RaceLogChangedListener> queue = new ReferenceQueue<RaceLogChangedListener>();
private static Map<Reference<?>, WeakRaceLogChangedVisitor> referenceToVisitor = new ConcurrentHashMap<Reference<?>, WeakRaceLogChangedVisitor>();
static {
Thread t = new Thread(WeakRaceLogChangedVisitor.class.getSimpleName() + " weak reference cleaner") {
@Override
public void run() {
while (true) {
try {
Reference<?> ref = queue.remove();
WeakRaceLogChangedVisitor visitor = referenceToVisitor.remove(ref);
visitor.removeListener();
} catch (InterruptedException e) {
logger.log(Level.SEVERE, "Error trying to clean weak reference", e);
} catch (Exception e2) {
logger.severe("Shouldn't have gotten here. Continuing...");
}
}
}
};
t.setDaemon(true);
t.start();
}
private final WeakReference<RaceLogChangedListener> listenerRef;
private final RaceLog removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced;
private final WeakReferenceWithCleanerCallback<RaceLogChangedListener> listenerRef;
/**
* Remembers from which {@link RaceLog} to {@link RaceLog#removeListener(Object) remove} this visitor as a listener
@@ -57,22 +25,14 @@ public class WeakRaceLogChangedVisitor extends AbstractRaceLogChangedVisitor {
* has returned.
*/
public WeakRaceLogChangedVisitor(RaceLog removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced, RaceLogChangedListener listener) {
this.removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced = removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced;
listenerRef = new WeakReference<RaceLogChangedListener>(listener, queue);
referenceToVisitor.put(listenerRef, this);
listenerRef = new WeakReferenceWithCleanerCallback<>(listener, ()->removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced.removeListener(this));
}
@Override
protected void notifyListenerAboutEventAdded(RaceLogEvent event) {
RaceLogChangedListener listener = listenerRef.get();
if (listener == null) {
removeListener();
} else {
if (listener != null) {
listener.eventAdded(event);
}
}
private void removeListener() {
removeFromThisRaceLogWhenListenerNoLongerStronglyReferenced.removeListener(this);
}
}
@@ -1,5 +1,8 @@
package com.sap.sailing.domain.abstractlog.regatta.events;
public interface RegattaLogSetCompetitorTimeOnTimeFactorEvent extends RegattaLogSetCompetitorHandicapInfoEvent {
/**
* @return a {@link Double#isFinite(double) finite} value
*/
Double getTimeOnTimeFactor();
}
@@ -15,6 +15,9 @@ public class RegattaLogSetCompetitorTimeOnTimeFactorEventImpl extends RegattaLog
public RegattaLogSetCompetitorTimeOnTimeFactorEventImpl(TimePoint createdAt, TimePoint logicalTimePoint,
AbstractLogEventAuthor author, Serializable pId, Competitor competitor, Double timeOnTimeFactor) {
super(createdAt, logicalTimePoint, author, pId, competitor);
if (!Double.isFinite(timeOnTimeFactor)) {
throw new IllegalArgumentException("A competitor's time-on-time factor must be a finite number. "+timeOnTimeFactor+" is not.");
}
this.timeOnTimeFactor = timeOnTimeFactor;
}
@@ -39,9 +39,7 @@ public class RegattaLogImpl extends AbstractLogImpl<RegattaLogEvent, RegattaLogE
if (event != null){
RegattaLogEvent revokeEvent = new RegattaLogRevokeEventImpl(author, event, "Revoked by AdminConsole (RaceLogTracking)");
this.add(revokeEvent);
final List<RegattaLogEvent> regattaLogDeviceMarkMappingEvents = new AllEventsOfTypeFinder<>(this, /* only unrevoked */ true, RegattaLogDeviceMappingEvent.class).analyze();
for (RegattaLogEvent deviceMappingEvent : regattaLogDeviceMarkMappingEvents) {
@SuppressWarnings("unchecked") // The list can only contain device mapping events
WithID withID = ((RegattaLogDeviceMappingEvent<WithID>) deviceMappingEvent).getMappedTo();
@@ -0,0 +1,52 @@
package com.sap.sailing.domain.base;
import java.net.URI;
import com.sap.sse.common.Color;
import com.sap.sse.common.Duration;
/**
* Default implementation of the {@link CompetitorChangeListener} interface with all methods doing nothing by default.
*
* @author Axel Uhl (D043530)
*
*/
public interface BaseCompetitorChangeListener extends CompetitorChangeListener {
@Override
default void nationalityChanged(WithNationality what, Nationality oldNationality, Nationality newNationality) {
}
@Override
default void colorChanged(Color oldColor, Color newColor) {
}
@Override
default void nameChanged(String oldName, String newName) {
}
@Override
default void shortNameChanged(String oldShortName, String newShortName) {
}
@Override
default void emailChanged(String oldEmail, String newEmail) {
}
@Override
default void searchTagChanged(String oldSearchTag, String newSearchTag) {
}
@Override
default void flagImageChanged(URI oldFlagImageURI, URI newFlagImageURI) {
}
@Override
default void timeOnTimeFactorChanged(Double oldTimeOnTimeFactor, Double newTimeOnTimeFactor) {
}
@Override
default void timeOnDistanceAllowancePerNauticalMileChanged(Duration oldTimeOnDistanceAllowancePerNauticalMile,
Duration newTimeOnDistanceAllowancePerNauticalMile) {
}
}
@@ -54,6 +54,7 @@ public interface Competitor extends NamedWithID, IsManagedByCache<SharedDomainFa
/**
* Adds a listener to this competitor. The listener is also added to the boat and the team for changes.
* Adding a listener that is already part of this competitor's listeners set remains without effect.
* The listeners added here will not be serialized together with this {@link Competitor} instance.
*/
void addCompetitorChangeListener(CompetitorChangeListener listener);
@@ -1,6 +1,5 @@
package com.sap.sailing.domain.base;
public interface LeaderboardChangeListener {
void nameChanged(String oldName, String newName);
void displayNameChanged(String oldDisplayName, String newDisplayName);
}
@@ -34,6 +34,7 @@ public class CompetitorImpl implements DynamicCompetitor {
private Duration timeOnDistanceAllowancePerNauticalMile;
public CompetitorImpl(Serializable id, String name, String shortName, Color color, String email, URI flagImage, DynamicTeam team, Double timeOnTimeFactor, Duration timeOnDistanceAllowancePerNauticalMile, String searchTag) {
assertFiniteTimeOnTimeFactor(timeOnTimeFactor);
this.id = id;
this.name = name;
this.shortName = shortName;
@@ -235,6 +236,7 @@ public class CompetitorImpl implements DynamicCompetitor {
@Override
public void setTimeOnTimeFactor(Double timeOnTimeFactor) {
assertFiniteTimeOnTimeFactor(timeOnTimeFactor);
Double oldTimeOnTimeFactor = this.timeOnTimeFactor;
this.timeOnTimeFactor = timeOnTimeFactor;
if (!Util.equalsWithNull(oldTimeOnTimeFactor, timeOnTimeFactor)) {
@@ -244,6 +246,12 @@ public class CompetitorImpl implements DynamicCompetitor {
}
}
private void assertFiniteTimeOnTimeFactor(Double timeOnTimeFactor) {
if (timeOnTimeFactor != null && !Double.isFinite(timeOnTimeFactor)) {
throw new IllegalArgumentException("A competitor's time-on-time factor must be a finite number. "+timeOnTimeFactor+" is not.");
}
}
@Override
public void setTimeOnDistanceAllowancePerNauticalMile(Duration timeOnDistanceAllowancePerNauticalMile) {
Duration oldTimeOnDistanceAllowancePerNauticalMile = this.timeOnDistanceAllowancePerNauticalMile;
@@ -329,7 +329,7 @@ public class TransientCompetitorAndBoatStoreImpl implements CompetitorAndBoatSto
public Competitor updateCompetitor(String idAsString, String newName, String newShortName, Color newDisplayColor, String newEmail,
Nationality newNationality, URI newTeamImageUri, URI newFlagImageUri,
Double timeOnTimeFactor, Duration timeOnDistanceAllowancePerNauticalMile, String newSearchTag, boolean storePersistently) {
DynamicCompetitor competitor = getExistingCompetitorByIdAsString(idAsString);
final DynamicCompetitor competitor = getExistingCompetitorByIdAsString(idAsString);
if (competitor != null) {
LockUtil.lockForWrite(lock);
try {
@@ -109,19 +109,23 @@ public class MessageFileServiceImpl implements MessageFileService {
private RPDMessage getRPDMessage(SailMasterMessage message) throws ParseException {
String[] sections = message.getSections();
String raceID = sections[1];
int status = Integer.valueOf(sections[2]);
String sec3 = sections[3];
String sdataTimeStringWithoutColon = sec3.substring(0, sec3.length() - 3)
+ sec3.substring(sec3.length() - 2, sec3.length());
System.out.println(sdataTimeStringWithoutColon);
Date timePoint = dateFormat.parse(sdataTimeStringWithoutColon);
final Date timePoint;
synchronized (dateFormat) {
timePoint = dateFormat.parse(sdataTimeStringWithoutColon);
}
// Date startTimeEstimatedStartTime = timeFormat.parse(sections[4]);
Date startTimeEstimatedStartTime = sections[4].trim().length() == 0 ? null : timeFormat.parse(sections[4]);
Long millisecondsSinceRaceStart = sections[5].trim().length() == 0 ? null : timeFormat.parse(sections[5])
.getTime();
final Date startTimeEstimatedStartTime;
final Long millisecondsSinceRaceStart;
synchronized (timeFormat) {
startTimeEstimatedStartTime= sections[4].trim().length() == 0 ? null : timeFormat.parse(sections[4]);
millisecondsSinceRaceStart = sections[5].trim().length() == 0 ? null : timeFormat.parse(sections[5]).getTime();
}
Integer nextMarkIndexForLeader = sections[6].trim().length() == 0 ? null : Integer.valueOf(sections[6]);
Distance distanceToNextMarkForLeader = sections[7].trim().length() == 0 ? null : new MeterDistance(
Double.valueOf(sections[7]));
@@ -232,8 +236,11 @@ public class MessageFileServiceImpl implements MessageFileService {
for (int i = 0; i < count; i++) {
String[] clockAtMarkDetail = message.getSections()[3 + i].split(";");
int markIndex = Integer.valueOf(clockAtMarkDetail[0]);
Date timePoint = clockAtMarkDetail.length <= 1 || clockAtMarkDetail[1].trim().length() == 0 ? null
final Date timePoint;
synchronized (timeFormat) {
timePoint = clockAtMarkDetail.length <= 1 || clockAtMarkDetail[1].trim().length() == 0 ? null
: timeFormat.parse(clockAtMarkDetail[1]);
}
result.add(new ClockAtMarkElement(markIndex, timePoint, clockAtMarkDetail.length <= 2 ? null
: clockAtMarkDetail[2]));
}
@@ -250,7 +257,10 @@ public class MessageFileServiceImpl implements MessageFileService {
Integer markIndex = details.length <= 0 || details[0].trim().length() == 0 ? null : Integer
.valueOf(details[0]);
Integer rank = details.length <= 1 || details[1].trim().length() == 0 ? null : Integer.valueOf(details[1]);
Date timeSinceStart = details[2].trim().length() == 0 ? null : timeFormat.parse(details[2]);
final Date timeSinceStart;
synchronized (timeFormat) {
timeSinceStart = details[2].trim().length() == 0 ? null : timeFormat.parse(details[2]);
}
timingDataelementList.add(new TimingDataElement(markIndex == null ? 0 : markIndex, rank == null ? 0 : rank, timeSinceStart));
}
return new TMDMessage(raceID, boatID, timingDataelementList);
@@ -70,8 +70,6 @@ public interface DomainFactory {
MarkPassing createMarkPassing(TimePoint timePoint, Waypoint waypoint, Competitor competitor);
void removeRace(String raceID);
RaceType getRaceTypeFromRaceID(String raceID);
RaceTrackingConnectivityParameters createTrackingConnectivityParameters(String hostname, int port, String raceID,
@@ -6,12 +6,10 @@ import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.logging.Logger;
@@ -401,24 +399,6 @@ public class DomainFactoryImpl implements DomainFactory {
return baseDomainFactory.createMarkPassing(timePoint, waypoint, competitor);
}
@Override
public void removeRace(String raceID) {
Regatta regatta = raceIDToRegattaCache.get(raceID);
if (regatta != null) {
Set<RaceDefinition> toRemove = new HashSet<RaceDefinition>();
RaceDefinition race = regatta.getRaceByName(raceID);
if (race != null) {
toRemove.add(race);
}
for (RaceDefinition raceToRemove : toRemove) {
regatta.removeRace(raceToRemove);
}
if (Util.isEmpty(regatta.getAllRaces())) {
raceIDToRegattaCache.remove(raceID);
}
}
}
@Override
public Nationality getOrCreateNationality(String threeLetterIOCCode) {
return baseDomainFactory.getOrCreateNationality(threeLetterIOCCode);
@@ -0,0 +1,3 @@
{"rms":[
{"NatAuth":"UKR","BIN":"UKR0267_Karina","CertNo":"0267_4","RefNo":"03600000HUH","SailNo":"UKR 267","YachtName":"Karina","Class":"Teliga 89","Builder":"im. L Teligi","Designer":"L. Teliga","Address3":"YC Obolon","C_Type":"CLUB","Family":"ORC","Division":"C","IssueDate":"2020-05-07T11:48:07.143Z","Age_Year":1975,"CrewWT":460,"LOA":8.95,"IMSL":7.354,"Draft":1.562,"MB":3.092,"Dspl_Measurement":3790,"Stability_Index":107.3,"Dynamic_Allowance":0.328,"GPH":725.4,"TMF_Inshore":0.8568,"ILCWA":787.8,"TMF_Offshore":0.849,"OSN":706.7,"CDL":6.694,"TN_Offshore_Low":0.8193,"TN_Offshore_Medium":1.0478,"TN_Offshore_High":1.1557,"TN_Inshore_Low":0.6372,"TN_Inshore_Medium":0.8543,"TN_Inshore_High":0.9652,"TND_Offshore_Low":823.9,"TND_Offshore_Medium":644.2,"TND_Offshore_High":584.1,"TND_Inshore_Low":1059.3,"TND_Inshore_Medium":790.1,"TND_Inshore_High":699.3,"OSN_Jibs":735.4,"TMF_Jibs":0.8158,"Pred_Up_TOD":708.3,"Pred_Down_TOD":650.3,"Pred_Up_TOT":0.8471,"Pred_Down_TOT":0.9227,"Dspl_Sailing":4377,"WSS":18.58,"Area_Main":17.88,"Area_Jib":33.38,"Area_Sym":71.46,"Area_ASym":56.06,"GPH_Jibs":757.5,"GPH_Jibs_TOT":0.7921,"Allowances":{"WindSpeeds":[6,8,10,12,14,16,20],"WindAngles":[52,60,75,90,110,120,135,150],"Beat":[1215.6,1032.2,921.7,859.4,840,835.1,853.2],"Run":[1102.9,886.5,746.4,655.8,596.9,564.7,518.9],"BeatAngle":[42.8,42,42.8,41.4,40.9,40.7,41.8],"GybeAngle":[148,152,150.5,162,180,180,180],"WL":[1159.2,959.4,834.1,757.6,718.4,699.9,686],"CR":[989.5,803.2,704.2,647.7,614.3,594,572.2],"OC":[1153.6,900.2,752.5,666.7,624.4,593.1,543.1],"NS":[1044.7,843.1,734.6,671.9,634.2,611.1,586],"OL":[1116.2,923.6,815.1,753.8,722.7,706.6,697.2],"R52":[796.9,680.2,617.6,591.6,581.2,577.6,579],"R60":[753.3,644.5,598.1,576.8,565.2,560.4,559.4],"R75":[723,622.2,584.2,564,549,537.5,528],"R90":[729.8,623.6,577.4,552.9,539.1,527.4,503.9],"R110":[729.1,608.7,564.9,538.7,516.9,499.7,477.8],"R120":[750.3,617.8,568.6,540.6,515,493.4,466],"R135":[817.4,671.3,588.5,556.1,530.2,505,465.1],"R150":[955.2,767.9,647,584.3,555.6,531.9,487.7]}}
]}
@@ -13,6 +13,11 @@ public class TestORCCertificateImporterJSON extends AbstractORCCertificateImport
testSimpleLocalFileRead("GER2019.json", "GER20041179");
}
@Test
public void testReadingJSONWithSpecificBins() throws IOException, ParseException {
testSimpleLocalFileRead("03600000HUH.json", "03600000HUH");
}
@FailIfNoValidOrcCertificates
@Test
public void testSimpleOnlineJSONFileRead() throws IOException, ParseException, InterruptedException {
@@ -43,7 +43,7 @@ public class ConcurrencyTest extends OnlineTracTracBasedTest {
super.setUp("event_20110815_RCSwedenCu",
/* raceId */ "event_20110815_RCSwedenCu-Race8",
/* liveUri */ null,
/* storedUri */ tractracTunnel ? new URI("tcp://"+tractracTunnelHost+":"+TracTracConnectionConstants.PORT_TUNNEL_STORED) : new URI("tcp://" + TracTracConnectionConstants.HOST_NAME + ":" + TracTracConnectionConstants.PORT_STORED),
/* storedUri */ new URI("tcp://" + TracTracConnectionConstants.HOST_NAME + ":4401"),
new ReceiverType[] { ReceiverType.MARKPASSINGS,
ReceiverType.RACECOURSE, ReceiverType.RAWPOSITIONS });
getTrackedRace().recordWind(
@@ -72,7 +72,6 @@ public class ConcurrencyTest extends OnlineTracTracBasedTest {
long duration = System.nanoTime()-start;
logger.info("1 thread: "+duration+"ns");
logger.info("number of approximation points: "+approximation1.size());
dp = new DouglasPeucker<Competitor, GPSFixMoving>(teamAquaTrack, ThreadPoolUtil.INSTANCE.getDefaultBackgroundTaskThreadPoolExecutor());
start = System.nanoTime();
List<GPSFixMoving> approximation2 = dp.approximate(new MeterDistance(3), firstMarkPassing.getTimePoint(), lastMarkPassing.getTimePoint());
@@ -31,36 +31,36 @@ public class CountryCodeTest {
public void convertHTML() throws IOException {
InputStream is = Util.class.getResourceAsStream("countrycodes.csv");
assertNotNull(is);
BufferedReader br = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
String line;
List<String[]> matrix = new LinkedList<String[]>();
String[] row = null;
int column = 8;
Pattern p = Pattern.compile("<TD[^>]*> *(<[pP]>)?([^<]*)(</[pP]>)? *</TD>");
while ((line=br.readLine()) != null) {
if (line.contains("<TR>")) {
assertEquals(8, column);
column = 0;
row = new String[8];
matrix.add(row);
} else {
if (line.contains("<TD")) {
Matcher m = p.matcher(line);
if (m.find()) {
String entry = m.group(2);
if (entry != null) {
entry = URLDecoder.decode(entry, "UTF-8").trim();
if (entry.startsWith(".")) {
// IANA domain name will be stripped of leading "."
entry = entry.substring(1);
try (BufferedReader br = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")))) {
String line;
String[] row = null;
int column = 8;
Pattern p = Pattern.compile("<TD[^>]*> *(<[pP]>)?([^<]*)(</[pP]>)? *</TD>");
while ((line = br.readLine()) != null) {
if (line.contains("<TR>")) {
assertEquals(8, column);
column = 0;
row = new String[8];
matrix.add(row);
} else {
if (line.contains("<TD")) {
Matcher m = p.matcher(line);
if (m.find()) {
String entry = m.group(2);
if (entry != null) {
entry = URLDecoder.decode(entry, "UTF-8").trim();
if (entry.startsWith(".")) {
// IANA domain name will be stripped of leading "."
entry = entry.substring(1);
}
}
row[column++] = entry == null || entry.length() == 0 ? null : entry;
}
row[column++] = entry == null || entry.length() == 0 ? null : entry;
}
}
}
}
br.close();
assertEquals(NUMBER_OF_COUNTRY_CODES, matrix.size());
for (String[] r : matrix) {
StringBuilder sb = new StringBuilder(" add(new CountryCodeImpl(");
@@ -38,18 +38,17 @@ public class LeaderboardDTOCacheInvalidationTest {
/* addOverallDetails */ false, /* trackedRegattaRegistry */ null, DomainFactory.INSTANCE,
/* fillTotalPointsUncorrected */ false);
assertEquals(oldName, dto.getName());
l.setName(newName);
l.setDisplayName(newName);
LeaderboardDTO dtoNew = l.getLeaderboardDTO(now, Collections.<String> emptySet(),
/* addOverallDetails */ false, /* trackedRegattaRegistry */ null, DomainFactory.INSTANCE,
/* fillTotalPointsUncorrected */ false);
assertEquals(newName, dtoNew.getName());
assertEquals(newName, dtoNew.getDisplayName());
}
@Test
public void testFlexibleLeaderboardDisplayNameChangeInvalidatesCache()
throws NoWindException, InterruptedException, ExecutionException {
final String name = "My Flexible Leaderboard";
final String newName = "New Name of Flexible Leaderboard";
final String oldDisplayName = "D1";
final String newDisplayName = "D2";
final TimePoint now = MillisecondsTimePoint.now();
@@ -62,11 +61,6 @@ public class LeaderboardDTOCacheInvalidationTest {
/* addOverallDetails */ false, /* trackedRegattaRegistry */ null, DomainFactory.INSTANCE,
/* fillTotalPointsUncorrected */ false);
assertEquals(name, seriesLbDtoBeforeDisplayNameIsSet.getRaceList().iterator().next().getName());
l.setName(newName);
LeaderboardDTO seriesLbDtoBeforeDisplayNameIsSetAndAfterNameWasChanged = seriesLb.getLeaderboardDTO(now, Collections.<String> emptySet(),
/* addOverallDetails */ false, /* trackedRegattaRegistry */ null, DomainFactory.INSTANCE,
/* fillTotalPointsUncorrected */ false);
assertEquals(newName, seriesLbDtoBeforeDisplayNameIsSetAndAfterNameWasChanged.getRaceList().iterator().next().getName());
l.setDisplayName(oldDisplayName);
LeaderboardDTO dto = l.getLeaderboardDTO(now, Collections.<String> emptySet(),
/* addOverallDetails */ false, /* trackedRegattaRegistry */ null, DomainFactory.INSTANCE,
@@ -91,7 +91,6 @@ public abstract class OnlineTracTracBasedTest extends AbstractTracTracLiveTest i
super();
}
@Before
public void setUp() throws Exception {
domainFactory = new DomainFactoryImpl(new com.sap.sailing.domain.base.impl.DomainFactoryImpl(DomainFactory.TEST_RACE_LOG_RESOLVER));
Loaded 100 of 489 files, more files were not shown because too many files have changed in this diff. Show more