INT Deploy and Rollout
As for the int System we do not perform a real release, but just a snapshot deploy, we call it "int deploy and rollout".
Step 1: Clone repos / checkout projects
Checkout the int branches of all projects, that should be released:
Check that all needed projects are listed here:
gedit /common/usr/lsa/bin/mkws/checkout.reactor &
Perform the checkout of the int branche of those projects:
/common/usr/lsa/bin/mkws/checkout.reactor --ssh --flat -b int -p /common/scratch/cscoap/$USER/int/
checkout.reactor.jutta löschen und in checkout.reactor aufnehmen. Das sollte die maximale Projektliste sein.
Step 2: Deploy
For the deploy and rollout, we also first have to adapt the project list of the (
cscoap-reactor). This project has been checked out in step 1
cd /common/scratch/cscoap/$USER/int/
git clone https://git.acc.gsi.de/schaller/scripts
cd cscoap-reactor
../scripts/mvn/mvn_reactor_release_int -rv 16.0.0-RC-INT-SNAPSHOT -dv 16.0.0-RC-INT-SNAPSHOT
Note: If projects fail here, the order of deployment may no longer be correct afterwards. To mitigate this, just comment out / remove the succeeded projects from the reactor, before you start the script again.
release.properties file erzeugen anfangs mit der richtigen Reihenfolge. Dieses beim Release benutzen, statt die Reihenfolge neu zu ermitteln. Dann sollte auskommentieren der erfolgreichen Module nicht mehr nötig sein.
Step 3: Rollout of applications on int
ssh websvcint
First adapt the list of applications, for which the rollout should be performed.
vi /common/usr/cscoap/bin/rolloutAll
(vi commands: insert with "Esc + I" and save with "Esc : wq" plus Enter.)
and perform the rollout:
/common/usr/cscoap/bin/rolloutAll int
If the rollout for single applications should be performed lateron, e.g. for quick fixes during the integration test, you can use the standard rollout script.
rollout de.gsi.fcc.applications:requester-app:16.0.0-RC-INT-SNAPSHOT --repo csco-snapshot
Step 4: Rollout of LSA server
ssh vmla003
[user@vmla003 ~]$ sudo -u bob bash
[bob@vmla003 bin]$ lsaServer --stop --rollout=16.0.0 --start # (eventually without --stop, if this fails)
Step 5: Rollout of LSA REST service
ssh restint00a
# before executing: edit lsa_rest_servlet_download_version script if necessary, see below
/common/usr/lsa/bin/lsa_rest_servlet_download_version
If there are new API versions of LSA REST, or if the Maven version number must be adapted, first edit the lsa_rest_servlet_download_version Script to update the version number and afterwards run the Script.
On INT, there is usually no need to edit the script.
Step 6: Jenkins
First update the Project list in the projects.int file and then call the Jenkins upload.
cd /common/scratch/cscoap/$USER/int/scripts/jenkins/
./jenkins.sh -b int -p projects.int
Step 6 (optional): Adapt the int launcher entries
The so-called INT-Launcher is actually a productive version of the launcher running, but with a specific config file for the int applications. The config of this launcher can be edited
TODOs
Create a release repository and put all scripts there
Rechteprüfung evtl. automatisch ? Sonst oben schreiben, dass man Rechte auf bss-Orga und CERN (!!!??!!) braucht. Überlegung: 2 Reactoren, eine Person vom LSA Team released den unteren Teil (CERN, BSS, dafür notwendige Projekte)
Evtl. Christoph: für den Release das Snapshot-Repo disablen können, dazu müsste es in der globalen Maven Config separat eingetragen sein
Precondition for Release: delete local .m2 repo (or at least cern. and de.gsi.)
Idee: eine Liste mit Dependency Version Konflikten am Anfang für alle Projekte erzeugen und rausschreiben.
Jenkins Ordner disablen, DB hochziehen, Releasen, Jenkins enablen
lsa-rest-gsi-v2, ich musste die child module pom selbst die Version ersetzen, hat das Script nicht automatisch gemacht
--
JuttaFitzek - 23 Oct 2020