Merge branch 'master' into permission-vertical

This commit is contained in:
Steffen Schaefer committed 2019-02-06 08:41:58 +01:00
commit 95cd2bcae9
4 files changed
+55 -9

No files matched your search

+3 -1
View File
@@ -23,8 +23,10 @@ rm -rf dump/$DB
ORIGINAL_HASH=$(./mongohash -p 10203 -d $DB)
ARCHIVE_HASH=$(./mongohash -p 10202 -d $DB)
if [ $ORIGINAL_HASH = $ARCHIVE_HASH ]; then
echo Hashes of old and new are equal: $ORIGINAL_HASH and $ARCHIVE_HASH. Dropping $DB in live DB
echo Hashes of old and new are equal: $ORIGINAL_HASH and $ARCHIVE_HASH. Dropping $DB and ${DB}-replica in live DB
echo "use $DB
db.dropDatabase()
use ${DB}-replica
db.dropDatabase()" | mongo "mongodb://localhost:10203/$DB?replicaSet=live"
echo "Don't forget to switch your server's env.sh so it has MONGODB_URI=\"mongodb://dbserver.internal.sapsailing.com:10202/$DB\""
exit 0
+1
View File
@@ -116,6 +116,7 @@ SAP is at the center of today’s technology revolution, developing innovations
* [[Import official results|wiki/howto/eventmanagers/results-import]]
* [[Pairing lists|wiki/howto/eventmanagers/pairing-lists]]
* [[Manage media content|wiki/howto/eventmanagers/Manage-media-content]]
* [[Import Event into Archive|wiki/howto/eventmanagers/import-into-archive]]
### Setup
+16 -8
View File
@@ -14,13 +14,13 @@ Now follow these steps:
<img src="/wiki/images/pairinglist/screenshot_1.jpg"/>
Right now the setup dialog appears:
Now the setup dialog appears:
<img src="/wiki/images/pairinglist/screenshot_2.jpg"/>
Now you can specify the number of competitors and flight repeats. In addition you can select one or more series that should be used. When selecting multiple series they must have the same number of races per flight.
**(Note! When changing the standard count of competitors you cannot apply your generated pairing list to race logs or print it. For adding/removing competitors please use the register function!)**
For more information about flight repeats please read below.
You can specify the number of competitors and flight repeats. In addition you can select one or more series that should be used. When selecting multiple series they must have the same number of races per flight.
**(Note! When changing the standard count of competitors you cannot apply your generated pairing list to race logs or print it. For adding/removing competitors please use the competitor registration function in the smartphone tracking section!)**
For more information about flight repeats and boat change factor please read below.
When you hit the **'ok'** button a small progress dialog appears and after a few seconds a new window will be opened:
<img src="/wiki/images/pairinglist/screenshot_3.jpg"/>
@@ -29,16 +29,24 @@ In this window there are some attributes of the pairing list in the left box:
* Number of flights: This number corresponds to the count of all flights in your selected series
* Number of races per flight: It describes the number of races in one single flight
* Number of competitors: This is equal to the count of all registered competitors on this regatta
* Quality: This value describes the quality of one pairing list template (for more information about quality please read below)
On the right side a box with the title **'Pairinglist Template'** is displayed. If there are registered competitors every different value in this box will be replaced with one competitor. The matrix describes the assignments of each competitor to a boat where each row represents a single fleet and each column a single boat.
* Quality: This value describes the quality of one pairing list template
* Boat Assignments Quality: This value describes the quality of boat assignments (for more information about quality and boat assignments quality please read below)
* Boat Changes: This number corresponds to the amount of boat changes in this regatta
On the right side a box with the title **'Pairinglist Template'** is displayed. If there are registered competitors every different value in this box will be replaced with one competitor. The 2x2 matrix describes the assignments of each competitor to a boat where each row represents a single fleet and each column a single boat.
When you hit **'Insert into regatta'** the competitor to boat assignments will be registered into race logs. In the print preview the assignment of all competitors to boats are displayed. For more information about the print function and the csv export please read below.
###Flight repeats
In some cases it is necessary to reduce the transfer traffic while an event (e.g. if only electrical motorboats can be used). In this case you can set flight repeats. It will duplicate flights as often as given (eg.: flight repeats equals 2 means that a flight occurs 2 times). Furthermore it will set the 'fleet can run in parallel'-flag, so you can run the first fleets of the repeated flights in a straight row without any changes. If you use the flight repeats a smaller template is calculated and duplicated, because of this the quality can be worse than normal.
In some cases it is necessary to reduce the transfer traffic while an event (e.g. if only electrical motorboats can be used). In this case you can set flight repeats. It will duplicate flights as often as given (eg.: flight repeats equals 2 means that the assignment of a flight occurs 2 times). Furthermore it will set the 'fleet can run in parallel'-flag, so you can run the first fleets of the repeated flights in a straight row without any changes. If you use the flight repeats a smaller template is calculated and duplicated, because of this the quality can be worse than normal.
**(Note! If there is more than one series selected the flight repeats cannot be set!)**
###Boat change factor
With the boat change factor you can also reduce the transfer traffic while an event. A boat change factor equals 0 leads to a well distributed assignment of competitors to boats whereas the maximum (number of competitors divided by number of groups, so for example six for the case of 18 competitors and three groups) leads to fewer boat changes because of competitors sailing on the same boat for two fleets behind each other in different flights. **(Note! Fewer boat changes lead to a boat assignments quality that is worse than usual!)**
###Quality
The quality of a pairing list is measured by the standard deviation of its template. The main aim of a pairing list is that every competitor competes against every other competitor equal times. So if all counts of matches against the other competitors are equal it would be a "perfect" pairing list with a quality value of 0. The standard deviation which is used as quality describes the average deviation from this "perfect" state, so a very low number is better than a high number. The average quality of a pairing list varies for different numbers of flights and fleets and competitors. If you think the quality is too bad, try to hit the refresh button and a new template with a different quality will be generated.
The quality of a pairing list is measured by the standard deviation of its template. The main aim of a pairing list is that every competitor competes against every other competitor equal times. So if all counts of matches against the other competitors are equal it would be a "perfect" pairing list with a quality value of 0. The standard deviation which is used as quality describes the average deviation from this "perfect" state, so a very low number is better than a high number. The average quality of a pairing list varies for different numbers of flights and fleets and competitors. If you think the quality is too bad, hit the refresh button and a new template with a different quality will be generated.
###Boat assignments quality
The quality of boat assignments inside a pairing list is calculated by the standard deviation of a 2x2 matrix consisting of the number of assignments of each competitor to each boat. Similar to the quality above, a very low number is better than a high number and it can vary depending on the amount of competitors and boats.
##Additional functions
@@ -0,0 +1,35 @@
# Import an Event into the Archive Server
- Go to https://www.sapsailing.com/gwt/AdminConsole.html and log on
- Go to Advanced / Master Data Import
- Select your source server and fetch and select the leaderboard groups
- Start the import
- Load the races on www.sapsailing.com
- Compare servers:
```
java/target/compareServers -el https://wcs2019-miami-master.sapsailing.com https://www.sapsailing.com
```
This will at first complain about the archive having more leaderboard groups than your event server. Copy the ``leaderboradgroups.old.sed`` file to ``leaderboardgroups.new.sed`` and call again with
```
java/target/compareServers -cel https://wcs2019-miami-master.sapsailing.com https://www.sapsailing.com
```
Note the additional "c" option, meaning "continue." When no errors are being reported, continue as follows:
- Remove the remote server reference (Advanced / Remote Server Instances) linking from the archive server to your event server
- Add a rule to the central web server's ``/etc/httpd/conf.d/001-events.conf`` file for the event, such as
```
## World Cup 2019 Miami
Use Event-ARCHIVE-SSL-Redirect wcs2019-miami.sapsailing.com "f393a743-dd49-450f-ab8b-d11522b266f2"
```
- Tell the central archive server to reload its configuration: ``service httpd reload``. Ensure you're seeing a positive confirmation, such as ``Reloading httpd: [ OK ]``. You may also test the configuration change if you're not sure by invoking ``apachectl configtest`` from the command line which should respond with ``Syntax OK``.
- Remove the ALB rules (-master and public) from [here](https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#ELBRules:type=app;loadBalancerName=Sailing-eu-west-1;loadBalancerId=32b89dbfe7f75097;listenerId=f9212223209ac042) and then the two [target groups](https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#TargetGroups:sort=targetGroupName).
- Terminate the event instance(s). This will automatically store the Apache web server logs to ``/var/log/old``.
- Log on to the MongoDB server hosting the archive DB: ``ssh -A root@54.76.64.42``
- Go to the MongoDB directory where scripts for migrating a live DB to the archive exist: ``cd /var/lib/mongodb``
- For your event with a database named ``my-wonderful-event`` run the command ``./archiveDb.sh my-wonderful-event``. This will copy the DB contents of database ``my-wonderful-event`` from the live DB replica set to the archive DB, compute the hashes of both, compare them and if equal remove the original DB on the live replica set as well as the ``my-wonderful-event-replica`` database that usually exists next to it.
- Should you have created additional databases on the live replica set in the context of the event that you don't need anymore or would like to migrate to the archive server, proceed as described above (migration) or as follows (deletion): Use a ``mongo`` shell client and connect to any of the replica set's members, e.g., using ``mongo "mongodb://localhost:10203/?replicaSet=live"``. Then use the following command sequence to get rid of a database, such as ``my-wonderful-event-tablettraining``:
```
live:PRIMARY> use my-wonderful-event-tablettraining
switched to db my-wonderful-event-tablettraining
live:PRIMARY> db.dropDatabase()
```