03d20507cbe4487c9b1bf39372ff1bffedf6ff30
Home.md
| ... | ... | @@ -14,25 +14,47 @@ SAP is at the center of today’s technology revolution, developing innovations |
| 14 | 14 | |
| 15 | 15 | ### General |
| 16 | 16 | |
| 17 | +* [[Onboarding|wiki/howto/onboarding]] |
|
| 17 | 18 | * [[Information about this Wiki and HowTo|wiki/info/general/wiki]] |
| 18 | 19 | * [[General Project Information|wiki/info/general/general-information]] |
| 19 | 20 | * [[Project History|wiki/info/general/project-history]] |
| 21 | +* [[Development Environment|wiki/info/landscape/development-environment]] |
|
| 20 | 22 | |
| 21 | -### Landscape |
|
| 23 | +### Development |
|
| 22 | 24 | |
| 23 | -* Architecture and Infrastructure |
|
| 25 | +* [[Development Environment|wiki/info/landscape/development-environment]] |
|
| 26 | +* [[Typical Development Scenarios|wiki/info/landscape/typical-development-scenarios]] |
|
| 27 | +* [[Building and Deploying|wiki/info/landscape/building-and-deploying]] |
|
| 28 | +* [[Continuous Integration with Hudson/Jenkins|wiki/howto/development/ci]] |
|
| 29 | +* [[Dispatch|wiki/howto/development/dispatch]] |
|
| 30 | +* [[Working with GWT UI Binder|wiki/howto/development/gwt-ui-binder]] |
|
| 31 | +* [[Java De(Serialization) and Circular Dependencies|wiki/howto/development/java-de-serialization-and-circular-dependencies]] |
|
| 32 | +* [[Create boat graphics for the 2D race viewer|wiki/howto/development/boatgraphicssvg]] |
|
| 33 | +* [[JMX Support|wiki/howto/development/jmx]] |
|
| 34 | +* [[Working with GWT Locally|wiki/howto/development/local-gwt]] |
|
| 35 | +* [[UI Tests with Selenium|wiki/howto/development/selenium-ui-tests]] |
|
| 36 | +* [[Profiling|wiki/howto/development/profiling]] |
|
| 37 | +* [[Working with GWT Super Dev Mode|wiki/howto/development/super-dev-mode]] |
|
| 38 | +* [[Training of internal Wind Estimation models|wiki/howto/windestimation]] |
|
| 39 | +* [[Whitelabelling|wiki/howto/whitelabelling]] |
|
| 40 | +* [[Secured Settings|wiki/howto/development/secured-settings]] |
|
| 41 | +* [[Webdesign|wiki/info/landscape/webdesign]] |
|
| 42 | + |
|
| 43 | +### Architecture and Infrastructure |
|
| 24 | 44 | * [[Workspace, Bundles, Projects|wiki/info/general/workspace-bundles-projects-structure]] |
| 25 | 45 | * [[Runtime Environment|wiki/info/landscape/runtime-environment]] |
| 26 | 46 | * [[Basic architectual principles|wiki/info/landscape/basic-architectural-principles]] |
| 27 | 47 | * [[User Management|wiki/info/landscape/usermanagement]] |
| 28 | 48 | * [[Igtimi Windbot Riot Connector|wiki/info/landscape/igtimi-riot]] |
| 29 | - * [[Development Environment|wiki/info/landscape/development-environment]] |
|
| 30 | 49 | * [[Production Environment|wiki/info/landscape/production-environment]] |
| 31 | 50 | * [[Internationalization (i18n)|wiki/howto/development/i18n]] |
| 32 | 51 | * [[AI Agent|wiki/info/landscape/ai-agent]] |
| 33 | 52 | * [[Malware Scanning|wiki/info/landscape/malware-scanning]] |
| 34 | -* [[RaceLog Tracking Server Architecture|wiki/info/landscape/server]] |
|
| 53 | + * [[RaceLog Tracking Server Architecture|wiki/info/landscape/server]] |
|
| 35 | 54 | * Environment Overview [[PDF|wiki/info/mobile/event-tracking/architecture.pdf]] | [[SVG|wiki/info/mobile/event-tracking/architecture.svg]] |
| 55 | + |
|
| 56 | +### Landscape |
|
| 57 | + |
|
| 36 | 58 | * Amazon |
| 37 | 59 | * [[Amazon EC2|wiki/info/landscape/amazon-ec2]] |
| 38 | 60 | * [[Upgrading ARCHIVE server|wiki/info/landscape/archive-server-upgrade]] |
| ... | ... | @@ -50,28 +72,9 @@ SAP is at the center of today’s technology revolution, developing innovations |
| 50 | 72 | * [[Downloading and Archiving TracTrac Events|wiki/howto/downloading-and-archiving-tractrac-events]] |
| 51 | 73 | * [[Data Mining Architecture|wiki/info/landscape/data-mining-architecture]] |
| 52 | 74 | * [[Typical Data Mining Scenarios|wiki/info/landscape/typical-data-mining-scenarios]] |
| 53 | -* [[Webdesign|wiki/info/landscape/webdesign]] |
|
| 54 | 75 | * [[sail-insight.com website|wiki/info/landscape/sail-insight.com-website]] |
| 55 | 76 | * [[Docker Registry|wiki/info/landscape/docker-registry]] |
| 56 | 77 | |
| 57 | -### Development |
|
| 58 | - |
|
| 59 | -* [[Typical Development Scenarios|wiki/info/landscape/typical-development-scenarios]] |
|
| 60 | -* [[Building and Deploying|wiki/info/landscape/building-and-deploying]] |
|
| 61 | -* [[Create boat graphics for the 2D race viewer|wiki/howto/development/boatgraphicssvg]] |
|
| 62 | -* [[Continuous Integration with Hudson/Jenkins|wiki/howto/development/ci]] |
|
| 63 | -* [[Dispatch|wiki/howto/development/dispatch]] |
|
| 64 | -* [[Working with GWT UI Binder|wiki/howto/development/gwt-ui-binder]] |
|
| 65 | -* [[Java De(Serialization) and Circular Dependencies|wiki/howto/development/java-de-serialization-and-circular-dependencies]] |
|
| 66 | -* [[JMX Support|wiki/howto/development/jmx]] |
|
| 67 | -* [[Working with GWT Locally|wiki/howto/development/local-gwt]] |
|
| 68 | -* [[UI Tests with Selenium|wiki/howto/development/selenium-ui-tests]] |
|
| 69 | -* [[Profiling|wiki/howto/development/profiling]] |
|
| 70 | -* [[Working with GWT Super Dev Mode|wiki/howto/development/super-dev-mode]] |
|
| 71 | -* [[Training of internal Wind Estimation models|wiki/howto/windestimation]] |
|
| 72 | -* [[Whitelabelling|wiki/howto/whitelabelling]] |
|
| 73 | -* [[Secured Settings|wiki/howto/development/secured-settings]] |
|
| 74 | - |
|
| 75 | 78 | ### Mobile |
| 76 | 79 | |
| 77 | 80 | * [[Mobile Development|wiki/info/mobile/mobile-development]] |
configuration/environments_scripts/central_reverse_proxy/files/var/www/cgi-bin/github.cgi
| ... | ... | @@ -2,23 +2,21 @@ |
| 2 | 2 | echo " |
| 3 | 3 | " |
| 4 | 4 | BODY=$( cat ) |
| 5 | -echo "${BODY}" >/tmp/github-hook-body |
|
| 6 | 5 | REF=$( echo "${BODY}" | jq -r '.ref' ) |
| 7 | 6 | PUSHER=$( echo "${BODY}" | jq -r '.pusher.email' ) |
| 8 | 7 | logger -t github-cgi "ref is $REF, pusher was $PUSHER" |
| 9 | 8 | # For testing: |
| 10 | -#if [ "${PUSHER}" = "axel.uhl@sap.com" -a "${REF}" = "refs/heads/translation" ]; then |
|
| 11 | -tmsatsls+github.com_service-tip-git@sap.com |
|
| 12 | -# The filter in case this is to be used for github.tools.sap: |
|
| 9 | +#if [ "${PUSHER}" = "your-email@example.com" -a "${REF}" = "refs/heads/translation" ]; then |
|
| 10 | +# The filter in case this is to be used for alternative Github at github.tools.sap: |
|
| 13 | 11 | #if [ "${PUSHER}" = "tmsatsls+github.tools.sap_service-tip-git@sap.com" -a "${REF}" = "refs/heads/translation" ]; then |
| 14 | 12 | # The filter for github.com: |
| 15 | 13 | if [ "${PUSHER}" = "tmsatsls+github.com_service-tip-git@sap.com" -a "${REF}" = "refs/heads/translation" ]; then |
| 16 | 14 | echo "Identified a push to refs/heads/translation by ${PUSHER}." |
| 17 | - echo "Fetching translation branch from github.tools.sap and pushing it to ssh://trac@sapsailing.com/home/trac/git" |
|
| 18 | - logger -t github-cgi "fetching translation branch from github.tools.sap and pushing it to ssh://trac@sapsailing.com/home/trac/git" |
|
| 15 | + echo "Fetching translation branch from github and pushing it to ssh://trac@sapsailing.com/home/trac/git" |
|
| 16 | + logger -t github-cgi "fetching translation branch from github and pushing it to ssh://trac@sapsailing.com/home/trac/git" |
|
| 19 | 17 | cd /home/wiki/gitwiki |
| 20 | 18 | sudo -u wiki git fetch github translation:translation 2>&1 |
| 21 | 19 | sudo -u wiki git push origin translation:translation 2>&1 |
| 22 | 20 | else |
| 23 | - echo "Either pusher was not tmsatsls+github.tools.sap_service-tip-git@sap.com or ref was not refs/heads/translation. Not triggering." |
|
| 21 | + echo "Either pusher was not tmsatsls+github.com_service-tip-git@sap.com or ref was not refs/heads/translation. Not triggering." |
|
| 24 | 22 | fi |
configuration/environments_scripts/repo/usr/local/bin/imageupgrade_functions.sh
| ... | ... | @@ -453,8 +453,9 @@ EOF |
| 453 | 453 | sudo dnf -y update |
| 454 | 454 | sudo dnf -y install mongodb-org-server mongodb-org-tools mongodb-mongosh-shared-openssl3 |
| 455 | 455 | # ensure that logrotate can work nicely with SIGUSR1: |
| 456 | - sudo sed -i -e 's/^ logAppend: true/ logAppend: true\n logRotate: reopen/' /etc/mongod.conf |
|
| 457 | - |
|
| 456 | + if ! grep "logRotate: reopen" /etc/mongod.conf; then |
|
| 457 | + sudo sed -i -e 's/^ logAppend: true/ logAppend: true\n logRotate: reopen/' /etc/mongod.conf |
|
| 458 | + fi |
|
| 458 | 459 | } |
| 459 | 460 | |
| 460 | 461 | # Copies the /root/secrets and /root/mail.properties file to the local instance, ensuring only root can read it |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_cs.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=Rozjížďky začínající úsekem proti větru |
| 243 | 243 | events=Události |
| 244 | 244 | pairingList=Rozpis |
| 245 | 245 | pairingLists=Rozpisy |
| 246 | +copyPairingListFromOtherLeaderboard=Kopírovat rozpis z jiné výsledkové tabule |
|
| 246 | 247 | pairingListCreationInfo=Nejprve se vypočítá předloha, která obsahuje pouze čísla závodníků a kterou lze použít i pro jiné výsledkové tabule. Není-li počet závodníků beze zbytku dělitelný počtem lodí, do rozpisu se zadají prázdné zástupné znaky. \ Pokud se počet závodníků nerovná počtu registrovaných závodníků v aktuální výsledkové tabuli, rozpis nebude možné použít pro závodní logy. \ Počet rozjezdů, na jehož základě se tvoří rozpis, je definován počtem rozjezdů ve výsledkové tabuli bez finálových rozjížděk. \ Používají-li se opakované rozjezdy, lze přiřazení do rozjezdů opakovat (např. 15 rozjezdů se třemi opakováními: 5 přiřazení do jedinečných rozjezdů, přičemž se každý bude třikrát opakovat). \ Koeficient změny lodě rovnající se 0 povede k náležitému rozdělení závodníků mezi lodě, zatímco maximální hodnota (=počet rozjezdů) povede k nižšímu počtu změn lodí zvýšením pravděpodobnosti, že závodník popluje na stejné lodi dvě po sobě jdoucí rozjížďky v rozjezdu. |
| 247 | 248 | setCompetitors=Nastavte počet závodníků: |
| 248 | 249 | setBoatChangeFactor=Nastavte koeficient změny lodě: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Povolené původy |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Povolené původy CORS byly úspěšně aktualizovány |
| 2584 | 2585 | commandLogOutput=Výstup protokolu příkazu |
| 2585 | 2586 | errorLoadingLeaderboard=Chyba při načítání výsledkové tabule {0}: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Sloupce rozjížďky, jejichž propojení chcete zkopírovat |
|
| 2588 | +errorCopyingPairings=Chyba při kopírování propojení: {0} |
|
| 2589 | +successfullyCopiedPairings=Úspěšně zkopírovaná propojení |
|
| 2590 | +selectFromRaceColumn=Vyberte sloupec rozjížďky, od kterého chcete zahájit kopírování propojení |
|
| 2591 | +selectToRaceColumn=Vyberte sloupec rozjížďky, do kterého chcete zkopírovat propojení |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_da.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=Kapsejlads starter med ben på bidevind |
| 243 | 243 | events=Begivenheder |
| 244 | 244 | pairingList=Parliste |
| 245 | 245 | pairingLists=Parlister |
| 246 | +copyPairingListFromOtherLeaderboard=Kopier parlister fra anden rangliste |
|
| 246 | 247 | pairingListCreationInfo=for det første beregnes en skabelon, der kun indeholder deltagernumrene, og som kan anvendes til andre ranglister. Hvis antallet af deltagere ikke kan divideres med antallet af både uden rest, indsættes tomme pladsholdere i parlisten. \ Hvis antallet af deltagere derudover ikke er lig med antallet af tilmeldte deltagere i den faktiske rangliste, kan parlisten ikke anvendes på kapsejladsprotokoller. \ Antallet af løb, der bruges til at generere en parliste, defineres af antallet af løb i ranglisten, der ikke er medaljesejladser. \ Når gentagne løb bruges, kan tildelinger af løb gentages (fx 15 løb med 3 gentagne løb: 5 unikke tildelinger af løb, og hver af dem gentages 3 gange). \ En bådændringsfaktor lig med 0 medfører en veldistribueret tildeligen af deltagere til både, hvorimod maksimumværdien (antal løb) medfører færre bådændringer ved at øge chancen for, at en deltager sejler med den samme båd i mere end 2 fortløbende kapsejladser på tværs af en løbsgrænse. |
| 247 | 248 | setCompetitors=Sæt antallet af deltagere: |
| 248 | 249 | setBoatChangeFactor=Sæt bådændringsfaktor: |
| ... | ... | @@ -2584,3 +2585,8 @@ corsAllowedOrigins=Tilladte oprindelser |
| 2584 | 2585 | successfullyUpdatedCORSAllowedOrigins=Tilladte oprindelser for CORS blev opdateret |
| 2585 | 2586 | commandLogOutput=Logoutput for kommando |
| 2586 | 2587 | errorLoadingLeaderboard=Fejl ved indlæsning af rangliste {0}: {1} |
| 2588 | +selectRaceColumnsWhosePairingsToCopy=Kapsejladskolonner, hvis par skal kopieres |
|
| 2589 | +errorCopyingPairings=Fejl ved kopiering af par: {0} |
|
| 2590 | +successfullyCopiedPairings=Par blev kopieret |
|
| 2591 | +selectFromRaceColumn=Vælg kapsejladskolonne, hvorfra kopiering af par skal startes |
|
| 2592 | +selectToRaceColumn=Vælg kapsejladskolonne, hvortil kopiering af par skal startes |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_es.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=La prueba empieza con ceñida |
| 243 | 243 | events=Eventos |
| 244 | 244 | pairingList=Lista de emparejamientos |
| 245 | 245 | pairingLists=Listas de emparejamientos |
| 246 | +copyPairingListFromOtherLeaderboard=Copiar la lista de emparejamientos de otra clasificación |
|
| 246 | 247 | pairingListCreationInfo=Inicialmente se calculará una plantilla que contenga solo los números de los competidores y que pueda aplicarse a otras clasificaciones. Si el recuento de competidores no es divisible por recuento de embarcaciones sin remanente, se introducirán marcadores de posición en blanco en la lista de emparejamientos. \ Además, si el recuento de competidores difiere del recuento de competidores registrado en la clasificación real, la lista de emparejamientos no podrá aplicarse a los registros de la prueba. \ El recuento de flights, que se utiliza para generar una lista de emparejamientos, está definido por el número de flights de la clasificación que no son pruebas de medalla. \ Cuando se utilizan repeticiones de flight, se pueden repetir asignaciones de flights (por ejemplo, 15 flights con 3 repeticiones de flight: 5 asignaciones de flight únicas que se repetirán 3 veces cada una de ellas). \ Un factor de cambio de embarcación equivalente a 0 da como resultado una asignación bien distribuida de competidores y embarcaciones, considerando que el máximo (número de flights) provoca menos cambios de embarcación aumentando las posibilidades de que un competidor navegue con la misma embarcación en dos pruebas contiguas a través de un límite de flights. |
| 247 | 248 | setCompetitors=Fije el recuento de competidores: |
| 248 | 249 | setBoatChangeFactor=Fije el factor de cambio de embarcación: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Orígenes permitidos |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Orígenes permitidos CORS actualizados correctamente |
| 2584 | 2585 | commandLogOutput=Salida de log de comandos |
| 2585 | 2586 | errorLoadingLeaderboard=Error al cargar la tabla de clasificación {0}: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Columna Prueba cuyos emparejamientos se deben copiar |
|
| 2588 | +errorCopyingPairings=Error al copiar emparejamientos: {0} |
|
| 2589 | +successfullyCopiedPairings=Emparejamientos copiados correctamente |
|
| 2590 | +selectFromRaceColumn=Seleccione la columna Prueba desde la que se inicia la copia de emparejamientos |
|
| 2591 | +selectToRaceColumn=Seleccione la columna Prueba desde la que se copian los emparejamientos |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_fr.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=La course a commencé avec une portion de parcours au v |
| 243 | 243 | events=Manifestations |
| 244 | 244 | pairingList=Liste d''appariement |
| 245 | 245 | pairingLists=Listes d''appariement |
| 246 | +copyPairingListFromOtherLeaderboard=Copier la liste d''appariements de l''autre palmarès |
|
| 246 | 247 | pairingListCreationInfo=Tout d''abord, un modèle contenant uniquement le nombre de concurrents sera calculé. Il pourra être appliqué à d''autres palmarès. Si la division du nombre de concurrents par le nombre de bateaux ne permet pas d''obtenir un nombre entier, des espaces réservés vides seront ajoutés à la liste d''appariement. \ En outre, si le nombre de concurrents ne correspond pas au nombre de concurrents inscrits au palmarès actuel, la liste d''appariement ne pourra pas être appliquée aux journaux de course. \ Le nombre de flights (matchs) utilisé pour générer une liste d''appariement est défini par tous les flights du palmarès, hors courses médaillées. \ En cas de répétition des flights, les affectations de flights peuvent être répétées (par exemple, 15 flights avec 3 répétitions : 5 affectations de flights uniques, et chacun sera répété 3 fois). \ Un facteur de changement de bateau équivalent à 0 permet une répartition correcte des concurrents sur les bateaux, alors que le nombre de flights maximum implique moins de changements de bateaux en augmentant les chances qu''un concurrent navigue sur un même bateau pour deux courses consécutives trans-flight. |
| 247 | 248 | setCompetitors=Veuillez définir le nombre de concurrents : |
| 248 | 249 | setBoatChangeFactor=Veuillez définir le facteur de changement de bateau : |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Origines autorisées |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Origines autorisées CORS mises à jour |
| 2584 | 2585 | commandLogOutput=Édition du journal des commandes |
| 2585 | 2586 | errorLoadingLeaderboard=Erreur lors du chargement du palmarès {0} : {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Colonnes de la course avec appariements à copier |
|
| 2588 | +errorCopyingPairings=Erreur lors de la copie des appariements : {0} |
|
| 2589 | +successfullyCopiedPairings=Appariements copiés |
|
| 2590 | +selectFromRaceColumn=Sélectionnez la colonne de la course dans laquelle commencer à copier des appariements. |
|
| 2591 | +selectToRaceColumn=Sélectionnez la colonne de la course dans laquelle commencer à coller des appariements. |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_it.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=La gara inizia con una tratta sopravento |
| 243 | 243 | events=Eventi |
| 244 | 244 | pairingList=Pairing list |
| 245 | 245 | pairingLists=Pairing lists |
| 246 | +copyPairingListFromOtherLeaderboard=Copia pairing lista dall''altra classifica |
|
| 246 | 247 | pairingListCreationInfo=Innanzitutto verrà calcolato un modello contenente solo i numeri dei concorrenti che potrà essere applicato ad altre classifiche. Se il numero di concorrenti non è divisibile per il numero di barche senza promemoria, nella pairing list verranno inseriti segnaposti vuoti. \ Inoltre, se il numero dei concorrenti è diverso dal numero di concorrenti registrati nella classifica effettiva, la pairing list non potrà applicarsi ai registri della gara. \ Il numero di voli utilizzato per generare una pairing list è definito dal numero di voli nella classifica di gare diverse dalla medal race. \ Quando si utilizzano ripetizioni di volo, è possibile ripetere assegnazioni di volo (ad esempio 15 voli con 3 ripetizioni: 5 assegnazioni univoche di voli, ciascuna delle quali verrà ripetuta 3 volte). \ Un fattore di cambio barca uguale a 0 porta a un''assegnazione ben distribuita di concorrenti nelle barche, mentre il massimo (numero di voli) porta a un numero inferiore di cambi barca aumentando le possibilità che un concorrente gareggi nella stessa barca per due gare contigue oltre un confine del volo. |
| 247 | 248 | setCompetitors=Impostare il numero di concorrenti: |
| 248 | 249 | setBoatChangeFactor=Impostare il fattore di cambio barca: |
| ... | ... | @@ -2584,3 +2585,8 @@ corsAllowedOrigins=Origini consentite |
| 2584 | 2585 | successfullyUpdatedCORSAllowedOrigins=Origini CORS consentite aggiornate correttamente |
| 2585 | 2586 | commandLogOutput=Output del registro di comando |
| 2586 | 2587 | errorLoadingLeaderboard=Errore di caricamento della classifica {0}: {1} |
| 2588 | +selectRaceColumnsWhosePairingsToCopy=Colonne della gara di cui copiare gli accoppiamenti |
|
| 2589 | +errorCopyingPairings=Errore di copia degli accoppiamenti: {0} |
|
| 2590 | +successfullyCopiedPairings=Accoppiamenti copiati correttamente |
|
| 2591 | +selectFromRaceColumn=Seleziona la colonna della gara da cui iniziare a copiare gli accoppiamenti |
|
| 2592 | +selectToRaceColumn=Seleziona la colonna della gara in cui copiare gli accoppiamenti |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ja.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=アップウィンドレグでレーススタート |
| 243 | 243 | events=イベント |
| 244 | 244 | pairingList=対戦表 |
| 245 | 245 | pairingLists=対戦表 |
| 246 | +copyPairingListFromOtherLeaderboard=他のリーダーボードから対戦表をコピー |
|
| 246 | 247 | pairingListCreationInfo=まず最初に、競技者番号のみが含まれていて、他のリーダーボードに適用できるテンプレートがすべて計算されます。競技者カウントが艇カウントで割り切れない場合、空のプレースホルダーが対戦表に入力されます。 \ また、競技者カウントが実際のリーダーボードにある登録済の競技者カウントと等しくない場合、対戦表をレースログに適用することはできません。 \ 対戦表を生成するために使用されるフライトのカウントは、リーダーボードにあるメダルレースでないフライトの回数によって設定されます。 \ フライト繰返の使用時に、フライト割当を繰り返すことができます (例: 3 つのフライト繰返がある 15 回のフライトでは、別々の 5 つのフライト割当でそれぞれが 3 回繰り返されます)。 \ 艇変更係数が 0 に等しければ、艇への競技者の割当がうまく配分されることにつながり、一方、最大 (フライト回数) になると、フライトの境界を超えて隣接している 2 つのレースで競技者が同一艇で帆走する可能性が高くなることで艇変更がより少なくなります。 |
| 247 | 248 | setCompetitors=競技者カウントを設定してください: |
| 248 | 249 | setBoatChangeFactor=艇変更係数を設定してください: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=許可済みソース |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=CORS 許可済みソースが更新されました |
| 2584 | 2585 | commandLogOutput=コマンドログ出力 |
| 2585 | 2586 | errorLoadingLeaderboard=リーダーボード {0} のロードでエラーが発生: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=対戦組み合わせをコピーするレース列 |
|
| 2588 | +errorCopyingPairings=対戦組み合わせのコピーでエラーが発生: {0} |
|
| 2589 | +successfullyCopiedPairings=対戦組み合わせを正常にコピー済み |
|
| 2590 | +selectFromRaceColumn=対戦組み合わせのコピーを開始する元のレース列を選択 |
|
| 2591 | +selectToRaceColumn=対戦組み合わせのコピー先のレース列を選択 |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_pt.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=A corrida começa com perna de contravento |
| 243 | 243 | events=Eventos |
| 244 | 244 | pairingList=Lista de pares |
| 245 | 245 | pairingLists=Listas de pares |
| 246 | +copyPairingListFromOtherLeaderboard=Copiar lista de pares de outro painel de classificação |
|
| 246 | 247 | pairingListCreationInfo=Primeiro será calculado um modelo que contém somente os números dos competidores e pode ser aplicado a outros painéis de classificação. Se contagem de competidores não for divisível pela contagem de barcos sem restante, os caracteres de preenchimento em branco serão inseridos na lista de pares. \ Além disso, se a contagem de competidores for diferente da contagem de competidores registrados no painel de classificação real, a lista de pares não pode ser aplicada aos registros das corridas. \ A contagem de voos, que é utilizada para gerar uma lista de pares, é definida pelo número de voos no painel de classificação que não sejam corridas para medalha. \ Ao utilizar repetições de voo, as atribuições de voo podem ser repetidas (por exemplo, 15 voos com 3 repetições de voo: 5 atribuições de voo únicas e cada uma será repetida 3 vezes). \ Um fator de mudança de barco igual a 0 leva a uma atribuição bem distribuída de competidores a barcos, sendo que o (número de voos) máximo leva a menos mudanças de barco aumentando as hipóteses de um competidor navegar no mesmo barco em duas corridas contínuas além do limite do voo. |
| 247 | 248 | setCompetitors=Defina a contagem dos competidores: |
| 248 | 249 | setBoatChangeFactor=Defina o fator de mudança de barco: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Origens permitidas |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Origens permitidas CORS atualizadas com êxito |
| 2584 | 2585 | commandLogOutput=Saída do log de comando |
| 2585 | 2586 | errorLoadingLeaderboard=Erro ao carregar o painel de classificação {0}: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Colunas da corrida cujos pares devem ser copiados |
|
| 2588 | +errorCopyingPairings=Erro ao copiar pares: {0} |
|
| 2589 | +successfullyCopiedPairings=Pares copiados com êxito |
|
| 2590 | +selectFromRaceColumn=Selecionar coluna da corrida a partir da qual deve ser iniciada a cópia dos pares |
|
| 2591 | +selectToRaceColumn=Selecionar coluna da corrida para a qual deve ser efetuada a cópia dos pares |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=Гонка начинается против ветра |
| 243 | 243 | events=События |
| 244 | 244 | pairingList=Список пар |
| 245 | 245 | pairingLists=Списки пар |
| 246 | +copyPairingListFromOtherLeaderboard=Скопировать список пар из другой таблицы лидеров |
|
| 246 | 247 | pairingListCreationInfo=Первым будет рассчитан шаблон, который содержит только номера участников и может быть применен к другим таблицам лидеров. Если число участников не делится на число лодок без остатка, в списке пар будут пустые места. \ Если число участников не равно числу зарегистрированных участников в фактической таблице лидеров, список пар не может быть применен к журналам гонки. \ Для генерирования списка пар используется число всех флайтов таблицы лидеров, не являющихся гонками на медали. \ Если используются повторы флайтов, то присвоения флайтов могут повторяться (например, 15 флайтов с 3 повторами: 5 уникальных присвоений флайтов, каждый из которых повторяется 3 раза). \ Результатом нулевого коэффициента смены лодки является хорошее распределение участников по лодкам, то есть максимум (число флайтов) ведет к меньшему числу смен лодок, и это увеличивает шансы, что участник будет плыть на одной и той же лодке в двух смежных гонках до окончания флайта. |
| 247 | 248 | setCompetitors=Укажите число участников: |
| 248 | 249 | setBoatChangeFactor=Укажите коэффициент смены лодки: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Разрешенные происхождения |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Разрешенные происхождения CORS обновлены |
| 2584 | 2585 | commandLogOutput=Вывод журнала команд |
| 2585 | 2586 | errorLoadingLeaderboard=Ошибка при загрузке таблицы лидеров {0}: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Столбцы гонки, пары которой требуется скопировать |
|
| 2588 | +errorCopyingPairings=Ошибка при копировании пар: {0} |
|
| 2589 | +successfullyCopiedPairings=Успешно скопированные пары |
|
| 2590 | +selectFromRaceColumn=Выберите столбец гонки, с которого требуется начать копирование пар |
|
| 2591 | +selectToRaceColumn=Выберите столбец гонки, в который требуется копировать пары |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_sl.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=Plov se začne s stranico proti vetru |
| 243 | 243 | events=Dogodki |
| 244 | 244 | pairingList=Seznam parov |
| 245 | 245 | pairingLists=Seznami parov |
| 246 | +copyPairingListFromOtherLeaderboard=Kopiranje seznama parov z druge lestvice vodilnih |
|
| 246 | 247 | pairingListCreationInfo=Najprej bo izračunana predloga, ki vsebuje samo številke tekmovalcev in jo je mogoče uporabiti za druge lestvice vodilnih. Če število tekmovalcev ni deljivo s številom jadrnic brez ostanka, bodo na seznam parov dodane prazne označbe mesta. \ Če število tekmovalcev ni enako številu registriranih tekmovalcev na aktualni lestvici vodilnih, seznama parov ni mogoče uporabiti za dnevnike plovov. \ Število jadranj, uporabljeno za generiranje seznama parov, je opredeljeno kot število jadranj na lestvici vodilnih, ki niso plovi za kolajne. \ Pri uporabi ponovitev jadranj je mogoče ponoviti dodelitve jadranj (npr. 15 jadranj s 3 ponovitvami jadranj: 5 enkratnih dodelitev jadranj, kjer se vsaka ponovi 3-krat). \ Faktor menjave jadrnice, ki je enak 0, pomeni enakomerno porazdeljeno dodelitev tekmovalcev jadrnicam, največje (število jadranj) pa pomeni manj menjav jadrnic, zato je večja verjetnost, da bo tekmovalec z isto jadrnico jadral dva plova zapored znotraj meja jadranja. |
| 247 | 248 | setCompetitors=Nastavite število tekmovalcev: |
| 248 | 249 | setBoatChangeFactor=Nastavite faktor menjave jadrnic: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=Dovoljena porekla |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=Uspešno posodobljeni CORS - dovoljeno poreklo |
| 2584 | 2585 | commandLogOutput=Izdaja dnevnika ukazov |
| 2585 | 2586 | errorLoadingLeaderboard=Napaka pri prenosu lestvice vodilnih {0}: {1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=Stolpci plovov, katerih pare želite kopirati |
|
| 2588 | +errorCopyingPairings=Napaka pri kopiranju parov: {0} |
|
| 2589 | +successfullyCopiedPairings=Uspešno kopirani pari |
|
| 2590 | +selectFromRaceColumn=Izberite stolpec plova, iz katerega želite začeti kopirati pare |
|
| 2591 | +selectToRaceColumn=Izberite stolpec plova, v katerega želite začeti kopirati pare |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_zh.properties
| ... | ... | @@ -243,6 +243,7 @@ raceIsKnownToStartUpwind=比赛轮次从迎风航段开始 |
| 243 | 243 | events=活动 |
| 244 | 244 | pairingList=配对清单 |
| 245 | 245 | pairingLists=配对清单 |
| 246 | +copyPairingListFromOtherLeaderboard=从其他积分榜复制配对清单 |
|
| 246 | 247 | pairingListCreationInfo=首先,将计算仅包含参赛队数并且可以应用到其他积分榜的模板。如果参赛队数量无法被船只数量除尽,则在配对清单中输入空占位符。\ 此外,如果参赛队数量不等于实际积分榜中注册的参赛队数量,配对清单无法应用到比赛轮次日志。\ 用于生成配对清单的航程数由积分榜中不是奖牌轮的航程数定义。\ 使用航程重复时,可以重复航程分配(例如,有 3 个航程重复的 15 个航程:5 个独特的航程分配,每个重复 3 次)。\ 船只更换系数等于 0 导致向船只平均分配参赛队,而最大值(航程数)通过提高参赛队在两个连续的比赛轮次驾驶同一船只驶过航程边界的机会来减少换船次数。 |
| 247 | 248 | setCompetitors=请设置参赛队数量: |
| 248 | 249 | setBoatChangeFactor=请设置船只更换系数: |
| ... | ... | @@ -2583,3 +2584,8 @@ corsAllowedOrigins=允许的来源 |
| 2583 | 2584 | successfullyUpdatedCORSAllowedOrigins=已成功更新 CORS 允许的来源 |
| 2584 | 2585 | commandLogOutput=命令日志输出 |
| 2585 | 2586 | errorLoadingLeaderboard=加载积分榜 {0} 出错:{1} |
| 2587 | +selectRaceColumnsWhosePairingsToCopy=要复制配对的比赛轮次列 |
|
| 2588 | +errorCopyingPairings=复制配对出错:{0} |
|
| 2589 | +successfullyCopiedPairings=已成功复制配对 |
|
| 2590 | +selectFromRaceColumn=选择要从哪一个比赛轮次列开始复制配对 |
|
| 2591 | +selectToRaceColumn=选择要将配对复制到哪一个比赛轮次列 |
java/com.sap.sailing.www/release_notes_admin.html
| ... | ... | @@ -40,6 +40,11 @@ |
| 40 | 40 | <li>Upon popular demand, the series editing dialog now supports not only 50 but 100 |
| 41 | 41 | race columns / flights to be created in the drop-down list.</li> |
| 42 | 42 | <li>AI Agent credentials can now be reset from the Admin Console.</li> |
| 43 | + <li>When using the Advanced / Landscape Management page of the Admin Console, and a new |
|
| 44 | + application load balancer (ALB) is created (e.g., in response to the number of ALB |
|
| 45 | + listener rules exceeding the limit for all existing ALBs in the region), the new ALB |
|
| 46 | + will automatically be registered with any AWS Web Application Firewall (WAF) access |
|
| 47 | + control list (Web ACL) that has a tag "web-acl-purpose" with value "geoblocking".<p> |
|
| 43 | 48 | </ul> |
| 44 | 49 | <h2 class="articleSubheadline">June 2025</h2> |
| 45 | 50 | <ul class="bulletList"> |
java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/LandscapeConstants.java
| ... | ... | @@ -72,6 +72,18 @@ public interface LandscapeConstants { |
| 72 | 72 | * "default" version. See, e.g., {@link LaunchTemplateSpecification#version()}. |
| 73 | 73 | */ |
| 74 | 74 | String DEFAULT_LAUNCH_TEMPLATE_VERSION_NAME = "$Default"; |
| 75 | + |
|
| 76 | + /** |
|
| 77 | + * When we use AWS Web Application Firewall (WAF) to protect a web application, we tag the web ACLs using this as a |
|
| 78 | + * tag key. The tag value then identifies the purpose, e.g., using the value of {@link #WEB_ACL_GEOBLOCKING_PURPOSE}. |
|
| 79 | + */ |
|
| 80 | + String WEB_ACL_PURPOSE_TAG = "web-acl-purpose"; |
|
| 81 | + |
|
| 82 | + /** |
|
| 83 | + * A possible tag value for the {@link #WEB_ACL_PURPOSE_TAG} tag key, on a WAF (Web Application Firewall) web ACL |
|
| 84 | + * indicating that the web ACL is used for geoblocking. |
|
| 85 | + */ |
|
| 86 | + String WEB_ACL_GEOBLOCKING_PURPOSE = "geoblocking"; |
|
| 75 | 87 | |
| 76 | 88 | InstanceType[] INSTANCE_TYPES_BANNED_FROM_INSTANCE_BASED_NLB_TARGET_GROUPS = new InstanceType[] { InstanceType.CC1_4_XLARGE, InstanceType.C1_MEDIUM, InstanceType.C1_XLARGE, |
| 77 | 89 | InstanceType.CC2_8_XLARGE, InstanceType.CG1_4_XLARGE, InstanceType.CR1_8_XLARGE, InstanceType.G2_2_XLARGE, |
java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/AwsLandscapeImpl.java
| ... | ... | @@ -197,6 +197,9 @@ import software.amazon.awssdk.services.route53.model.TestDnsAnswerResponse; |
| 197 | 197 | import software.amazon.awssdk.services.route53.paginators.ListResourceRecordSetsIterable; |
| 198 | 198 | import software.amazon.awssdk.services.sts.StsClient; |
| 199 | 199 | import software.amazon.awssdk.services.sts.model.Credentials; |
| 200 | +import software.amazon.awssdk.services.wafv2.Wafv2Client; |
|
| 201 | +import software.amazon.awssdk.services.wafv2.model.ListWebAcLsResponse; |
|
| 202 | +import software.amazon.awssdk.services.wafv2.model.Scope; |
|
| 200 | 203 | |
| 201 | 204 | public class AwsLandscapeImpl<ShardingKey> implements AwsLandscape<ShardingKey> { |
| 202 | 205 | private static final String SSL_SECURITY_POLICY = "ELBSecurityPolicy-FS-1-2-Res-2019-08"; |
| ... | ... | @@ -305,6 +308,10 @@ public class AwsLandscapeImpl<ShardingKey> implements AwsLandscape<ShardingKey> |
| 305 | 308 | return getClient(ElasticLoadBalancingV2Client.builder(), region); |
| 306 | 309 | } |
| 307 | 310 | |
| 311 | + private Wafv2Client getWafClient(Region region) { |
|
| 312 | + return getClient(Wafv2Client.builder(), region); |
|
| 313 | + } |
|
| 314 | + |
|
| 308 | 315 | private ElasticLoadBalancingV2AsyncClient getLoadBalancingAsyncClient(Region region) { |
| 309 | 316 | return getClient(ElasticLoadBalancingV2AsyncClient.builder(), region); |
| 310 | 317 | } |
| ... | ... | @@ -352,9 +359,28 @@ public class AwsLandscapeImpl<ShardingKey> implements AwsLandscape<ShardingKey> |
| 352 | 359 | final ApplicationLoadBalancer<ShardingKey> result = new ApplicationLoadBalancerImpl<>(region, response.loadBalancers().iterator().next(), this); |
| 353 | 360 | createLoadBalancerHttpListener(result); |
| 354 | 361 | createLoadBalancerHttpsListener(result); |
| 362 | + getWafACLsByTagAndAssociateWithALB(LandscapeConstants.WEB_ACL_PURPOSE_TAG, LandscapeConstants.WEB_ACL_GEOBLOCKING_PURPOSE, result.getArn(), awsRegion); |
|
| 355 | 363 | return result; |
| 356 | 364 | } |
| 357 | 365 | |
| 366 | + private void getWafACLsByTagAndAssociateWithALB(String tagKey, String tagValue, String albArn, Region region) { |
|
| 367 | + logger.info("Trying to find WAF ACLs with tag "+tagKey+"="+tagValue+" to associate with ALB "+albArn+" in region "+region.id()); |
|
| 368 | + final Wafv2Client wafClient = getWafClient(region); |
|
| 369 | + // Step 1: list all REGIONAL Web ACLs |
|
| 370 | + final ListWebAcLsResponse listResp = wafClient.listWebACLs(b->b.scope(Scope.REGIONAL)); |
|
| 371 | + listResp.webACLs().stream().filter(aclSummary -> |
|
| 372 | + // Step 2: filter the ACLs down to those with the right tag |
|
| 373 | + wafClient.listTagsForResource(b->b.resourceARN(aclSummary.arn())).tagInfoForResource().tagList().stream() |
|
| 374 | + .anyMatch(tag -> tag.key().equals(tagKey) && tag.value().equals(tagValue))) |
|
| 375 | + .forEach(aclSummary -> { |
|
| 376 | + // Step 3: associate the ALB with those Web ACLs |
|
| 377 | + logger.info("Associating WAF ACL "+aclSummary.arn()+" with ALB "+albArn); |
|
| 378 | + wafClient.associateWebACL(b->b |
|
| 379 | + .webACLArn(aclSummary.arn()) |
|
| 380 | + .resourceArn(albArn)); |
|
| 381 | + }); |
|
| 382 | + } |
|
| 383 | + |
|
| 358 | 384 | private Subnet getSubnetForAvailabilityZoneInSameVpcAsSecurityGroup(AwsAvailabilityZone az, SecurityGroup securityGroup, Region region) { |
| 359 | 385 | final Ec2Client ec2Client = getEc2Client(region); |
| 360 | 386 | final String vpcId = ec2Client.describeSecurityGroups(b->b.groupIds(securityGroup.getId())).securityGroups().iterator().next().vpcId(); |
wiki/howto/development/ci.md
| ... | ... | @@ -1,8 +1,48 @@ |
| 1 | -# Continuous Integration with Hudson/Jenkins |
|
| 1 | +# Continuous Integration with Hudson/Jenkins and Github Actions |
|
| 2 | 2 | |
| 3 | -Our default Hudson runs on https://hudson.sapsailing.com. If you need access, please contact axel.uhl@sap.com or simon.marcel.pamies@sap.com. We have a build job running for the master branch which will automatically pick up any changes, run a build with tests and inform committers about flaws they introduced that broke the build. |
|
| 3 | +## Access |
|
| 4 | 4 | |
| 5 | -It is good practice to set up a new Hudson job for major branches that require solid testing before being merged into the master branch. The entry page at http://hudson.sapsailing.com explains how to do this. It basically comes down to copying a template job and adjusting the branch name. As easy as that :-) |
|
| 5 | +Our default Hudson runs on https://hudson.sapsailing.com. If you need access, please contact axel.uhl@sap.com or petr.janacek@sap.com. Usernames typically are {firstname}{lastname}, all lowercase. |
|
| 6 | + |
|
| 7 | +Our use of a CI tool such as Hudson (could also be Jenkins, see [[below|#in-case-you-d-like-to-set-up-your-own-hudson-jenkins]]) is special in so far as the actual build is not run under its control. Instead, we use it only as an aggregator for build logs, test results and measurements collected during the builds. While historically we _did_ use Hudson to run our builds, also in conjunction with a fleet of AWS build slaves that allowed us to parallelize builds and configure hardware resources for it as needed, with the move to Github we also migrated our build to Github Actions, defining the [release](https://github.com/SAP/sailing-analytics/actions/workflows/release.yml) workflow which by and large takes over the heavy lifting of our build environment. |
|
| 8 | + |
|
| 9 | +It turns out, though, that Github Actions is not particularly good at managing build logs that exceed tens of thousands of lines (like ours), and it is not good at managing test results and measurements, or presenting and preserving Selenium-provided screenshots recorded from headless browsers used for UI testing. That's why we decided to keep a more "classic" CI around, but instead of using it for actually _running_ the builds, we would instead only forward the build outputs produced by Github Actions to the CI where it then gets evaluated, stored, evaluated statistically and presented in an easy-to-access way. |
|
| 10 | + |
|
| 11 | +The key to this type of integration is that at the end of the ``release`` workflow a Hudson job is triggered through an HTTP request made by the workflow. The scripts which are then used by the Hudson job to obtain the build results and if needed copy a Github release to https://releases.sapsailing.com can be found under [configuration/github-download-workflow-artifacts.sh](https://github.com/SAP/sailing-analytics/blob/main/configuration/github-download-workflow-artifacts.sh) and [configuration/github-copy-release-to-sapsailing-com.sh](https://github.com/SAP/sailing-analytics/blob/main/configuration/github-copy-release-to-sapsailing-com.sh), respectively. |
|
| 12 | + |
|
| 13 | +Access to the Github repository is granted to the Hudson jobs through a Github personal access token (PAT) to an account with read-only permissions to the repository. |
|
| 14 | + |
|
| 15 | +## Build Jobs |
|
| 16 | + |
|
| 17 | +There are a number of standard build jobs: |
|
| 18 | +* [SAPSailingAnalytics-master](https://hudson.sapsailing.com/job/SAPSailingAnalytics-master/): builds the ``main`` branch; if it shows "green" then a release and docker images will have been built |
|
| 19 | +* [SAPSailingAnalytics-master-fasttrack-no-tests](https://hudson.sapsailing.com/job/SAPSailingAnalytics-master-fasttrack-no-tests/): gets triggered by builds that were run with no tests being executed, e.g., by manually invoking the [Github Release Workflow](https://github.com/SAP/sailing-analytics/actions/workflows/release.yml) with the build parameter "skip all tests" set to ``true`` |
|
| 20 | +* [SDBG](https://hudson.sapsailing.com/job/SDBG/) runs in the unlikely case that still some committer makes a change to the Eclipse GWT Super Dev Mode debugger; it would build a new release of the corresponding Plugin p2 repository and upload it to [https://p2.sapsailing.com/p2/sdbg](https://p2.sapsailing.com/p2/sdbg) |
|
| 21 | +* [translation](https://hudson.sapsailing.com/job/translation/) is triggered by the corresponding ``translation`` branch, and as such follows the general pattern of branch names equalling the build job names; however, at its end, if the build was successful, the ``translation`` branch will be merged into the ``main`` branch by the build job |
|
| 22 | +* ``bugXXXX`` jobs are the ones that correspond with branches in Git, just like a few for special branches such as ``management-console``; they are [[triggered by pushing to them in Git|wiki/howto/development/ci.md#github-webhook-on-push]] |
|
| 23 | +* [CopyTemplate](https://hudson.sapsailing.com/view/archived%20jobs%20/job/CopyTemplate/) is a disabled job that serves as the template used by the ``configuration/createdHudsonJobForBug.sh`` script, so don't delete this, and don't enable this! |
|
| 24 | + |
|
| 25 | +## How Jobs are Usually Triggered |
|
| 26 | + |
|
| 27 | +### Github Actions ``release`` Workflow |
|
| 28 | + |
|
| 29 | +The [release](https://github.com/SAP/sailing-analytics/actions/workflows/release.yml) workflow in Github is defined such that at its end it makes an HTTP request to https://hudson.sapsailing.com/job/${JOB}/build, passing a secret access token as defined in the Hudson build jobs (taken from the CopyTemplate job), which will trigger the build job that corresponds to the branch the ``release`` workflow just tried to build. No rule without exceptions: the ``main`` branch is mapped to ``SAPSailingAnalytics-master``, and if ``main`` was built without test execution, then ``SAPSailingAnalytics-master-fasttrack-no-tests``. Furthermore, branches named ``releases/...`` then the ``releases/`` is stripped from the branch name to obtain the name of the build job to trigger (see also [[Building with Release|wiki/info/landscape/development-environment.md#exceptionally-building-without-running-tests-more-fewer-cpus-and-with-release]]). |
|
| 30 | + |
|
| 31 | +### Manually Triggering a Job |
|
| 32 | + |
|
| 33 | +The ``release`` workflow can be dispatched manually. It has a few build parameters you can use to configure the build. If you skip tests but build a branch producing a release, that release will be named "untested-..." for clarity. You can also configure the number of CPUs within certain limits and steps. Should you have made changes to the [[target platform|wiki/info/general/workspace-bundles-projects-structure.md#target-platform]] on your branch that would require a different set of bundles in our base p2 repository under https://p2.sapsailing.com/p2/sailing, you can also explicitly ask for a build here which will first construct a temporary base p2 repository during the build and use that instead of the regular one. |
|
| 34 | + |
|
| 35 | +### Github Webhook on Push |
|
| 36 | + |
|
| 37 | +When commits are pushed to our Github repository, a [webhook](https://github.com/SAP/sailing-analytics/settings/hooks/480929064) is triggered which sends an HTTP request to [https://git.sapsailing.com/hooks/github.cgi](https://git.sapsailing.com/hooks/github.cgi). This, in turn, is backed by the script ``/var/www/cgi-bin/github.cgi`` which is installed there when the central reverse proxy is set up from [configuration/environments_scripts/central_reverse_proxy/files/var/www/cgi-bin/github.cgi](https://github.com/SAP/sailing-analytics/blob/main/configuration/environments_scripts/central_reverse_proxy/files/var/www/cgi-bin/github.cgi). Currently, that script's only task is to check whether the push originated from the translators making contributions to the ``translation`` branch and if so, push those changes also to the ``translation`` branch of our internal Git repository at ssh://trac@sapsailing.com/home/trac/git. |
|
| 38 | + |
|
| 39 | +## Disabling a Job |
|
| 40 | + |
|
| 41 | +When done with a branch for the time being or for good, you can disable the corresponding Hudson job that was created for it. The job's page has a corresponding "Disable job" button on it. |
|
| 42 | + |
|
| 43 | +Disabling (rather than deleting) jobs has the benefit of all data (logs, test runs, measurements) of those builds that are kept (usually the latest ten builds) will be preserved. This way it is usually safe to reference build and test results in your Bugzilla comments. |
|
| 44 | + |
|
| 45 | +Disabled jobs will not show directly on the landing page at [https://hudson.sapsailing.com](https://hudson.sapsailing.com) but instead can be found under the [archived jobs](https://hudson.sapsailing.com/view/archived%20jobs%20/) tab. This way, the landing page stays clean and tidy. |
|
| 6 | 46 | |
| 7 | 47 | ## Collecting measurements using Hudson/Jenkins |
| 8 | 48 |
wiki/howto/onboarding.md
| ... | ... | @@ -1,17 +1,5 @@ |
| 1 | 1 | # OnBoarding Information |
| 2 | 2 | |
| 3 | -<!-- |
|
| 4 | -This Markdown document is designed to work with Gollum not with GitHub. Internal links to chapters have the following syntax in for Gollum: |
|
| 5 | - |
|
| 6 | -Chapter Hierachy: |
|
| 7 | -# chapter |
|
| 8 | -## new subchapter |
|
| 9 | -### chapter to reference |
|
| 10 | -## another chapter |
|
| 11 | - |
|
| 12 | -[linkText](#chapter_new-subchapter_chapter-to-reference) |
|
| 13 | - --> |
|
| 14 | - |
|
| 15 | 3 | This document describes the onboarding process for a new team member (developer) |
| 16 | 4 | |
| 17 | 5 | First of all, make sure you've looked at [http://www.amazon.de/Patterns-Elements-Reusable-Object-Oriented-Software/dp/0201633612](http://www.amazon.de/Patterns-Elements-Reusable-Object-Oriented-Software/dp/0201633612). That's a great book, and knowing at least some of it will help you a great deal finding your way around our solution. |
| ... | ... | @@ -21,29 +9,29 @@ First of all, make sure you've looked at [http://www.amazon.de/Patterns-Elements |
| 21 | 9 | ### Accounts |
| 22 | 10 | |
| 23 | 11 | 1. Git Account |
| 24 | - The primary Git repository for the project is hosted on Github (see [https://github.com/SAP/sailing-analytics](https://github.com/SAP/sailing-analytics)). To clone, use ``git@github.com:SAP/sailing-analytics.git``. To gain write access you have to become member of the [sailing-analytics-team](https://github.com/orgs/SAP/teams/sailing-analytics-team) organization. We still have a shadow repository around that, e.g., powers our Wiki at [https://wiki.sapsailing.com](https://wiki.sapsailing.com) and which lives at ``ssh://trac@sapsailing.com/home/trac/git``. |
|
| 25 | 12 | |
| 26 | - - For access to the external git at `ssh://trac@sapsailing.com/home/trac/git` please send your SSH public key to one of the project maintainers, requesting git access. Make sure to NOT generate the key using Putty. Putty keys don't work reliably under Linux and on Windows/Cygwin environments. Use ssh-keygen in a Cygwin or Linux or MacOS/X environment instead. For further instructions for generating an ssh-key see [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). |
|
| 13 | + - The primary Git repository for the project is hosted on Github (see [https://github.com/SAP/sailing-analytics](https://github.com/SAP/sailing-analytics)). To clone, use ``git@github.com:SAP/sailing-analytics.git``. To gain write access you have to become member of the [sailing-analytics-team](https://github.com/orgs/SAP/teams/sailing-analytics-team) organization. For that you need to [link your Github user to the Github SAP organization](https://wiki.one.int.sap/wiki/display/ospodocs/Self-Service+for+Joining+an+SAP+GitHub+Organization). We still have a shadow repository around that, e.g., powers our Wiki at [https://wiki.sapsailing.com](https://wiki.sapsailing.com) and which lives at ``ssh://trac@sapsailing.com/home/trac/git``. |
|
| 14 | + |
|
| 15 | + - In case you'd like to get access to the external git at `ssh://trac@sapsailing.com/home/trac/git` please send your SSH public key to one of the project maintainers, requesting git access. Make sure to NOT generate the key using Putty. Putty keys don't work reliably under Linux and on Windows/Cygwin environments. Use ssh-keygen in a Cygwin or Linux or MacOS/X environment instead. For further instructions for generating an ssh-key see [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). |
|
| 27 | 16 | Note: If you want to use the ssh-key in the context of our solution, it can be an RSA or ED25519 format. Example for creating a key: `ssh-keygen -t ed25519 -b 512 -C "test@test.com"`. Make sure to set a non-empty password for your key. |
| 28 | 17 | |
| 29 | 18 | 2. Bugzilla |
| 30 | 19 | |
| 31 | 20 | - Create an account at https://bugzilla.sapsailing.com |
| 32 | - - Ask the Bugzilla administrator (axel.uhl@sap.com) to enable your account for editing bugs |
|
| 33 | - - Bugzilla url: [https://bugzilla.sapsailing.com](https://bugzilla.sapsailing.com) |
|
| 21 | + - Ask a Bugzilla administrator (e.g., axel.uhl@sap.com) to enable your account for editing bugs |
|
| 22 | + - Bugzilla URL: [https://bugzilla.sapsailing.com](https://bugzilla.sapsailing.com) |
|
| 34 | 23 | |
| 35 | 24 | 3. Wiki |
| 36 | 25 | |
| 37 | -We have so far decided against migrating our existing Gollum-based Wiki to Github's Wiki pages. Therefore, for the time being, you can either push changes to the ``wiki/`` folder to the ``main`` branch of the repository from where they will make it to the Gollum-provided Wiki, or our can request a Gollum account to be created for you. This will also allow you to view non-public pages through [https://wiki.sapsailing.com](https://wiki.sapsailing.com). |
|
| 38 | - |
|
| 39 | -For a Gollum Wiki account send a request to Axel Uhl or Simon Marcel Pamies that includes the SHA1 hash of your desired password. Obtain such an SHA1 hash for your password here: [http://www.sha1-online.com/](http://www.sha1-online.com/). |
|
| 26 | + - We have so far decided against migrating our existing Gollum-based Wiki to Github's Wiki pages. Therefore, for the time being, you can either push changes to the ``wiki/`` folder to the ``main`` branch of the repository from where they will make it to the Gollum-provided Wiki, or our can request a Gollum account to be created for you. This will also allow you to view non-public pages through [https://wiki.sapsailing.com](https://wiki.sapsailing.com). |
|
| 27 | + - For a Gollum Wiki account send a request to Axel Uhl or Simon Marcel Pamies that includes the SHA1 hash of your desired password. Obtain such an SHA1 hash for your password here: [http://www.sha1-online.com/](http://www.sha1-online.com/). |
|
| 28 | + - Once our Github repository is switched to a "public" repository, we will change our Gollum configuration such that at least read-only access is granted for all pages also for anonymous users. |
|
| 40 | 29 | |
| 41 | 30 | 4. Hudson |
| 42 | 31 | |
| 43 | 32 | - Request a [Hudson](https://hudson.sapsailing.com) user by sending e-mail to Axel Uhl or Simon Marcel Pamies. |
| 44 | 33 | |
| 45 | 34 | ### Installations |
| 46 | - |
|
| 47 | 35 | 1. Eclipse IDE for Eclipse Committers, version ["2025-03"](https://www.eclipse.org/downloads/packages/release/2025-03/r/eclipse-ide-eclipse-committers). If you are using a Mac and want to use SAPJVM, this has to be the 64 bit version. This is because SAPJVM is not available for Apple Silicon Macs, and Eclipse's OS architecture must match the JVM architecture. |
| 48 | 36 | 2. JDK 1.8 (Java SE 8), ideal is the SAPJVM 1.8: Go to [https://tools.eu1.hana.ondemand.com/#cloud](https://tools.eu1.hana.ondemand.com/#cloud), scroll down to `SAP JVM` select your operating System, extract the downloaded .zip into desired location (e.g. Windows `C:\Program Files\Java`. If you want to make this your default JDK, set the `JAVA_HOME` variable to it. In any case, set the `JAVA8_HOME` variable to it which is required by a few build scripts where certain steps currently are not yet compatible with newer JDK releases, such as our Android build process, keeping us on Gradle 6.0.1 for the time being which isn't Java 17-compatible. |
| 49 | 37 | 3. Git (e.g. Git for Windows v2.18), [http://git-scm.com](http://git-scm.com) / [https://git-for-windows.github.io](https://git-for-windows.github.io)still |
| ... | ... | @@ -60,7 +48,7 @@ For a Gollum Wiki account send a request to Axel Uhl or Simon Marcel Pamies that |
| 60 | 48 | 9. Standalone Android SDK (see section "Additional steps required for Android projects"). OPTIONALLY: You may additionally install Android Studio ([https://developer.android.com/tools/studio/index.html](https://developer.android.com/tools/studio/index.html)) or IntelliJ IDEA ([https://www.jetbrains.com/idea/download/](https://www.jetbrains.com/idea/download/)). |
| 61 | 49 | Make sure that the environment variable `ANDROID_HOME` is set (e.g. Windows C:\Users\\**'user'**\AppData\Local\Android\Sdk ) |
| 62 | 50 | 10. Get the content of the git repository |
| 63 | - Clone the repository to your local file system from `ssh://[SAP-User]@git.wdf.sap.corp:29418/SAPSail/sapsailingcapture.git` or `ssh://trac@sapsailing.com/home/trac/git` User "trac" has all public ssh keys. |
|
| 51 | + Clone the repository to your local file system from `git@github.com:SAP/sailing-analytics.git` or `ssh://trac@sapsailing.com/home/trac/git` User "trac" has all public ssh keys. |
|
| 64 | 52 | 11. Install the eclipse plugins (see [Automatic Eclipse plugin installation](#onboarding-information_sap-sailing-analytics-development-setup_automatic-eclipse-plugin-installation)) |
| 65 | 53 | 12. Configure Eclipse (see [Tuning the Eclipse Installation](#onboarding-information_sap-sailing-analytics-development-setup_tuning-the-eclipse-installation)) |
| 66 | 54 | 13. Configure Maven to use the correct JRE by following the instructions in the paragraph [maven-setup](#onboarding-information_sap-sailing-analytics-development-setup_maven-setup) |
| ... | ... | @@ -71,14 +59,12 @@ For a Gollum Wiki account send a request to Axel Uhl or Simon Marcel Pamies that |
| 71 | 59 | |
| 72 | 60 | ### Further optional but recommended installations |
| 73 | 61 | |
| 74 | -1. Cygwin, [http://www.cygwin.com/](http://www.cygwin.com/) |
|
| 62 | +1. For Windows users, [Cygwin](http://www.cygwin.com/) or a [Git Bash](https://git-scm.com/downloads) may be useful for being able to run any Bash scripts. |
|
| 75 | 63 | Please note that when using one of the newer versions of Cygwin, your Cygwin home folder setting might differ from your Windows home folder. This will likely lead to problems when issuing certain commands. For troubleshooting, take a look at the following thread: [https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation](https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation) |
| 76 | 64 | 2. Eclipse Mylyn Bugzilla extension |
| 77 | 65 | 3. kdiff3 (git tool) |
| 78 | 66 | 4. Firebug (javascript & .css debugging, included in Firefox Developer Tools in newer versions of Firefox by default) |
| 79 | 67 | |
| 80 | - |
|
| 81 | - |
|
| 82 | 68 | ### Git repository configuration essentials |
| 83 | 69 | |
| 84 | 70 | The project has some configuration of line endings for specific file types in ".gitattributes". To make this work as intended, you need to ensure that the git attribute "core.autocrlf" is set to "false". This can be done by navigating to your local repository in a Bash/Git Bash/Cygwin instance and executing the command `git config core.autocrlf false`. |
| ... | ... | @@ -89,7 +75,7 @@ Depending on the location of your local repository, it's filepaths might be too |
| 89 | 75 | |
| 90 | 76 | ### Maven Setup |
| 91 | 77 | |
| 92 | -Copy the settings.xml (may be in $GIT_HOME/configuration/maven-settings.xml and $GIT_HOME/configuration/maven-settings.xml) **and** the toolchains.xml from the top-level git folder to your ~/.m2 directory. Adjust the proxy settings in settings.xml accordingly (suggested settings for corporate network inside). Set the paths inside of toolchains.xml to your JDKs depending on where you installed them (this is like setting the compiler for your IDE, but for Maven; This makes it possible to build with the same Maven configuration on every system). Make sure the mvn executable you installed above is in your path. |
|
| 78 | +Copy the settings.xml (may be in $GIT_HOME/configuration/maven-settings.xml and $GIT_HOME/configuration/maven-settings-proxy.xml) **and** the toolchains.xml from the top-level git folder to your ~/.m2 directory. Adjust the proxy settings in settings.xml accordingly (suggested settings for inside a corporate network requiring a HTTP proxy for access to external web). Set the paths inside of toolchains.xml to your JDKs depending on where you installed them (this is like setting the compiler for your IDE, but for Maven; This makes it possible to build with the same Maven configuration on every system). Make sure the mvn executable you installed above is in your path. |
|
| 93 | 79 | |
| 94 | 80 | ### Automatic Eclipse plugin installation |
| 95 | 81 | The necessary Eclipse plugins can be automatically installed into a newly unzipped version of ["2023-09"](https://www.eclipse.org/downloads/packages/release/2023-09/r/eclipse-ide-eclipse-committers) by using the `./configuration/pluginsForEclipse2025-03.p2f` file, found in the git repository cloned in _step 11_. To install the plugins open Eclipse and install Software Items from File. (File ⇒ Import ⇒ Install ⇒ Install Software from File). The description file is located at `/configuration/pluginsForEclipse2025-03.p2f`. |
| ... | ... | @@ -136,68 +122,39 @@ Go to Window ⇒ Preferences and change the following two settings: |
| 136 | 122 | - For Eclipse-based debugging of GWT web applications with SDBG, make sure that Chrome is set as your default browser: "General ⇒ Web Browser". If missing, add a profile for Chrome and specify "%URL%" as the parameter. |
| 137 | 123 | - Consider installing [https://marketplace.eclipse.org/content/protocol-buffer-editor](https://marketplace.eclipse.org/content/protocol-buffer-editor) for a Protocol Buffers (protobuf) editor |
| 138 | 124 | |
| 139 | -### Steps to build and run the Race Analysis Suite |
|
| 125 | +### Steps to build and run the Sailing Analytics |
|
| 140 | 126 | |
| 141 | -1. Check out the 'master' branch from the git repository. The 'master' branch is the main development branch. Please check that you start your work on this branch. |
|
| 127 | +1. Check out the ``main`` branch from the git repository. The ``main`` branch is the main development branch. Please check that you start your work based on this branch. |
|
| 142 | 128 | 2. Setup and configure Eclipse |
| 143 | 129 | - Import all Race Analysis projects from the `java/` subdirectory of the git main folder (make sure to import via the wizard [but without smart import] "Import ⇒ General ⇒ Projects from Folder or Archive" in Eclipse, and additionally make sure to scan for nested projects!) |
| 144 | - - Import all projects from the `mobile/` subdirectory of the git main folder; this in particular contains the race committee app projects |
|
| 145 | 130 | - In "Window ⇒ Preferences ⇒ Plug-in Development ⇒ Target Platform" set the Eclipse target platform to `Race Analysis Target` (located in com.sap.sailing.targetplatform/definitions//race-analysis-p2-remote.target) |
| 146 | 131 | - Wait until the target platform has been resolved completely |
| 147 | 132 | - Start a clean build (Project ⇒ Clean) |
| 148 | - |
|
| 149 | -3. On clear workspace additional steps should be performed once: |
|
| 133 | +3. To get a clean workspace, additional steps should be performed once: |
|
| 150 | 134 | 1. Run "GWT Dashboards SDM" launch configuration. After successful start, launch configuration can be stopped. |
| 151 | 135 | 2. Run "GWT Security SDM" launch configuration. After successful start, launch configuration can be stopped. |
| 152 | 136 | 3. Run "GWT xdStorage Sample SDM" launch configuration. After successful start, launch configuration can be stopped. |
| 153 | 137 | 4. Run the Race Analysis Suite |
| 154 | - 1. Start the MongoDB-Server |
|
| 138 | + 1. Ensure your local MongoDB Server is running; depending on your platform, maybe you can start your MongoDB using ``sudo systemctl start mongod``, or you may have to do something like: |
|
| 155 | 139 | 1. Create a folder for the mongoDB to store the data. For existing folders make sure they do not contain a `mongod.lock` file |
| 156 | 140 | 2. Open a terminal and navigate to the location of the MongoDB installation `cd /somePathTo MongoDBInstallation/mongodb/bin` |
| 157 | 141 | 3. Start the databse in the with the mongoDB Datafolder as db path: |
| 158 | 142 | `./mongod --dbpath /somePathTo/MongoDBDataDirectory` |
| 159 | 143 | 2. Run "GWT Sailing SDM" in the debug dropdown |
| 160 | - 3. Start the appropriate Eclipse launch configuration (e.g. 'Sailing Server (no Proxy)') You´ll find this in the debug dropdown |
|
| 144 | + 3. Start the appropriate Eclipse back-end launch configuration (in most cases 'Sailing Server (no Proxy)'). You´ll find this in the debug dropdown. |
|
| 161 | 145 | 5. Import races within the Race Analysis Suite |
| 162 | - - Choose "GWT Sailing SDM" in the "Development Mode" Tab and open "...AdminConsole.html..." (It is normal that the first try fails. Reload the page after the first try) |
|
| 146 | + - Choose "GWT Sailing SDM" in the "Development Mode" Tab and open "...AdminConsole.html...". This should open [http://127.0.0.1:8888/gwt/AdminConsole](http://127.0.0.1:8888/gwt/AdminConsole). (It is normal that the first try fails. Reload the page after the first try) |
|
| 163 | 147 | - Default Login: user "admin", password "admin" |
| 164 | 148 | - In the list on the left, click on "Connectors" |
| 165 | 149 | - For TracTrac Events: In the "TracTrac Connections" Form, fill in the JSON URL [http://germanmaster.traclive.dk/events/event_20120905_erEuropean/jsonservice.php](http://germanmaster.traclive.dk/events/event_20120905_erEuropean/jsonservice.php)(all other required information will be filled in automatically) |
| 166 | 150 | - Press "List Races" |
| 167 | - |
|
| 168 | - |
|
| 169 | 151 | 6. Further useful launch configurations |
| 170 | 152 | - Use SAP JVM Profiler. If you used the script above and installed the SAPJVM instead of the jdk, you can now open the profiling perspective by clicking on Window ⇒ Perspective ⇒ Open Perspective ⇒ Profiling) |
| 171 | 153 | - Debugging gwt: For further instructions please see [here](./development/super-dev-mode) |
| 172 | 154 | |
| 173 | 155 | If you want to use **breakpoints**, *avoid* clicking on the options in the Development Mode tab. Instead, within the _Debug Configurations_ menu, select the _Debug AdminConsole_ (found in the _Launch Browser_ subtab); change the browser search order, such that chrome is the leftmost; and then launch. This is necessary because SDBG is compatible with Chrome. Further, details of how GWT Super Dev Mode (SDM) works, can be found in the link above. |
| 174 | 156 | |
| 175 | - |
|
| 176 | -### Build for deployment |
|
| 177 | -Open a shell (preferrably a git bash or a cygwin bash), cd to the git workspace's root folder and issue "./configuration/buildAndUpdateProduct.sh build". This should build the software and run all the tests. If you want to avoid the tests being executed, use the -t option. If you only want to build one GWT permutation (Chrome/English), use the -b option. When inside the SAP VPN, add the -p option for proxy use. Run the build script without arguments to get usage hints. |
|
| 178 | - |
|
| 179 | - |
|
| 180 | - |
|
| 181 | -## Further hints |
|
| 182 | - |
|
| 183 | -If you are working with a linux-system and you get the error message `error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory` try to install lib32z1 and lib32stdc++6. |
|
| 184 | - |
|
| 185 | -### Steps to consider for using other modules |
|
| 186 | - |
|
| 187 | -1. For Eclipse Build |
|
| 188 | - - MANIFEST.MF , add module names unter dependencies |
|
| 189 | - - \*.gwt.xml , add `<inherits name="-modulename-.-gwt.xml file name-" />` |
|
| 190 | - - In DebugConfigurations => Classpaths, Add Sourcefolder where classes are you want to user from the module |
|
| 191 | -2. For Maven Build |
|
| 192 | - - pom.xml , Add Dependency to used module ie. |
|
| 193 | - `<dependency>` |
|
| 194 | - `<groupId>com.sap.sailing</groupId>` |
|
| 195 | - `<artifactId>com.sap.sailing.domain.common</artifactId>` |
|
| 196 | - `<version>1.0.0-SNAPSHOT</version>` |
|
| 197 | - `<classifier>sources</classifier>` |
|
| 198 | - `</dependency>` |
|
| 199 | - |
|
| 200 | -### Using Android Studio for Development |
|
| 157 | +### Using Android Studio for App Development (Only if You're Working on Mobile Apps) |
|
| 201 | 158 | |
| 202 | 159 | The Android Apps can be built in Android Studio or gradle command line. Android Studio is built on top of IntelliJ IDEA, so it is possible to use IntelliJ IDEA as well. |
| 203 | 160 | |
| ... | ... | @@ -227,6 +184,26 @@ The Android Apps can be built in Android Studio or gradle command line. Android |
| 227 | 184 | |
| 228 | 185 | If git is not in the Path system environment variable, the gradle build will not work. |
| 229 | 186 | |
| 187 | +## Further hints |
|
| 188 | + |
|
| 189 | +### Build for deployment |
|
| 190 | +Open a shell (preferrably a git bash or a cygwin bash), cd to the git workspace's root folder and issue "./configuration/buildAndUpdateProduct.sh build". This should build the software and run all the tests. If you want to avoid the tests being executed, use the -t option. If you only want to build one GWT permutation (Chrome/English), use the -b option. When inside the SAP VPN, add the -p option for proxy use. Run the build script without arguments to get usage hints. |
|
| 191 | + |
|
| 192 | +### Steps to consider for using other GWT modules |
|
| 193 | + |
|
| 194 | +1. For Eclipse Build |
|
| 195 | + - MANIFEST.MF, add module names under dependencies |
|
| 196 | + - \*.gwt.xml , add `<inherits name="-modulename-.-gwt.xml file name-" />` |
|
| 197 | + - In DebugConfigurations => Classpaths, Add Sourcefolder where classes are you want to user from the module |
|
| 198 | +2. For Maven Build |
|
| 199 | + - pom.xml , Add Dependency to used module ie. |
|
| 200 | + `<dependency>` |
|
| 201 | + `<groupId>com.sap.sailing</groupId>` |
|
| 202 | + `<artifactId>com.sap.sailing.domain.common</artifactId>` |
|
| 203 | + `<version>1.0.0-SNAPSHOT</version>` |
|
| 204 | + `<classifier>sources</classifier>` |
|
| 205 | + `</dependency>` |
|
| 206 | + |
|
| 230 | 207 | ### Git usage troubleshooting |
| 231 | 208 | |
| 232 | 209 | There are some inconsistencies regarding line endings (unix vs windows) in our git repository. There is a configuration named ".gitattributes" committed to the root folder of the repository that helps to prevent inconsistencies of line endings when committing files. Files that existed before are partially using unix (LF) or windows (CRLF) line endings. When committing files, git will ensure unix line endings for e.g. \*.java files. This can lead to big diffs that hurt when trying to merge/diff. |
| ... | ... | @@ -255,17 +232,18 @@ Irritating behavior can occur on ARM-based processors, such as on a MacBook. The |
| 255 | 232 | In such cases it might help to set AWT to headless mode (`-Djava.awt.headless=true`, see [stackoverflow](https://stackoverflow.com/questions/13796611/imageio-read-with-mac for more information)). |
| 256 | 233 | Another struggle can be to install the JVM Profiler Plug-in on ARM based Eclipse. It seems to block the necessary Software while the Automatic Eclipse plugin installation. One way is to use the Eclipse x64 Installer. It will take more time for transformation, but you will be able to use the Profiler. |
| 257 | 234 | |
| 258 | -### GWT Browser Plugin |
|
| 235 | +### GWT Browser Plugin |
|
| 236 | +This applies only if you try to get old "GWT Dev Mode" to work, support for which has ended on very old Firefox version 24. |
|
| 259 | 237 | Install the GWT Browser Plugin for the GWT Development mode. As of 2016-08-31 Firefox is the only browser supporting the GWT plugin, you have to download Firefox version 24 for it to work. The Plugin can be found on this page: [https://code.google.com/archive/p/google-web-toolkit/downloads](https://code.google.com/archive/p/google-web-toolkit/downloads) |
| 260 | 238 | |
| 261 | 239 | ### Create Hudson Job |
| 262 | 240 | If you want a hudson job to run when you push your branch then you can run a script in `configuration` called . Run options for a branch titled `createHudsonJobForBug.sh`. For you bug branch titled `bug<bug number>`, create a build job, which will create a release, by running the script like so: `./createHudsonJobForBug.sh <bug number>`. |
| 263 | -If on Windows, you may need to disable any web shields in antivirus software, to allow `curl` to function. If on Mac, you may need to install gnu-sed. |
|
| 241 | +If on Windows, you may need to disable any web shields in antivirus software, to allow `curl` to function. If on Mac, you may need to install gnu-sed (``gsed``) via Homebrew. |
|
| 264 | 242 | |
| 265 | 243 | ### Issues when playing around with AWS |
| 266 | 244 | - The problem: **aws cli (used for aws ec2 describe-tags) hangs in eu-west-2** in all AZs on new instances I created, using a target group which permitted all outbound connections and inbound https, http and ssh connections. I tried permitting everything but that didn’t work. When I attached (at Axel’s suggestion) the Java Application with Reverse Proxy security group, it worked but — even if I duplicated this security group, and applied that copy instead — it still didn’t work. |
| 267 | 245 | Curl issue solution: it turns out that the network interface only permits certain outbound and inbounds from certain target groups. |
| 268 | -The path to the solution: On my instance in eu-west-2a, I ran aws --debug ec2 describe-tags (you may need to do aws configure first). This is much akin to verbose mode of other unix commands. I noticed it hang on a request to ec2.eu-west-2.amazonaws.com. If you do `dig -t any ec2.eu-west-2.amazonaws.com` you see 3 ip addresses, which — as you will see later — are IPs in each of the eu-west-2 availability zones. When I ran curl -v ec2.eu-west-2.amazonaws.com (the v flag is verbose), one of the IPs from dig was used (namely the one in eu-west-2a, where the instance resides) and it hangs. I then went to endpoints for the VPC and noticed a service for the service `com.amazonaws.eu-west-2.ec2`. It had the default security group, which turned out to only allow inbound rules from the default or Java Application with Reverse Proxy target group. |
|
| 246 | +The path to the solution: On my instance in eu-west-2a, I ran aws --debug ec2 describe-tags (you may need to do aws configure first). This is much akin to verbose mode of other unix commands. I noticed it hang on a request to ec2.eu-west-2.amazonaws.com. If you do `dig -t any ec2.eu-west-2.amazonaws.com` you see 3 ip addresses, which — as you will see later — are IPs in each of the eu-west-2 availability zones. When I ran curl -v ec2.eu-west-2.amazonaws.com (the v flag is verbose), one of the IPs from dig was used (namely the one in eu-west-2a, where the instance resides) and it hangs. I then went to endpoints for the VPC and noticed a service for the service `com.amazonaws.eu-west-2.ec2`. It had the default security group, which turned out to only allow inbound rules from the default or Java Application with Reverse Proxy target group. |
|
| 269 | 247 | - Problem: A load balancer's target group health checks fail. I was told the checks failed with 403 errors. |
| 270 | 248 | Solution: This was occurring because the website didn't have any content in the /var/www/html. Whilst a site was still served (namely the Apache test page) it does throw a 403 error. If you fill the directory with and index.html the test then passes and a 200 code is returned |
| 271 | 249 | - Problem: Target platform reload in Eclipse. Sometimes reloading via Window -> Plug-in Development -> Target Platform doesn't work, so open the target definition itself and try reloading there. Often a restart proves helpful after the reload. In addition, you can clean all projects and rebuild; then rebuild the individual projects that fail. Sometimes the errors are actually just warnings and you can try to run the GWT SDM (remember the other SDM's must be run if everything is brand new). Lastly, try clearing the plugins content found at `WORKSPACE_HOME/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins`. |
wiki/info/landscape/amazon-ec2.md
| ... | ... | @@ -139,7 +139,21 @@ In addition to a default re-direct for the "/" path, the following four ALB list |
| 139 | 139 | - if the request method is ``GET`` then forward to the public target group |
| 140 | 140 | - forward all other request for the hostname to the master target group |
| 141 | 141 | |
| 142 | -### MongoDB Replica Sets |
|
| 142 | +### Web Application Firewall (WAF) and Web ACLs for Geoblocking |
|
| 143 | + |
|
| 144 | +In order to be able to block requests from certain regions or countries based on sanctions or other bans, as well as to see improved statistics about web requests hitting the site (such as the country from where requests originate, or a classification of bot vs. non-bot requests) across all our application load balancers (ALBs), we can use the AWS Web Application Firewall (WAF) and its Web Access Control Lists (Web ACLs). These Web ACLs are defined per AWS Region, so in case of a cross-region scenarios like the Olympic Summer Games, Web ACLs have to be defined in each region supported. |
|
| 145 | + |
|
| 146 | +As of today, we are required to block access from Russia, Belarus, North Korea, and Iran. |
|
| 147 | + |
|
| 148 | +Any geo-blocking Web ACL that shall automatically be associated with ALBs that are created through our landscape automation have to be tagged with tag key ``web-acl-purpose`` (see ``LandscapeConstants.WEB_ACL_PURPOSE_TAG``) with value ``geoblocking`` (see ``LandscapeConstants.WEB_ACL_GEOBLOCKING_PURPOSE``). Tagging a Web ACL, as of this writing, is not possible through the AWS Web Console but only through the command line interface (CLI) or API. A command-line way to tag a Web ACL accordingly would look like this (adjust your Web ACL's ARN...): |
|
| 149 | +``` |
|
| 150 | + aws wafv2 tag-resource \ |
|
| 151 | + --resource-arn arn:aws:wafv2:eu-west-1:017363970217:regional/webacl/GeoBlocking/1f1c421e-994c-4c67-ba15-75375448c5c5 \ |
|
| 152 | + --tags Key=web-acl-purpose,Value=geoblocking |
|
| 153 | +``` |
|
| 154 | +Note that in order to run this command you have to have valid credentials for the AWS region you're targeting with the request. Also consider using the ``--region`` argument if you're trying to tag a Web ACL in a region other than your AWS CLI's default region. Check your ``~/.aws/config`` file. Also see ``configuration/environments_scripts/repo/usr/local/bin/awsmfalogon.sh`` for logging on to the AWS CLI. |
|
| 155 | + |
|
| 156 | +### MongoDB Replica Setsn |
|
| 143 | 157 | |
| 144 | 158 | There are currently three MongoDB replica sets: |
| 145 | 159 | |
| ... | ... | @@ -607,7 +621,7 @@ The `crontab-update-authorized-keys@HOME_DIR` snippet has a randomized sleeping |
| 607 | 621 | |
| 608 | 622 | ## Legacy Documentation for Manual Operations |
| 609 | 623 | |
| 610 | -Most of the things that follow should be obsolete by now because the [automated procedures](#amazon-ec2-for-sap-sailing-analytics_automated-procedures) should avoid the need for manual steps. Yet, should automatic procedures fail or should a deeper understanding of the things that have been automated become necessary, the following documentation may still be of value. |
|
| 624 | +Most of the things that follow should be obsolete by now because the [automated procedures](#automated-procedures) should avoid the need for manual steps. Yet, should automatic procedures fail or should a deeper understanding of the things that have been automated become necessary, the following documentation may still be of value. |
|
| 611 | 625 | |
| 612 | 626 | #### Starting an instance |
| 613 | 627 |
wiki/info/landscape/development-environment.md
| ... | ... | @@ -2,33 +2,41 @@ |
| 2 | 2 | |
| 3 | 3 | [[_TOC_]] |
| 4 | 4 | |
| 5 | -## Git and Our Branches |
|
| 6 | -Our main Git repository lives at ssh://<user>@sapsailing.com/home/trac/git. For those working in the SAP corporate network and therefore unable to access the external sapsailing.com server using SSH, the repository contents are replicated on an hourly basis into ssh://dxxxxxx@git.wdf.sap.corp:29418/SAPSail/sapsailingcapture.git where dxxxxxx obviously is to be replaced by your D- or I- or C-user. You need to have an account at https://git.wdf.sap.corp:8080/ to be able to access this Git repository. |
|
| 5 | +Here, we describe the process for doing simple standard development for the Sailing Analytics project, with a focus on how we handle Git w.r.t. branches, Bugzilla, Hudson-CI, and Github Actions. Other development scenarios you'll find described in more depth [[here|wiki/info/landscape/typical-development-scenarios]]. |
|
| 7 | 6 | |
| 8 | -Small, obvious and non-disruptive developments are usually carried out immediately on our master branch. This branch is configured such that Maven can be used to run the tests inside the SAP corporate network. The master branch is never deployed onto the sapsailing.com server and hence has no corresponding /home/trac/servers/ subdirectory. |
|
| 7 | +## Git, Bugzilla, and Our Branches |
|
| 8 | +Our main Git repository lives at github.com/SAP/sailing-analytics. Its ``main`` branch is mirrored to ssh://trac@sapsailing.com/home/trac/git periodically. |
|
| 9 | 9 | |
| 10 | -If a change looks reasonably good on the master branch and related JUnit tests or manual UI tests have succeeded locally, it is permissible to merge the master branch into the dev branch and run a central build on sapsailing.com. The dev branch is configured to run the Maven tests with direct Internet access. It can therefore also be used to run the tests locally if connected to the public Internet. |
|
| 10 | +Small, minor, obvious and non-disruptive developments are usually carried out immediately on our ``main`` branch. |
|
| 11 | 11 | |
| 12 | -Ideally, the build should be run including the test cases. If the tests succeed , the branch can be installed and the corresponding server instance can be restarted. The branch can then also be promoted to the next level (dev-->test-->prod1/prod2). Note, that currently re-starting a server instance may require re-loading the races that were previously loaded, particularly for the prod1 and prod2 instances, because several externally-announced URLs point to them. |
|
| 12 | +Everything else should follow the pattern |
|
| 13 | +- create Bugzilla issue (e.g., issue #12345) |
|
| 14 | +- create branch for Bugzilla issue ``bug12345``, typically branching from latest ``main`` tip |
|
| 15 | +- create Hudson job for branch using ``configuration/createHudsonJobForBug.sh 12345`` |
|
| 16 | +- make your changes on your branch and commit and push regularly |
|
| 17 | +- pushing triggers the [release workflow](https://github.com/SAP/sailing-analytics/actions/workflows/release.yml) which runs a build with tests |
|
| 18 | +- when the workflow has finished, it triggers your Hudson job which collects the [build and test results](https://hudson.sapsailing.com/job/bug12345) |
|
| 19 | +- be verbose and document your changes, progress, hold-ups and problems on your Bugzilla issue |
|
| 20 | +- when build is "green," suggest your branch for review; so far we do this informally by assigning the Bugzilla issue to the reviewer and in a comment asking for review; in the future, we may want to use Github Pull Requests for this |
|
| 21 | +- after your branch has been merged into ``main``, disable your Hudson build job for your branch |
|
| 22 | +- the ``main`` branch will then build a new release that you can roll out into the production landscape |
|
| 23 | +- in case of changes to i18n-related message properties files, merge ``main`` into ``translation`` which triggers the translation process; the completed translations will arrive as pushes to the ``translations`` branch, triggering another ``release`` workflow, and---if successful---an automated merge into ``main`` with the corresponding build/release process happens, based on the [translation Hudson job](https://hudson.sapsailing.com/job/translation/configure)'s special logic |
|
| 24 | +- a successful ``main`` build (still on Java 8) will lead to an automatic merge into one or more branches for newer Java releases (such as ``docker-24``) with the corresponding build/release process |
|
| 13 | 25 | |
| 14 | -We typically promote the changes to the next branch by also merging the current master branch into the next-"higher" branch. This should lead to equivalent results compared to merging the "previous" branch (e.g., dev) into the "next" branch (e.g., test). The branches differ largely in the configurations used for the servers, particularly the port assignments for the Jetty web server, the UDP ports used for listening for Expedition wind messages, and the queue names used for the replication based on RabbitMQ (see also Scale-Out through Replication). |
|
| 26 | +Be eager to equip your features and functions with tests. There should be enough examples to learn from. For UI testing, use Selenium (see the ``java/com.sap.sailing.selenium.test`` project). |
|
| 15 | 27 | |
| 16 | -## Eclipse Setup, Required Plug-Ins |
|
| 17 | -We use Eclipse as our development environment. Using a different IDE would make it hard to re-use the project configurations (.project and .classpath files which are specific to Eclipse) as well as the GWT plug-in which assists in locally compiling and refactoring the GWT code, in particular the RPC code. |
|
| 18 | - |
|
| 19 | -The recommended and tested Eclipse version is currently Indigo (3.7). Colleagues have reported that they succeeded with a Juno (3.8/4.x) set-up as well. |
|
| 20 | - |
|
| 21 | -To get started, install Eclipse with at least PDE, Git, GWT (use http://dl.google.com/eclipse/plugin/3.7 as update site) and JSP editing support enabled. Eclipse Maven support is not recommended as in many cases it has caused trouble with the local Eclipse build. |
|
| 22 | - |
|
| 23 | -## Target Platform |
|
| 24 | -After the Eclipse installation and importing all projects under java/ from Git, it is required to set the target platform in Eclipse (Window --> Preferences --> Plugin Development --> Target Platform). The project com.sap.sailing.targetplatform contains "Race Analysis Target (IDE)" as target platform definition. It uses a number of p2 update sites and defines the OSGi bundles that constitute the target platform for the application. If this is not set in Eclipse, the local build environment assumes that the developer wants to implement Eclipse plug-ins and offers the entire set of Eclipse plug-ins and only those as the target platform which doesn't make any sense for our application. |
|
| 28 | +### Exceptionally Building Without Running Tests, More/Fewer CPUs, and With Release |
|
| 29 | +Ideally, the build should be run including the test cases. However, for exceptional cases you can trigger a build using the ``release`` workflow in Github Actions manually and can choose to ignore tests, change the number of CPUs to use for the build, and run the build with an OSGi target platform built according to the specifications of the branch you're building from. |
|
| 25 | 30 | |
| 26 | -Major parts of our target platform are hosted on sapsailing.com as a p2 repository which makes it possible to have only one central target platform configuration used by everyone. The target platform can be re-built, e.g., after adding another bundle to it, using the script in com.sap.sailing.targetplatform/scripts. |
|
| 31 | +Furthermore, if you push your branch, say ``bug12345`` to ``releases/bug12345`` then the Github Actions build triggered by the push will also build and publish a release (currently published on [https://releases.sapsailing.com](https://releases.sapsailing.com)) named after your branch. You can use such as release, e.g., to deploy it to a staging server such as [https://dev.sapsailing.com](https://dev.sapsailing.com). |
|
| 27 | 32 | |
| 28 | -It then needs to be installed again (by using a tool like scp for instance) to the /home/trac/p2-repositories directory from where it is exposed as http://p2.sapsailing.com/p2/sailing/ by the Apache web server. After such a change, all developers need to reload the target platform into their Eclipse environment. |
|
| 33 | +## Eclipse Setup, Required Plug-Ins |
|
| 34 | +The Eclipse setup is explained in our [[Onboarding|wiki/howto/onboarding]] description. |
|
| 29 | 35 | |
| 30 | 36 | ## Maven Build and Tests |
| 31 | -We use Maven to build our software and run our JUnit tests. The global setting.xml file to install in everyone's ~/.m2 directory is checked into the top-level Git folder. The checked-in copy assumes the developer is using Maven inside the SAP corporate network. If not, uncomment the <proxy> tag in the settings.xml file. See also section Git and Our Branches for details on which branch is configured to work in which network setup. |
|
| 37 | +We recommend using a local Maven-based build only if you try to understand or reproduce issues with the Github Actions build. In most other cases you should be fine using Eclipse with its local build/run/debug cycle. |
|
| 38 | + |
|
| 39 | +If you still feel you want to run a local Maven build, make sure again (see also [[Onboarding|wiki/howto/onboarding]]) to get your ``maven-settings.xml`` and ``toolchains.xml`` files in ``~/.m2`` in good shape first. |
|
| 32 | 40 | |
| 33 | 41 | We have a top-level Maven pom.xml configuration file in the root folder of our Git workspace. It delegates to the pom.xml file in the java/ folder where all the bundle projects are defined. We rely on the Tycho Maven plug-in to build our OSGi bundles, also known as the "manifest-first approach." The key idea is to mainly develop using Eclipse means, including its OSGi manifest editing capabilities, and keep the Maven infrastructure as simple as possible, deriving component dependencies from the OSGi manifests. See the various pom.xml files in the projects to see the project-specific settings. By and large, a pom.xml file for a bundle needs to have the bundle name and version defined (we currently have most bundles at version 1.0.0.qualifier in the manifest or 1.0.0.SNAPSHOT in Maven), and whether the bundle is a test or non-test bundle, expressed as the packaging type which here can be one of eclipse-plugin or ecplise-test-plugin. |
| 34 | 42 | |
| ... | ... | @@ -52,18 +60,9 @@ When building on sapsailing.com you should stick with the buildAndUpdateProduct. |
| 52 | 60 | |
| 53 | 61 | All these build lines also creates a log file with all error messages, just in case the screen buffer is not sufficient to hold all scrolling error messages. |
| 54 | 62 | |
| 55 | -## Automated Builds using Hudson |
|
| 56 | - |
|
| 57 | -The project uses a Hudson build server installation that can be reached at [hudson.sapsailing.com](http://hudson.sapsailing.com). Please ask a project administrator for an account. This Hudson server builds all new commits pushed to the master branch, performs the JUnit tests and publishes the JUnit test results. New jobs for other branches can easily be created by copying from the SAPSailingAnalytics-master job and updating the git branch to be checked out for build. This way, you can create your own job for your own branch. Don't forget to set yourself as the e-mail recipient for failing builds. |
|
| 58 | - |
|
| 59 | -As a special feature, release builds can automatically be performed and published to [releases.sapsailing.com](http:///releases.sapsailing.com) by pushing the tag named "release" to the version that you want to release. This can be done using the following series of git commands: |
|
| 63 | +When you're done with your local Maven build, finally run "mvn clean" to clean up the artifacts produced by the Maven build. Without this, remnants and outputs from the Maven build may collide with the local Eclipse build, such as JAR files that ended up in projects' ``bin/`` folders. |
|
| 60 | 64 | |
| 61 | - git tag -f release |
|
| 62 | - git push origin release:release |
|
| 63 | - |
|
| 64 | -You can follow the build triggered by this [here](http://hudson.sapsailing.com/job/SAPSailingAnalytics-release/). |
|
| 65 | - |
|
| 66 | -### Plotting test results with the Measurement Plugin |
|
| 65 | +## Plotting test results with the Measurement Plugin |
|
| 67 | 66 | |
| 68 | 67 | By default the duration of each test is published and can be viewed in comparison with older builds. It is possible to publish other values using the Measurement Plugin, which reads them out of a `MeasurementXMLFile`. |
| 69 | 68 | |
| ... | ... | @@ -72,19 +71,3 @@ MeasurementXMLFile performanceReport = new MeasurementXMLFile("TEST-" + getClass |
| 72 | 71 | MeasurementCase performanceReportCase = performanceReport.addCase(getClass().getSimpleName()); |
| 73 | 72 | performanceReportCase.addMeasurement(new Measurement("MeasurementName", measurementValue)); |
| 74 | 73 | ``` |
| 75 | - |
|
| 76 | -## Product, Features and Target Platform |
|
| 77 | -The result of the build process is a p2 repository with a product consisting of a number of features. The product configuration is provided by the file raceanalysis.product in the com.sap.sailing.feature.p2build project. In its dependencies it defines the features of which it is built, which currently are com.sap.sailing.feature and com.sap.sailing.feature.runtime, each described in an equal-named bundle. The feature specified by com.sap.sailing.feature lists the bundles we develop ourselves as part of the project. The com.sap.sailing.feature.runtime feature lists those 3rd-party bundles from the target platform which are required by the product. |
|
| 78 | - |
|
| 79 | -The [target platform](#development-environment_target-platform) is defined in the various flavors for local and central environments in com.sap.sailing.targetplatform/definitions/*.target. It mainly uses Eclipse p2 repositories and our own p2 repository at http://p2.sapsailing.com/p2/sailing/ where we store those bundles required by our runtime which cannot be found as OSGi bundles in any other public p2 repository of which we are aware. |
|
| 80 | - |
|
| 81 | -This p2 repository at sapsailing.com can be re-built and correspondingly extended by the process explained [here](wiki/typical-development-scenarios#Adding-a-Bundle-to-the-Target-Platform). |
|
| 82 | - |
|
| 83 | -## External Libraries |
|
| 84 | - |
|
| 85 | -### Highcharts and jQuery |
|
| 86 | -We use the Highcharts library to present graphs to the user. These graphs are used on the RaceBoardPanel and (at the time of writing still under development) the PolarSheetsPanel. In the past, there were difficulties concerning the versions of the three interacting libraries: |
|
| 87 | - |
|
| 88 | -* The GWT Highcharts Wrapper – The source code can be found in our project and it’s slightly modified to match our scenario |
|
| 89 | -* The actual Highcharts Library |
|
| 90 | -* The jQuery Library |
|
| ... | ... | \ No newline at end of file |
wiki/info/landscape/typical-development-scenarios.md
| ... | ... | @@ -2,8 +2,37 @@ |
| 2 | 2 | |
| 3 | 3 | [[_TOC_]] |
| 4 | 4 | |
| 5 | -## Adding a Bundle |
|
| 6 | -We distinguish two cases: adding a 3rd-party bundle to the target platform and adding a new development bundle as a Java project. |
|
| 5 | +## Adding a New Boat Class |
|
| 6 | + |
|
| 7 | +Support for different boat classes comes with the following aspects: |
|
| 8 | +* Name and possible alias names for the boat class |
|
| 9 | +* hull dimensions |
|
| 10 | +* separate downwind sail configuration for display |
|
| 11 | +* boat class symbol / icon |
|
| 12 | +* map visualization |
|
| 13 | + |
|
| 14 | +If you'd like to add a boat class that the system does not yet support with its own boat class symbol or even a separate, new boat visualization on the map, the necessary extensions currently need to me implemented as code. |
|
| 15 | + |
|
| 16 | +To start with, add an enumeration literal for the new class in [BoatClassMasterdata](https://github.com/SAP/sailing-analytics/blob/main/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/BoatClassMasterdata.java). The constructor needs to tell the default boat class name, whether races in this class typically have an upwind start (in which case we'll be more confident in guessing wind direction for races in this class based on the first leg's bearing), the hull length and beam in meters, the hull type, whether or not boats of that class fly a separate downwind sail, and optionally a list of alternative boat class names that can help users find the class, or to reflect name changes over time (Laser becoming ILCA, for example). |
|
| 17 | + |
|
| 18 | +To understand the next steps, you may also search your workspace for usages of other ``BoatClassMasterdata`` enumeration literals. You will typically find at least two more: one in [BoatClassImageResolver](https://github.com/SAP/sailing-analytics/blob/main/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java) which helps define the boat class symbol / icon to be displayed in the UI and made available through the REST API, e.g., for the companion apps; and another in [BoatClassVectorGraphicsResolver](https://github.com/SAP/sailing-analytics/blob/main/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/shared/racemap/BoatClassVectorGraphicsResolver.java) which defines how boats of this class are to be visualized on the map. |
|
| 19 | + |
|
| 20 | +For the boat class symbol you have to create a transparent 140x140 pixel PNG file and place it in the ``java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/ui/client/images/boatclass`` folder. The file's base name must match the ``BoatClassMasterdata`` enumeration literal you created _exactly_. The file extension shall be ``.png``. Then, define a GWT image resource in [BoatClassImageResolver](https://github.com/SAP/sailing-analytics/blob/main/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/client/BoatClassImageResolver.java), using one of the other resource definitions in that class as an example: |
|
| 21 | +``` |
|
| 22 | + @Source("com/sap/sailing/gwt/ui/client/images/boatclass/FINN.png") |
|
| 23 | + @ImageOptions(preventInlining = true) |
|
| 24 | + ImageResource FinnIcon(); |
|
| 25 | +``` |
|
| 26 | +In ``BoatClassImageResolver`` then use this image resource, e.g., as follows: |
|
| 27 | +``` |
|
| 28 | + boatClassIconsMap.put(BoatClassMasterdata.FINN.getDisplayName(), imageResources.FinnIcon()); |
|
| 29 | +``` |
|
| 30 | +If any of the already existing boat class map visualizations work for your new class, simply add your new enumeration literal to the ``BoatClassVectorGraphics`` constructor in ``BoatClassVectorGraphicsResolver``'s static initializer that best matches your boat class. If you feel you need a better, more specific boat class visualization on the map, you'll have to [[implement your own|wiki/howto/development/boatgraphicssvg.md]] ``BoatClassVectorGraphics`` class and use that in the static initializer of ``BoatClassVectorGraphicsResolver``. |
|
| 31 | + |
|
| 32 | +Mention the new boat class in the release notes, and don't forget to add all new files to your Git index before committing ;-). |
|
| 33 | + |
|
| 34 | +## Adding an OSGi Bundle |
|
| 35 | +Make sure you have read [[Workspace, Bundles, Projects|wiki/info/general/workspace-bundles-projects-structure]] before continuing. We distinguish two cases: adding a 3rd-party bundle to the target platform and adding a new development bundle as a Java project. |
|
| 7 | 36 | |
| 8 | 37 | ## Adding a Bundle to the Target Platform |
| 9 | 38 | * Add a New Library which can not be found in any SAP Repository |
| ... | ... | @@ -26,7 +55,8 @@ Bundle-Version: 3.6.4 |
| 26 | 55 | * Currently this scripts work for the cygwin shell and the git bash, if the path to your files in the target definition is incorrect, this may be the reason. |
| 27 | 56 | * Test the new overall target platform |
| 28 | 57 | * by setting the race-analysis-p2-local.target as target platform in the IDE |
| 29 | - * by running the local maven build via ''buildAndUpdateProduct.sh -v build'' (the ''-v'' switch builds and uses the local p2 repository) |
|
| 58 | + * by running the ``release`` workflow on Github using the "Build with a local target platform (set to "true" to use local target platform)" switch, or |
|
| 59 | + * run the local maven build via ''buildAndUpdateProduct.sh -v build'' (the ''-v'' switch builds and uses the local p2 repository) |
|
| 30 | 60 | * The admin of the central p2 repository (currently at sapsailing.com) must now replace the content of the central server /home/trac/p2-repositories/sailing with the content of the new local base p2 repository (com.sap.sailing.targetplatform.base/target/repository), using the 'uploadRepositoryToServer.sh' script |
| 31 | 61 | * Reload the target platform in the IDE |
| 32 | 62 |
wiki/info/landscape/usermanagement.md
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | This document describes the basics of how the Shiro framework has been selected and is being used to implement role-based access control. See [Permission Concept](/wiki/info/security/permission-concept) to understand how, based on Shiro, a security architecture with user groups, users, qualified roles, ownerships and access control lists works. |
| 4 | 4 | |
| 5 | -As a feature of the Sports Sponsorships Engine (SSE) which underlies the SAP Sailing Analytics, our Tennis engagements, parts of the Equestrian contributions and in the future perhaps more, we are about to introduce user management to the platform. Based on [Benjamin Ebling's Bachelor thesis](/doc/theses/20140915_Ebling_Authentication_and_Authorization_for_SAP_Sailing_Analytics.pdf) we are introducing [Apache Shiro](http://shiro.apache.org) to the platform. Our Bugzilla has a separate [component for User and Account Management](http://bugzilla.sapsailing.com/bugzilla/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=User%20and%20Account%20Management&product=Sailing%20Race%20Analytics) that documents the open issues. |
|
| 5 | +As a feature of the Sports Sponsorships Engine (SSE) which underlies the Sailing Analytics, our Tennis engagements, parts of the Equestrian contributions and in the future perhaps more, we are about to introduce user management to the platform. Based on [Benjamin Ebling's Bachelor thesis](/doc/theses/20140915_Ebling_Authentication_and_Authorization_for_SAP_Sailing_Analytics.pdf) we are introducing [Apache Shiro](http://shiro.apache.org) to the platform. Our Bugzilla has a separate [component for User and Account Management](http://bugzilla.sapsailing.com/bugzilla/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=User%20and%20Account%20Management&product=Sailing%20Race%20Analytics) that documents the open issues. |
|
| 6 | 6 | |
| 7 | 7 | [[_TOC_]] |
| 8 | 8 | |
| ... | ... | @@ -133,6 +133,12 @@ The `LoginPanel` component may be used by applications to display sign-up/sign-i |
| 133 | 133 | |
| 134 | 134 | We plan to turn the `UserManagementPanel` which is the widget behind the `UserManagementEntryPoint` into a drop-in component for a generalized administration console concept. So, when the AdminConsole becomes an SSE concept then the user management tab can be made available to all applications using the AdminConsole concept. See also bugs [2424](http://bugzilla.sapsailing.com/bugzilla/show_bug.cgi?id=2424) and [2425](http://bugzilla.sapsailing.com/bugzilla/show_bug.cgi?id=2425). |
| 135 | 135 | |
| 136 | +## Authorization Checks |
|
| 137 | + |
|
| 138 | +We generally check authorizations in our GWT RPC service implementations, and in our REST API service implementations. As a common pattern, both these types of service implementations will start with performing the necessary authorization check, and only then obtain an underlying OSGi service, such as ``RacingEventService`` for sailing-related things, or ``SecurityService`` for security, user, role and permission management, and invoke the actual "business logic." This keeps our business logic mostly free of authorization checks. |
|
| 139 | + |
|
| 140 | +This also means that filtering responses based on the permissions happens not in the business logic but at the "API level," so in the GWT RPC service method implementation or the REST API servlet method implementation. |
|
| 141 | + |
|
| 136 | 142 | ## Sample Session |
| 137 | 143 | |
| 138 | 144 | When you try to reach a protected resource without having the necessary permissions, Shiro will redirect you to the sign-in page. |