Merge branch 'master' into bug5230

# Conflicts:
#	java/com.sap.sailing.selenium.test/src/com/sap/sailing/selenium/api/test/RoleApiTest.java
#	java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/client/UserManagementService.java
#	java/com.sap.sse.security/src/com/sap/sse/security/jaxrs/api/RoleResource.java
This commit is contained in:
Thomas Wiese
2020-07-13 15:35:56 +02:00
1113 changed files with 35436 additions and 17541 deletions
+37 -36
View File
@@ -1,36 +1,37 @@
/target
www-test
war
build.log
reporting.log
.metadata
*.class
*.swp
*~
manifest.txt
java/com.sap.sailing.gwt.ui/gwt-unitCache/*
java/com.sap.sailing.gwt.ui/war/WEB-INF/deploy/*
java/com.sap.sse.security.ui/WEB-INF/deploy/*
sailing_debug0*
dist
build
.DS_Store
java/com.sap.sailing.simulator/bin/com/sap/sailing/simulator/Simulator.gwt.xml
/mobile/com.sap.sailing.racecommittee.app/res/values/keys.xml
java/com.sap.sailing.gwt.ui/SailingGWT Remote Profiling (Run-Mode only).launch
java/com.sap.sailing.gwt.ui/SailingGWT.launch
## Android Studio and Intellij and Android in general
gen/
.idea/
*.ipr
*.iws
*.iml
out/
.gradle
local.properties
git.xml
mobile/github-advrecyclerview_lib/bin
captures
/.recommenders/
/java/.recommenders/
/target
www-test
war
build.log
reporting.log
.metadata
*.class
*.swp
*~
manifest.txt
java/com.sap.sailing.gwt.ui/gwt-unitCache/*
java/com.sap.sailing.gwt.ui/war/WEB-INF/deploy/*
java/com.sap.sse.security.ui/WEB-INF/deploy/*
sailing_debug0*
dist
build
.DS_Store
java/com.sap.sailing.simulator/bin/com/sap/sailing/simulator/Simulator.gwt.xml
/mobile/com.sap.sailing.racecommittee.app/res/values/keys.xml
java/com.sap.sailing.gwt.ui/SailingGWT Remote Profiling (Run-Mode only).launch
java/com.sap.sailing.gwt.ui/SailingGWT.launch
## Android Studio and Intellij and Android in general
gen/
.idea/
*.ipr
*.iws
*.iml
out/
.gradle
local.properties
git.xml
mobile/github-advrecyclerview_lib/bin
captures
/.recommenders/
/java/.recommenders/
java/com.sap.sailing.selenium.test/com.sap.sailing.selenium.test (No Proxy) individual.launch
+1 -1
View File
@@ -13,7 +13,7 @@ buildscript {
}
}
dependencies {
classpath "com.android.tools.build:gradle:3.6.2"
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.3"
classpath "org.ajoberstar:grgit:2.3.0"
}
+30 -25
View File
@@ -27,6 +27,15 @@ find_project_home ()
echo $(correct_file_path "$1")
}
clean_gwt_artifacts ()
{
cd $PROJECT_HOME/java
rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.* com.sap.$PROJECT_TYPE.gwt.ui/.generated
rm -rf com.sap.sailing.dashboards.gwt/com.sap.sailing.dashboards.gwt.* com.sap.sailing.dashboards.gwt/.generated
rm -rf com.sap.sse.security.ui/com.sap.sse.security.ui.* com.sap.sse.security.ui/.generated
rm -rf com.sap.sse.gwt/com.sap.sse.gwt.* com.sap.sse.gwt/.generated
}
# this holds for default installation
USER_HOME=~
START_DIR="`pwd`"
@@ -207,10 +216,7 @@ if [[ "$@" == "clean" ]]; then
if [[ $? != 0 ]]; then
exit 100
fi
cd $PROJECT_HOME/java
rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.*
rm -rf com.sap.sailing.dashboards.gwt/com.sap.sailing.dashboards.gwt.*
rm -rf com.sap.sse.security.ui/com.sap.sse.security.ui.*
clean_gwt_artifacts
cd $PROJECT_HOME
echo "Using following command: mvn $extra -DargLine=\"$APP_PARAMETERS\" -fae -s $MAVEN_SETTINGS $clean"
echo "Maven version used: `mvn --version`"
@@ -559,27 +565,26 @@ if [[ "$@" == "build" ]] || [[ "$@" == "all" ]]; then
cd $PROJECT_HOME/java
if [ $gwtcompile -eq 1 ] && [[ "$clean" == "clean" ]]; then
echo "INFO: Compiling GWT (rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.*)"
rm -rf com.sap.$PROJECT_TYPE.gwt.ui/com.sap.$PROJECT_TYPE.*
GWT_XML_FILES=`find . -name '*.gwt.xml'`
if [ $onegwtpermutationonly -eq 1 ]; then
echo "INFO: Patching .gwt.xml files such that only one GWT permutation needs to be compiled"
for i in $GWT_XML_FILES; do
echo "INFO: Patching $i files such that only one GWT permutation needs to be compiled"
cp $i $i.bak
cat $i | sed -e 's/AllPermutations/SinglePermutation/' >$i.sed
mv $i.sed $i
done
else
echo "INFO: Patching .gwt.xml files such that all GWT permutations are compiled"
for i in $GWT_XML_FILES; do
echo "INFO: Patching $i files such that all GWT permutations are compiled"
cp $i $i.bak
cat $i | sed -e 's/SinglePermutation/AllPermutations/' >$i.sed
mv $i.sed $i
done
fi
clean_gwt_artifacts
GWT_XML_FILES=`find . -name '*.gwt.xml'`
if [ $onegwtpermutationonly -eq 1 ]; then
echo "INFO: Patching .gwt.xml files such that only one GWT permutation needs to be compiled"
for i in $GWT_XML_FILES; do
echo "INFO: Patching $i files such that only one GWT permutation needs to be compiled"
cp $i $i.bak
cat $i | sed -e 's/AllPermutations/SinglePermutation/' >$i.sed
mv $i.sed $i
done
else
echo "INFO: Patching .gwt.xml files such that all GWT permutations are compiled"
for i in $GWT_XML_FILES; do
echo "INFO: Patching $i files such that all GWT permutations are compiled"
cp $i $i.bak
cat $i | sed -e 's/SinglePermutation/AllPermutations/' >$i.sed
mv $i.sed $i
done
fi
else
echo "INFO: GWT Compilation disabled"
extra="$extra -Pdebug.no-gwt-compile"
+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
+464
View File
@@ -0,0 +1,464 @@
#!/usr/bin/env python3
#
# Fetches and analyzes build and test data from the Hudson API
# Run with -h or --help for usage information
# @author Tim Hessenmüller (D062243)
#
try:
import aiohttp
except ImportError:
print("Missing package: aiohttp\nInstall with: pip3 install aiohttp\npip3 debian package: python3-pip")
exit(1)
import asyncio, logging, random
#from typing import List, Tuple, Dict
from sys import version_info
from argparse import ArgumentParser
from getpass import getpass
# ---------- Model ----------
class WithUrl:
url = ""#: str
def __init__(self, url):
self.url = url
class NamedWithUrl(WithUrl):
name = ""#: str
def __init__(self, name, url):
super(NamedWithUrl, self).__init__(url)
self.name = name
class Case:
name = ""#: str
status = ""#: str
duration = -1#: int
fail_age = -1#: int
def __init__(self, name, status, duration, fail_age):
self.name = name
self.status = status
self.duration = duration
self.fail_age = fail_age
class Suite:
name = ""#: str
cases = None#: List[Case] = []
duration = -1.0#: float
def __init__(self, name, duration):
self.name = name
self.cases = []
self.duration = duration
class Build(NamedWithUrl):
suites = []#: List[Suite]
class Job(NamedWithUrl):
builds = []#: List[Build]
color = ""#: str
class Root(WithUrl):
jobs = []#: List[Job]
# ---------- Donwloader ---------
class Downloader:
__session = None#: aiohttp.ClientSession
__lock = None#: asyncio.Semaphore
__all_job_urls = None#: Dict[str, str]
base_url = ""#: str
api_suffix = ""#: str
logger = logging.getLogger(__name__)
n_builds = 0
p_builds = 0
def __init__(self, base_url, auth, max_concurrent_connections, api_suffix="api/json"):
self.base_url = base_url
self.__session = aiohttp.ClientSession(auth=aiohttp.BasicAuth(auth[0], auth[1]))
self.__lock = asyncio.Semaphore(max_concurrent_connections)
self.api_suffix = api_suffix
async def close(self):
if self.__session != None:
await self.__session.close()
async def build_tree(self, jobs, build_limit):
if self.__all_job_urls == None:
# Very first request; Test connection and get all existing jobs to compare against
try:
await self.__get_job_list()
except aiohttp.ClientResponseError as e:
self.logger.critical("Connection to Hudson failed:\n" + e)
exit(78)
root = Root(self.base_url)
for job in jobs:
if job == "*":
root.jobs = [Job(k, v) for k, v in self.__all_job_urls.items()]
break
elif job in self.__all_job_urls:
root.jobs.append(Job(job, self.__all_job_urls.get(job)))
else:
self.logger.warning("Could not find job: " + job)
await asyncio.gather(*[self.__populate_builds_in_job(job, build_limit) for job in root.jobs])
return root
async def __get_job_list(self):
self.__all_job_urls = {}
json = await self.get_json(self.base_url)
for job in json["jobs"]:
self.__all_job_urls[job["name"]] = job["url"]
async def __populate_builds_in_job(self, job, build_limit):
try:
json = await self.get_json(job.url)
except aiohttp.ClientResponseError:
return
job.color = json.get("color")
if build_limit <= 0:
for build in json["builds"]:
job.builds.append(Build(str(build["number"]), build["url"]))
else:
for build in json["builds"][0:build_limit]:
job.builds.append(Build(str(build["number"]), build["url"]))
self.n_builds += len(job.builds)
await asyncio.gather(*[self.__populate_suites_in_build(build) for build in job.builds])
async def __populate_suites_in_build(self, build):
try:
json = await self.get_json(build.url + "testReport/api/json", append_api_suffix=False)
except aiohttp.ClientResponseError:
return
build.suites = await asyncio.gather(*[self.__parse_suite_with_cases(suite) for suite in json["suites"]])
self.p_builds += 1
async def __parse_suite_with_cases(self, json):
suite = Suite(json.get("name"), json.get("duration"))
for case_json in json["cases"]:
suite.cases.append(Case(case_json["className"] + "." + case_json["name"], case_json["status"], case_json["duration"], case_json["age"]))
return suite
async def get_json(self, url, append_api_suffix=True):
if append_api_suffix == True:
if not url.endswith("/"):
url += "/"
url += self.api_suffix
async with self.__lock:
for _ in range(5):
try:
async with self.__session.request("GET", url) as resp:
try:
resp.raise_for_status()
except aiohttp.ClientResponseError as e:
self.logger.debug(e)
raise e
return await resp.json(content_type=None) # Disables content type check
except asyncio.TimeoutError as e:
self.logger.warning(e)
await asyncio.sleep(random.uniform(1, 10))
self.logger.error("5 consecutive timeouts for URL: {}".format(url))
raise aiohttp.ClientResponseError
def get_progress(self):
if self.n_builds == 0:
return 0
return self.p_builds / self.n_builds
# ---------- Analysis ----------
class AbstractModule:
def process(self, root):
raise NotImplementedError
def progress(self):
raise NotImplementedError
def result(self):
return None
class Analyzer:
__tasks = []
modules = None#: List[AbstractModule]
def __init__(self, *modules):
self.modules = list(modules)
async def analyze_tree(self, root):
loop = asyncio.get_event_loop()
await asyncio.gather(*[loop.run_in_executor(None, m.process, root) for m in self.modules])
def get_progress(self):
if len(self.modules) == 0:
return 0
acc = 0
for m in self.modules:
acc += m.progress()
return acc / len(self.modules)
def print_results(self):
for m in self.modules:
r = m.result()
if r != None:
print("Results from {}:\n{}".format(m.__class__.__name__, r))
def add_module(self, module):
self.modules.append(module)
def remove_module(self, module):
self.modules.remove(module)
class ModelVisualizerModule(AbstractModule):
__root = None#: Root
level = -1#: int
def __init__(self, level = 1):
super(ModelVisualizerModule, self).__init__()
self.level = level
def process(self, root):
self.__root = root
def progress(self):
return 1
def result(self):
out = ""
for job in self.__root.jobs:
out += job.name + ": " + job.color + ", " + str(len(job.builds)) + " builds\n"
if self.level >= 1:
for build in job.builds:
out += " " + build.name + ": " + str(len(build.suites)) + " test suites\n"
if self.level >= 2:
for suite in build.suites:
out += " " + suite.name + ": " + str(len(suite.cases)) + " test cases\n"
return out[:-1]
class FlakyCasesModule(AbstractModule):
case_counter = {}#: Dict[str, int]
n_builds = 0
p_builds = 0
def __init__(self):
super(FlakyCasesModule, self).__init__()
def process(self, root):
for job in root.jobs:
self.n_builds += len(job.builds)
for job in root.jobs:
for build in job.builds:
for suite in build.suites:
for case in suite.cases:
if case.fail_age == 1:
self.case_counter[case.name] = self.case_counter.get(case.name, 0) + 1
self.p_builds += 1
def progress(self):
if self.n_builds == 0:
return 0
return self.p_builds / self.n_builds
def result(self):
out = "sum of case first fail across all builds divided by number of builds, name of case\n"
s = [(k, self.case_counter.get(k)) for k in sorted(self.case_counter, key=self.case_counter.get, reverse=True)]
for case, new_fails in s:
out += " {0:.2f}, {1}\n".format(new_fails / self.n_builds, case)
return out[:-1]
class FailedCasesModule(AbstractModule):
case_counter = {}#: Dict[str, int]
n_builds = 0
p_builds = 0
def __init__(self):
super(FailedCasesModule, self).__init__()
def process(self, root):
for job in root.jobs:
self.n_builds += len(job.builds)
for job in root.jobs:
for build in job.builds:
for suite in build.suites:
for case in suite.cases:
if case.status == "FAILED" or case.status == "REGRESSION":
self.case_counter[case.name] = self.case_counter.get(case.name, 0) + 1
self.p_builds += 1
def progress(self):
if self.n_builds == 0:
return 0
return self.p_builds / self.n_builds
def result(self):
out = "sum of case fails across all builds divided by number of builds, name of case\n"
s = [(k, self.case_counter.get(k)) for k in sorted(self.case_counter, key=self.case_counter.get, reverse=True)]
for case, fails in s:
out += " {0:.2f}, {1}\n".format(fails / self.n_builds, case)
return out[:-1]
class FailedSuitesModule(FailedCasesModule):
def __init__(self):
super(FailedSuitesModule, self).__init__()
def process(self, root):
for job in root.jobs:
self.n_builds += len(job.builds)
for job in root.jobs:
for build in job.builds:
for suite in build.suites:
for case in suite.cases:
if case.status == "FAILED":
self.case_counter[suite.name] = self.case_counter.get(suite.name, 0) + 1
break
self.p_builds += 1
class CaseDurationModule(AbstractModule):
dur_counter = {}
run_counter = {}
n_builds = 0
p_builds = 0
def __init__(self):
super(CaseDurationModule, self).__init__()
def process(self, root):
for job in root.jobs:
self.n_builds += len(job.builds)
for job in root.jobs:
for build in job.builds:
for suite in build.suites:
for case in suite.cases:
if case.status == "PASSED":
self.dur_counter[case.name] = self.dur_counter.get(case.name, 0) + case.duration
self.run_counter[case.name] = self.run_counter.get(case.name, 0) + 1
self.p_builds += 1
def progress(self):
if self.n_builds == 0:
return 0
return self.p_builds / self.n_builds
def result(self):
out = "avg duration of passed case across all builds, name of case\n"
s = [(case, total / self.run_counter.get(case), total) for case, total in self.dur_counter.items()]
s = sorted(s, key=lambda x: x[1], reverse=True)
for case, duration, total in s:
out += "{0:>3}s/r ({1:>6}s total): {2}\n".format(duration, total, case)
return out[:-1]
# ---------- Functions And Helpers ----------
class ProgressBar:
__task = None
enabled = True
running = False
__spin = -1
def start(self, progress_function):
if self.__task == None:
self.__task = asyncio_create_task(self.show(progress_function))
async def show(self, progress_function):
if not self.enabled:
return
self.running = True
while self.running:
p = progress_function()
print("{0:>3}% [{1}] {2}".format(round(p * 100), self.__bar(p), self.__spinner()), end="\r", flush=True)
if p >= 1:
self.running = False
else:
await asyncio.sleep(0.5)
print("100% [{}] ".format(self.__bar(1)), flush=True)
def __bar(self, p):
width = 20
pos = round(p * width)
if pos > 0:
out = "{}>".format('=' * (pos - 1))
else:
out = ""
return out + "-" * (width - len(out))
def __spinner(self):
seq = "-\\|/"
self.__spin = (self.__spin + 1) % len(seq)
return seq[self.__spin]
async def done(self):
self.running = False
if self.__task != None:
await self.__task
self.__task = None
def asyncio_create_task(coro):
if version_info >= (3, 7):
return asyncio.create_task(coro)
loop = asyncio.get_event_loop()
return loop.create_task(coro)
def asyncio_run(aw): #https://stackoverflow.com/questions/55590343/asyncio-run-or-run-until-complete
if version_info >= (3, 7):
return asyncio.run(aw)
# Emulate asyncio.run() on older versions
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
return loop.run_until_complete(aw)
finally:
loop.close()
asyncio.set_event_loop(None)
def parse_args():
parser = ArgumentParser(description="Fetches and analyzes build and test data from the Hudson API")
parser.add_argument("username", help="Hudson account username")
parser.add_argument("job", nargs="+", help="one or more jobs to fetch")
parser.add_argument("--host", default="https://hudson.sapsailing.com/", help="hostname / IP address of Hudson instance")
parser.add_argument("-c", type=int, default=25, metavar="NUM", help="maximum concurrent connections")
parser.add_argument("-n", type=int, default=0, metavar="LIMIT", help="limits the number of builds per job")
v_group = parser.add_mutually_exclusive_group()
v_group.add_argument("-v", action="store_true")
v_group.add_argument("-q", action="store_true")
args = parser.parse_args()
if not args.host.endswith("/"):
args.host += "/"
return args
def create_logger(args):
level = logging.INFO
if args.q:
level = logging.ERROR
elif args.v:
level = logging.DEBUG
log_handler = logging.StreamHandler()
log_handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(message)s", datefmt="%Y-%m-%dT%H:%M:%S%z"))
log_handler.setLevel(level)
logger = logging.getLogger(__name__)
logger.addHandler(log_handler)
logger.setLevel(level)
return logger
def get_credentials(username):
password = getpass("Enter password: ")
return (username, password)
async def main(args):
logger = create_logger(args)
pb = ProgressBar()
pb.enabled = not args.q
d = Downloader(args.host, get_credentials(args.username), args.c)
logger.info("Fetching data...")
pb.start(d.get_progress)
tree = await d.build_tree(args.job, args.n)
await d.close()
await pb.done()
logger.info("Processing data...")
a = Analyzer(ModelVisualizerModule(level=1), FailedCasesModule(), FlakyCasesModule())
pb.start(a.get_progress)
await a.analyze_tree(tree)
await pb.done()
logger.info("Outputting results...")
a.print_results()
if __name__ == "__main__":
asyncio_run(main(parse_args()))
+3 -3
View File
@@ -1,8 +1,8 @@
#!/bin/bash
AWS=/root/.local/bin/aws
REGION=eu-west-1
#HUDSON_SLAVE_AMI_ID=ami-0812bc35c7464732e
HUDSON_SLAVE_AMI_ID=ami-04956fe5a5293da6f
#HUDSON_SLAVE_AMI_ID=ami-04956fe5a5293da6f
HUDSON_SLAVE_AMI_ID=ami-0251a199f8d4a4729
echo Launching instance...
instanceid=`$AWS ec2 run-instances --image-id $HUDSON_SLAVE_AMI_ID --count 1 --instance-type c5d.4xlarge --key-name Axel --security-groups "Sailing Analytics App" --region $REGION --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=Hudson Ubuntu Slave}]' --instance-initiated-shutdown-behavior terminate | tee /tmp/slavelaunch.out | jq .Instances[0].InstanceId | sed -e 's/"//g'`
if [ "$instanceid" = "" ]; then
@@ -17,7 +17,7 @@ else
echo Instance $instanceid seems running now
private_ip=`$AWS ec2 describe-instances --region $REGION --instance-ids $instanceid | jq .Reservations[0].Instances[0].PrivateIpAddress | sed -e 's/"//g'`
echo Probing for SSH on private IP $private_ip
while su - hudson -c "ssh -o ConnectTimeout=10,StrictHostKeyChecking=no hudson@$private_ip ls >/dev/null"; do
while su - hudson -c "ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no hudson@$private_ip ls >/dev/null"; do
echo SSH daemon not reachable yet. Trying again...
done
echo SSH daemon reached. State should be ready to connect to now.
+1 -1
View File
@@ -16,7 +16,7 @@ else
echo Instance $instanceid seems running now
private_ip=`$AWS ec2 describe-instances --region $REGION --instance-ids $instanceid | jq .Reservations[0].Instances[0].PrivateIpAddress | sed -e 's/"//g'`
echo Probing for SSH on private IP $private_ip
while su - hudson -c "ssh -o ConnectTimeout=10,StrictHostKeyChecking=no hudson@$private_ip ls >/dev/null"; do
while su - hudson -c "ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no hudson@$private_ip ls >/dev/null"; do
echo SSH daemon not reachable yet. Trying again...
done
echo SSH daemon reached. State should be ready to connect to now.
-38
View File
@@ -1,38 +0,0 @@
// Taken from https://github.com/sirceljm/AWS-SES-simple-mail-forward/blob/master/mail_forward.js
// Install as an AWS Lambda according to https://github.com/sirceljm/AWS-SES-simple-mail-forward
// and configure the to_address environment variable as a JSON array of strings representing
// the recipients' e-mail addresses. Subscribe the lambda to your SNS topic that receives the
// notification messages about your inbound e-mail. Use mail_forward_policy.json for the IAM role's
// security policy.
var AWS = require("aws-sdk");
var ses = new AWS.SES();
exports.handler = (event, context, callback) => {
let data = JSON.parse(event.Records[0].Sns.Message);
let source = data.content;
source = source.replace(/^DKIM-Signature/im, "X-Original-DKIM-Signature");
// source = source.replace(/^From/im, "X-Original-From");
// source = source.replace(/^Source/im, "X-Original-Source");
// source = source.replace(/^Sender/im, "X-Original-Sender");
// source = source.replace(/^Return-Path/im, "X-Original-Return-Path");
source = source.replace(/^Domainkey-Signature/im, "X-Original-Domainkey-Signature");
// source = `From: AWS SES Mail Forwarding <${data.mail.destination}>\n` + source;
if (!process.env.to_address) {
console.log("You need to supply to_address enviromnent variable");
} else if (data.mail.destination == process.env.to_address) {
console.log("MAIL SEND ABORTED! - Forwarded mail address and to_address are the same - THIS CAN CAUSE AN INFINITE LOOP!");
} else {
ses.sendRawEmail({
RawMessage: {
Data: source,
},
Destinations: JSON.parse(process.env.to_address),
}, function (err, data) {
if (err) {
console.error(err, err.stack);
}
});
}
};
+121
View File
@@ -0,0 +1,121 @@
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import os
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
region = os.environ['Region']
def get_message_from_s3(bucket_name, object_key):
# Create a new S3 client.
client_s3 = boto3.client("s3")
# Get the email object from the S3 bucket.
object_s3 = client_s3.get_object(Bucket=bucket_name, Key=object_key)
# Read the content of the message.
file = object_s3['Body'].read()
return file
def create_message(file):
senderMap = json.loads(os.environ["MailSenderJSON"])
recipientMap = json.loads(os.environ["MailRecipientsJSON"])
# 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
toHeader = Parser(policy=default).parsestr('To: ' + mailobject['To'])
for x in toHeader['to'].addresses:
if x.addr_spec in recipientMap:
recipientList = recipientMap.get(x.addr_spec)
sender = senderMap.get(x.addr_spec, x.addr_spec)
# Check 'Cc'-Header
if sender is None:
if mailobject['Cc']:
ccHeader = Parser(policy=default).parsestr('Cc: ' + mailobject['Cc'])
for x in ccHeader['cc'].addresses:
if x.addr_spec in recipientMap:
recipientList = recipientMap.get(x.addr_spec)
sender = senderMap.get(x.addr_spec, x.addr_spec)
# Bcc mail, there is no header so find address from 'Received'-Header
else:
receivedString = re.search(r'\<(.*?)\>', ''.join(mailobject.get_all('Received'))).group(1)
if receivedString in recipientMap:
recipientList = recipientMap.get(receivedString)
sender = senderMap.get(receivedString, receivedString)
# Change original headers to X-
mailobject['X-From'] = mailobject['From']
if not mailobject['Reply-To']:
mailobject['Reply-To'] = mailobject['From']
mailobject['X-To'] = mailobject['To']
mailobject['X-Return-Path'] = mailobject['Return-Path']
# Replace original headers and set to SES Value
del mailobject['DKIM-Signature']
mailobject.replace_header('From', sender)
mailobject.replace_header('Return-Path', sender)
mailobject.replace_header('To', ','.join(recipientList))
message = {
"Source": sender,
"Destinations": recipientList,
"Data" : mailobject.as_string()
}
return message
def send_email(message):
# Create a new SES client.
client_ses = boto3.client('ses', region)
# Send the email.
try:
#Provide the contents of the email.
response = client_ses.send_raw_email(
Source=message['Source'],
Destinations=
message['Destinations']
,
RawMessage={
'Data':message['Data']
}
)
# Display an error if something goes wrong.
except ClientError as e:
output = e.response['Error']['Message']
else:
# Modify output message
if re.search(r'\<(.*?)\>', message['Source']):
fromString = ','.join(re.findall(r'\<(.*?)\>', message['Source']))
else:
fromString = message['Source']
output = "Email for: " + fromString + " forwarded to: " + ', '.join(message['Destinations']) + "! Message ID: " + response['MessageId']
return output
def lambda_handler(event, context):
# Get the unique ID of the message. This corresponds to the name of the file in S3.
sns = event['Records'][0]['Sns']
message = json.loads(sns['Message'])
bucket_name = message['receipt']['action']['bucketName']
object_key = message['receipt']['action']['objectKey']
print(f"Received message with object key {object_key} in bucket {bucket_name}")
# Retrieve the file from the S3 bucket.
file = get_message_from_s3(bucket_name, object_key)
# Create the message.
message = create_message(file)
# Send the email and print the result.
result = send_email(message)
print(result)
+26 -21
View File
@@ -1,22 +1,27 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
},
{
"Effect": "Allow",
"Action": [
"ses:SendEmail",
"ses:SendRawEmail"
],
"Resource": "*"
}
]
}
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:CreateLogGroup",
"logs:PutLogEvents"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"ses:SendRawEmail"
],
"Resource": [
"arn:aws:s3:::emails-for-sapsailing-com/*",
"arn:aws:ses:eu-west-1:017363970217:identity/*"
]
}
]
}
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
+1 -1
View File
@@ -1,4 +1,4 @@
FROM donaldduck70/sapjvm8:8.1.059
FROM donaldduck70/sapjvm8:8.1.062
LABEL maintainer=axel.uhl@sap.com
# Download and extract the release
WORKDIR /home/sailing/servers/server
+1 -1
View File
@@ -6,7 +6,7 @@ ENV JAVA_HOME=/opt/sapjvm_8
WORKDIR /opt
RUN apt-get update \
&& apt-get install -y wget unzip \
&& curl --cookie eula_3_1_agreed=tools.hana.ondemand.com/developer-license-3_1.txt "https://tools.hana.ondemand.com/additional/sapjvm-8.1.059-linux-x64.zip" --output sapjvm8-linux-x64.zip \
&& curl --cookie eula_3_1_agreed=tools.hana.ondemand.com/developer-license-3_1.txt "https://tools.hana.ondemand.com/additional/sapjvm-8.1.062-linux-x64.zip" --output sapjvm8-linux-x64.zip \
&& unzip sapjvm8-linux-x64.zip \
&& rm sapjvm8-linux-x64.zip \
&& echo "export JAVA_HOME=/opt/sapjvm_8; export PATH=\${PATH}:/opt/sapjvm_8/bin" > /etc/profile.d/javahome.sh
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/ec2-2.13.50.jar" sourcepath="lib/ec2-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/annotations-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/apache-client-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/arns-2.13.50.jar" sourcepath="lib/arns-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/auth-2.13.50.jar" sourcepath="lib/auth-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/aws-core-2.13.50.jar" sourcepath="lib/aws-core-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/aws-query-protocol-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/aws-xml-protocol-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-codec-1.11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/eventstream-1.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/http-client-spi-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.9.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.11.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.10.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-core-2.10.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.10.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-buffer-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-codec-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-codec-http-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-codec-http2-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-common-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-handler-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-nio-client-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-reactive-streams-2.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-reactive-streams-http-2.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-resolver-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-transport-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar"/>
<classpathentry exported="true" kind="lib" path="lib/netty-transport-native-unix-common-4.1.46.Final.jar"/>
<classpathentry exported="true" kind="lib" path="lib/profiles-2.13.50.jar" sourcepath="lib/profiles-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/protocol-core-2.13.50.jar"/>
<classpathentry exported="true" kind="lib" path="lib/reactive-streams-1.0.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/regions-2.13.50.jar" sourcepath="lib/regions-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/s3-2.13.50.jar" sourcepath="lib/s3-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/sdk-core-2.13.50.jar" sourcepath="lib/sdk-core-2.13.50-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.28.jar"/>
<classpathentry exported="true" kind="lib" path="lib/utils-2.13.50.jar" sourcepath="lib/utils-2.13.50-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.sap.sailing.gwt.ui.test</name>
<name>com.amazon.aws.aws-java-api</name>
<comment></comment>
<projects>
</projects>
@@ -20,20 +20,9 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>
@@ -1,4 +1,3 @@
#Wed Nov 02 13:57:42 CET 2011
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false
@@ -0,0 +1,169 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: aws-java-api
Bundle-SymbolicName: com.amazon.aws.aws-java-api
Bundle-Version: 2.13.50
Bundle-Vendor: Amazon
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .,
lib/annotations-2.13.50.jar,
lib/apache-client-2.13.50.jar,
lib/arns-2.13.50.jar,
lib/auth-2.13.50.jar,
lib/aws-core-2.13.50.jar,
lib/aws-query-protocol-2.13.50.jar,
lib/aws-xml-protocol-2.13.50.jar,
lib/commons-codec-1.11.jar,
lib/commons-logging-1.2.jar,
lib/eventstream-1.0.1.jar,
lib/http-client-spi-2.13.50.jar,
lib/httpclient-4.5.9.jar,
lib/httpcore-4.4.11.jar,
lib/jackson-annotations-2.10.4.jar,
lib/jackson-core-2.10.4.jar,
lib/jackson-databind-2.10.4.jar,
lib/netty-buffer-4.1.46.Final.jar,
lib/netty-codec-4.1.46.Final.jar,
lib/netty-codec-http-4.1.46.Final.jar,
lib/netty-codec-http2-4.1.46.Final.jar,
lib/netty-common-4.1.46.Final.jar,
lib/netty-handler-4.1.46.Final.jar,
lib/netty-nio-client-2.13.50.jar,
lib/netty-reactive-streams-2.0.4.jar,
lib/netty-reactive-streams-http-2.0.4.jar,
lib/netty-resolver-4.1.46.Final.jar,
lib/netty-transport-4.1.46.Final.jar,
lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar,
lib/netty-transport-native-unix-common-4.1.46.Final.jar,
lib/profiles-2.13.50.jar,
lib/protocol-core-2.13.50.jar,
lib/reactive-streams-1.0.3.jar,
lib/regions-2.13.50.jar,
lib/s3-2.13.50.jar,
lib/sdk-core-2.13.50.jar,
lib/slf4j-api-1.7.28.jar,
lib/utils-2.13.50.jar,
lib/ec2-2.13.50.jar
Automatic-Module-Name: com.amazon.aws.aws-java-api
Export-Package: software.amazon.awssdk.annotations,
software.amazon.awssdk.arns,
software.amazon.awssdk.auth.credentials,
software.amazon.awssdk.auth.credentials.internal,
software.amazon.awssdk.auth.signer,
software.amazon.awssdk.auth.signer.internal,
software.amazon.awssdk.auth.signer.params,
software.amazon.awssdk.awscore,
software.amazon.awssdk.awscore.client.builder,
software.amazon.awssdk.awscore.client.config,
software.amazon.awssdk.awscore.client.handler,
software.amazon.awssdk.awscore.endpoint,
software.amazon.awssdk.awscore.eventstream,
software.amazon.awssdk.awscore.exception,
software.amazon.awssdk.awscore.interceptor,
software.amazon.awssdk.awscore.internal,
software.amazon.awssdk.awscore.internal.client.config,
software.amazon.awssdk.awscore.presigner,
software.amazon.awssdk.awscore.retry,
software.amazon.awssdk.awscore.retry.conditions,
software.amazon.awssdk.awscore.util,
software.amazon.awssdk.core,
software.amazon.awssdk.core.adapter,
software.amazon.awssdk.core.async,
software.amazon.awssdk.core.checksums,
software.amazon.awssdk.core.client.builder,
software.amazon.awssdk.core.client.config,
software.amazon.awssdk.core.client.handler,
software.amazon.awssdk.core.endpointdiscovery,
software.amazon.awssdk.core.endpointdiscovery.providers,
software.amazon.awssdk.core.exception,
software.amazon.awssdk.core.http,
software.amazon.awssdk.core.interceptor,
software.amazon.awssdk.core.internal,
software.amazon.awssdk.core.internal.async,
software.amazon.awssdk.core.internal.capacity,
software.amazon.awssdk.core.internal.handler,
software.amazon.awssdk.core.internal.http,
software.amazon.awssdk.core.internal.http.async,
software.amazon.awssdk.core.internal.http.loader,
software.amazon.awssdk.core.internal.http.pipeline,
software.amazon.awssdk.core.internal.http.pipeline.stages,
software.amazon.awssdk.core.internal.http.pipeline.stages.utils,
software.amazon.awssdk.core.internal.http.timers,
software.amazon.awssdk.core.internal.interceptor,
software.amazon.awssdk.core.internal.io,
software.amazon.awssdk.core.internal.pagination.async,
software.amazon.awssdk.core.internal.retry,
software.amazon.awssdk.core.internal.sync,
software.amazon.awssdk.core.internal.transform,
software.amazon.awssdk.core.internal.util,
software.amazon.awssdk.core.io,
software.amazon.awssdk.core.pagination.async,
software.amazon.awssdk.core.pagination.sync,
software.amazon.awssdk.core.protocol,
software.amazon.awssdk.core.retry,
software.amazon.awssdk.core.retry.backoff,
software.amazon.awssdk.core.retry.conditions,
software.amazon.awssdk.core.runtime,
software.amazon.awssdk.core.runtime.transform,
software.amazon.awssdk.core.signer,
software.amazon.awssdk.core.sync,
software.amazon.awssdk.core.traits,
software.amazon.awssdk.core.util,
software.amazon.awssdk.core.util.json,
software.amazon.awssdk.http,
software.amazon.awssdk.http.apache,
software.amazon.awssdk.http.apache.internal,
software.amazon.awssdk.http.apache.internal.conn,
software.amazon.awssdk.http.apache.internal.impl,
software.amazon.awssdk.http.apache.internal.net,
software.amazon.awssdk.http.apache.internal.utils,
software.amazon.awssdk.http.async,
software.amazon.awssdk.http.nio.netty,
software.amazon.awssdk.http.nio.netty.internal,
software.amazon.awssdk.http.nio.netty.internal.http2,
software.amazon.awssdk.http.nio.netty.internal.nrs,
software.amazon.awssdk.http.nio.netty.internal.utils,
software.amazon.awssdk.internal.http,
software.amazon.awssdk.profiles,
software.amazon.awssdk.profiles.internal,
software.amazon.awssdk.protocols.core,
software.amazon.awssdk.protocols.query,
software.amazon.awssdk.protocols.query.interceptor,
software.amazon.awssdk.protocols.query.internal.marshall,
software.amazon.awssdk.protocols.query.internal.unmarshall,
software.amazon.awssdk.protocols.query.unmarshall,
software.amazon.awssdk.protocols.xml,
software.amazon.awssdk.protocols.xml.internal.marshall,
software.amazon.awssdk.protocols.xml.internal.unmarshall,
software.amazon.awssdk.regions,
software.amazon.awssdk.regions.internal,
software.amazon.awssdk.regions.internal.util,
software.amazon.awssdk.regions.partitionmetadata,
software.amazon.awssdk.regions.providers,
software.amazon.awssdk.regions.regionmetadata,
software.amazon.awssdk.regions.servicemetadata,
software.amazon.awssdk.regions.util,
software.amazon.awssdk.services.ec2,
software.amazon.awssdk.services.ec2.model,
software.amazon.awssdk.services.ec2.paginators,
software.amazon.awssdk.services.ec2.transform,
software.amazon.awssdk.services.ec2.transform.internal,
software.amazon.awssdk.services.s3,
software.amazon.awssdk.services.s3.checksums,
software.amazon.awssdk.services.s3.internal,
software.amazon.awssdk.services.s3.internal.handlers,
software.amazon.awssdk.services.s3.internal.presigner,
software.amazon.awssdk.services.s3.internal.resource,
software.amazon.awssdk.services.s3.internal.usearnregion,
software.amazon.awssdk.services.s3.model,
software.amazon.awssdk.services.s3.paginators,
software.amazon.awssdk.services.s3.presigner,
software.amazon.awssdk.services.s3.presigner.model,
software.amazon.awssdk.services.s3.transform,
software.amazon.awssdk.utils,
software.amazon.awssdk.utils.async,
software.amazon.awssdk.utils.builder,
software.amazon.awssdk.utils.cache,
software.amazon.awssdk.utils.http,
software.amazon.awssdk.utils.internal,
software.amazon.eventstream
+28
View File
@@ -0,0 +1,28 @@
This is an OSGi wrapper project around the parts of the AWS Java SDK libraries required by
this project. There is a Gradle configuration (build.gradle, settings.gradle). Change to this
project's directory (${workspace}/java/com.amazon.aws.aws-java-api) and run
rm ./lib/*
../../gradlew downloadLibs
This will download all JARs required for the components listed in build.gradle in the
dependencies section, such as
implementation 'software.amazon.awssdk:s3'
Add more components by adding more lines, such as
implementation 'software.amazon.awssdk:ec2'
and repeat the process as needed. Make sure to update build.properties to
reference the additional JAR files (which can alternatively be accomplished through the MANIFEST.MF
editor's "Runtime" tab).
To download source JARs which can then be attached, add lines such as the following to the dependencies section:
implementation group: 'software.amazon.awssdk', name: 's3', classifier: 'sources'
This will fetch the source JAR corresponding to the s3 code JAR. To attach it, go to the project's
build path settings, expand the code JAR's tree node in the "Libraries" tab, select the "Source Attachment"
sub-node, click the "Edit" button and select the source JAR that got downloaded. Don't forget to add the
source JAR to the git repository.
@@ -0,0 +1,24 @@
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
implementation platform('software.amazon.awssdk:bom:2.13.50')
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:ec2'
implementation group: 'software.amazon.awssdk', name: 'sdk-core', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'arns', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'aws-core', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'auth', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 's3', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'ec2', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'regions', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'profiles', classifier: 'sources'
implementation group: 'software.amazon.awssdk', name: 'utils', classifier: 'sources'
}
task downloadLibs(type: Copy) {
into file('lib')
from configurations.runtimeClasspath
}
@@ -0,0 +1,41 @@
bin.includes = META-INF/,\
.,\
lib/annotations-2.13.50.jar,\
lib/utils-2.13.50.jar,\
lib/sdk-core-2.13.50.jar,\
lib/s3-2.13.50.jar,\
lib/regions-2.13.50.jar,\
lib/apache-client-2.13.50.jar,\
lib/arns-2.13.50.jar,\
lib/auth-2.13.50.jar,\
lib/aws-core-2.13.50.jar,\
lib/aws-query-protocol-2.13.50.jar,\
lib/aws-xml-protocol-2.13.50.jar,\
lib/http-client-spi-2.13.50.jar,\
lib/netty-nio-client-2.13.50.jar,\
lib/profiles-2.13.50.jar,\
lib/protocol-core-2.13.50.jar,\
lib/commons-codec-1.11.jar,\
lib/commons-logging-1.2.jar,\
lib/eventstream-1.0.1.jar,\
lib/httpclient-4.5.9.jar,\
lib/httpcore-4.4.11.jar,\
lib/jackson-annotations-2.10.4.jar,\
lib/jackson-core-2.10.4.jar,\
lib/jackson-databind-2.10.4.jar,\
lib/netty-buffer-4.1.46.Final.jar,\
lib/netty-codec-4.1.46.Final.jar,\
lib/netty-codec-http-4.1.46.Final.jar,\
lib/netty-codec-http2-4.1.46.Final.jar,\
lib/netty-common-4.1.46.Final.jar,\
lib/netty-handler-4.1.46.Final.jar,\
lib/netty-reactive-streams-2.0.4.jar,\
lib/netty-reactive-streams-http-2.0.4.jar,\
lib/netty-resolver-4.1.46.Final.jar,\
lib/netty-transport-4.1.46.Final.jar,\
lib/netty-transport-native-epoll-4.1.46.Final-linux-x86_64.jar,\
lib/netty-transport-native-unix-common-4.1.46.Final.jar,\
lib/reactive-streams-1.0.3.jar,\
lib/slf4j-api-1.7.28.jar,\
lib/ec2-2.13.50.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More