1f221a52b808e61891da8e1acbe97076f69c22e6
configuration/on-site-scripts/launch-replicas-in-all-regions.sh
| ... | ... | @@ -66,6 +66,7 @@ for REGION in $( cat `dirname $0`/regions.txt ); do |
| 66 | 66 | OPTIONS="${OPTIONS} -t ${INSTANCE_TYPE}" |
| 67 | 67 | fi |
| 68 | 68 | echo "Invoking launch-replicas-in-region.sh with options ${OPTIONS}" |
| 69 | - `dirname $0`/launch-replicas-in-region.sh ${OPTIONS} |
|
| 69 | + `dirname $0`/launch-replicas-in-region.sh ${OPTIONS} & |
|
| 70 | + echo "Waiting a minute now after having asked for replica launch in region ${REGION} to avoid overloading master with initial load requests" |
|
| 71 | + sleep 60 |
|
| 70 | 72 | done |
| 71 | - |
configuration/on-site-scripts/launch-replicas-in-region.sh
| ... | ... | @@ -67,7 +67,7 @@ i=0 |
| 67 | 67 | while [ ${i} -lt ${COUNT} ]; do |
| 68 | 68 | SUBNET_INDEX=$(( $RANDOM * $NUMBER_OF_SUBNETS / 32768 )) |
| 69 | 69 | SUBNET_ID=$( echo "${SUBNETS}" | jq -r '.Subnets['${SUBNET_INDEX}'].SubnetId' ) |
| 70 | - echo "Launching image with ID ${IMAGE_ID} into subnet #${SUBNET_INDEX} with ID ${SUBNET_ID} in VPC ${VPC_ID}" |
|
| 70 | + echo "Launching image with ID ${IMAGE_ID} into subnet #${SUBNET_INDEX} in region ${REGION} with ID ${SUBNET_ID} in VPC ${VPC_ID}" |
|
| 71 | 71 | PRIVATE_IP_AND_INSTANCE_ID=$( aws --region ${REGION} ec2 run-instances --subnet-id ${SUBNET_ID} --instance-type ${INSTANCE_TYPE} --security-group-ids ${SECURITY_GROUP_ID} --image-id ${IMAGE_ID} --user-data "INSTALL_FROM_RELEASE=${RELEASE} |
| 72 | 72 | SERVER_NAME=tokyo2020 |
| 73 | 73 | MONGODB_URI=\"mongodb://${REPLICA_SET_PRIMARY}/tokyo2020-replica?replicaSet=${REPLICA_SET_NAME}&retryWrites=true&readPreference=nearest\" |
| ... | ... | @@ -82,7 +82,7 @@ REPLICATE_MASTER_BEARER_TOKEN=${BEARER_TOKEN} |
| 82 | 82 | ADDITIONAL_JAVA_ARGS=\"${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true\"" --ebs-optimized --key-name $KEY_NAME --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=SL Tokyo2020 (Upgrade Replica)},{Key=sailing-analytics-server,Value=tokyo2020}]" "ResourceType=volume,Tags=[{Key=Name,Value=SL Tokyo2020 (Upgrade Replica)}]" | jq -r '.Instances[].PrivateIpAddress + " " + .Instances[].InstanceId' ) |
| 83 | 83 | EXIT_CODE=$? |
| 84 | 84 | if [ "${EXIT_CODE}" != "0" ]; then |
| 85 | - echo "Error launching instance. Exiting with status ${EXIT_CODE}" |
|
| 85 | + echo "Error launching instance in region ${REGION}. Exiting with status ${EXIT_CODE}" |
|
| 86 | 86 | exit ${EXIT_CODE} |
| 87 | 87 | fi |
| 88 | 88 | PRIVATE_IP=$( echo ${PRIVATE_IP_AND_INSTANCE_ID} | awk '{print $1;}' ) |
| ... | ... | @@ -94,9 +94,9 @@ ADDITIONAL_JAVA_ARGS=\"${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true\"" |
| 94 | 94 | INSTANCE_IDS="${INSTANCE_IDS},Id=${INSTANCE_ID}" |
| 95 | 95 | fi |
| 96 | 96 | # Now wait for those instances launched to become available |
| 97 | - echo "Waiting for instance with private IP ${PRIVATE_IP} to become healthy..." |
|
| 97 | + echo "Waiting for instance with private IP ${PRIVATE_IP} in region ${REGION} to become healthy..." |
|
| 98 | 98 | while ! ssh -A -o StrictHostKeyChecking=no ec2-user@tokyo-ssh.sapsailing.com "ssh -o StrictHostKeyChecking=no root@${PRIVATE_IP} \"cd /home/sailing/servers/tokyo2020; ./status >/dev/null\""; do |
| 99 | - echo "${PRIVATE_IP} still not healthy. Trying again in 10s..." |
|
| 99 | + echo "${PRIVATE_IP} in region ${REGION} still not healthy. Trying again in 10s..." |
|
| 100 | 100 | sleep 10 |
| 101 | 101 | done |
| 102 | 102 | i=$(( i + 1 )) |
| ... | ... | @@ -110,14 +110,14 @@ for OLD_VERSION_TARGET_ID in ${OLD_VERSION_TARGET_IDS}; do |
| 110 | 110 | TARGET_IDS_TO_DEREGISTER="${TARGET_IDS_TO_DEREGISTER},Id=${OLD_VERSION_TARGET_ID}" |
| 111 | 111 | fi |
| 112 | 112 | done |
| 113 | -echo "Registering instances ${INSTANCE_IDS} with target group ${TARGET_GROUP_NAME}" |
|
| 113 | +echo "Registering instances ${INSTANCE_IDS} with target group ${TARGET_GROUP_NAME} in region ${REGION}" |
|
| 114 | 114 | aws elbv2 register-targets --target-group-arn ${TARGET_GROUP_ARN} --targets ${INSTANCE_IDS} |
| 115 | 115 | EXIT_CODE=$? |
| 116 | 116 | if [ "${EXIT_CODE}" = "0" ]; then |
| 117 | - echo "Registering instances was successful." |
|
| 118 | - echo "De-registering old instances ${TARGET_IDS_TO_DEREGISTER} from target group ${TARGET_GROUP_NAME}" |
|
| 117 | + echo "Registering instances in region ${REGION} was successful." |
|
| 118 | + echo "De-registering old instances ${TARGET_IDS_TO_DEREGISTER} from target group ${TARGET_GROUP_NAME} in region ${REGION}" |
|
| 119 | 119 | aws elbv2 deregister-targets --target-group-arn ${TARGET_GROUP_ARN} --targets ${TARGET_IDS_TO_DEREGISTER} |
| 120 | 120 | else |
| 121 | - echo "Registering instances failed with exit code $?; not de-registering old instances." |
|
| 121 | + echo "Registering instances in region ${REGION} failed with exit code $?; not de-registering old instances." |
|
| 122 | 122 | exit ${EXIT_CODE} |
| 123 | 123 | fi |
java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/LeaderboardsResource.java
| ... | ... | @@ -1069,7 +1069,7 @@ public class LeaderboardsResource extends AbstractLeaderboardsResource { |
| 1069 | 1069 | throws MalformedURLException, IOException, InterruptedException { |
| 1070 | 1070 | Leaderboard leaderBoard = getService().getLeaderboardByName(leaderboardName); |
| 1071 | 1071 | Response result = null; |
| 1072 | - if(leaderBoard == null) { |
|
| 1072 | + if (leaderBoard == null) { |
|
| 1073 | 1073 | result = Response.status(Status.NOT_FOUND) |
| 1074 | 1074 | .entity("Could not find a leaderboard with name '" + StringEscapeUtils.escapeHtml(leaderboardName) + "'.") |
| 1075 | 1075 | .type(MediaType.TEXT_PLAIN).build(); |
java/com.sap.sailing.server.gateway/src/com/sap/sailing/server/gateway/jaxrs/api/LeaderboardsResourceV2.java
| ... | ... | @@ -32,7 +32,6 @@ import com.sap.sailing.domain.common.ManeuverType; |
| 32 | 32 | import com.sap.sailing.domain.common.MaxPointsReason; |
| 33 | 33 | import com.sap.sailing.domain.common.NoWindException; |
| 34 | 34 | import com.sap.sailing.domain.common.Position; |
| 35 | -import com.sap.sailing.domain.common.SpeedWithBearing; |
|
| 36 | 35 | import com.sap.sailing.domain.common.dto.BoatDTO; |
| 37 | 36 | import com.sap.sailing.domain.common.dto.CompetitorDTO; |
| 38 | 37 | import com.sap.sailing.domain.common.dto.FleetDTO; |
| ... | ... | @@ -377,20 +376,14 @@ public class LeaderboardsResourceV2 extends AbstractLeaderboardsResource { |
| 377 | 376 | break; |
| 378 | 377 | case RACE_CURRENT_SPEED_OVER_GROUND_IN_KNOTS: |
| 379 | 378 | name = "currentSpeedOverGround-kts"; |
| 380 | - if (currentLegEntry != null && currentLegEntry.currentSpeedOverGroundInKnots != null) { |
|
| 381 | - value = roundDouble(currentLegEntry.currentSpeedOverGroundInKnots, 2); |
|
| 379 | + if (entry.currentSpeedAndCourseOverGround != null) { |
|
| 380 | + value = roundDouble(entry.currentSpeedAndCourseOverGround.getKnots(), 2); |
|
| 382 | 381 | } |
| 383 | 382 | break; |
| 384 | 383 | case RACE_CURRENT_COURSE_OVER_GROUND_IN_TRUE_DEGREES: |
| 385 | 384 | name = "currentCourseOverGround-deg"; |
| 386 | - if (trackedRace != null) { |
|
| 387 | - final GPSFixTrack<Competitor, GPSFixMoving> track = trackedRace.getTrack(competitor); |
|
| 388 | - if (track != null) { |
|
| 389 | - final SpeedWithBearing speed = track.getEstimatedSpeed(timePoint); |
|
| 390 | - if (speed != null) { |
|
| 391 | - value = roundDouble(speed.getBearing().getDegrees(), 2); |
|
| 392 | - } |
|
| 393 | - } |
|
| 385 | + if (entry.currentSpeedAndCourseOverGround != null) { |
|
| 386 | + value = roundDouble(entry.currentSpeedAndCourseOverGround.getBearing().getDegrees(), 2); |
|
| 394 | 387 | } |
| 395 | 388 | break; |
| 396 | 389 | case RACE_CURRENT_POSITION_LAT_DEG: |
java/com.sap.sailing.www/release_notes_admin.html
| ... | ... | @@ -50,6 +50,8 @@ |
| 50 | 50 | are processed as they should.</li> |
| 51 | 51 | <li>After Igtimi changed their WebSocket implementation, we had to lower the heartbeat sending interval |
| 52 | 52 | from 120s to 15s which now avoids connection interrupts.</li> |
| 53 | + <li>The <tt>/sailingserver/api/v2/leaderboards/{leaderboard-name}</tt> API now also delivers the |
|
| 54 | + <tt>currentSpeedOverGround-kts</tt> field if the competitor is not yet in the race.</li> |
|
| 53 | 55 | </ul> |
| 54 | 56 | <h2 class="articleSubheadline">June 2021</h2> |
| 55 | 57 | <ul class="bulletList"> |
wiki/info/landscape/olympic-setup.md
| ... | ... | @@ -72,7 +72,7 @@ There are also still two personal accounts ``uhl`` and ``tim`` and an Eclipse de |
| 72 | 72 | |
| 73 | 73 | ### Hostnames |
| 74 | 74 | |
| 75 | -We assume not to have DNS available on site. Therefore, for now, we have decided for host names ``sap-p1-1`` and ``sap-p1-2`` for which we have created entries in both laptops' ``/etc/hosts`` file. Currently, when testing in the SAP facilities with the SAP Guest WiFi, possibly changing IP addresses have to be updated there. |
|
| 75 | +DNS is available on site on the gateway host ``10.1.0.6``. This is essential for resolving ``www.igtimi.com``, the AWS SES SMTP server at ``email-smtp.eu-west-1.amazonaws.com`` and all e-mail address's domains for sendmail's domain verification. The DNS server is set for both, ``sap-p1-1`` and ``sap-p1-2``. It can be set from the command line using ``nmcli connection modify Wired\ connection\ 2 ipv4.dns "10.1.0.6"; nmcli connection down Wired\ connection\ 2; nmcli connection up Wired\ connection\ 2``. Currently, when testing in the SAP facilities with the SAP Guest WiFi, possibly changing IP addresses have to be updated in ``/etc/hosts``. |
|
| 76 | 76 | |
| 77 | 77 | The domain name has been set to ``sapsailing.com`` so that the fully-qualified host names are ``sap-p1-1.sapsailing.com`` and ``sap-p1-2.sapsailing.com`` respectively. Using this domain name is helpful later when it comes to the shared security realm established with the central ``security-service.sapsailing.com`` replica set. |
| 78 | 78 |