This tool watches scala/scala for new commits and starts a run of our benchmark suite for every merge commit. The UI is at scala-ci.typesafe.com/benchq.
Running on the "influxdb" EC2 node, which does not have a static IP or hostname. Add the following to your .ssh/config
to tunnel through jenkins-master:
Host jenkins-master
HostName 54.67.111.226
User admin
Host jenkins-grafana
HostName 172.31.0.100
User ubuntu
ProxyCommand ssh -q -W %h:%p jenkins-master
Stop the service, log in as ubuntu
(the admin user):
ssh ubuntu@jenkins-grafana
sudo sv down benchq
Use the sbt console in the benchq
user (todo: for some reason, I saw all debug-level logs in the console):
ssh benchq@jenkins-grafana
cd compiler-benchq
sbt -Dconfig.file=/home/benchq/benchq-data/conf/application.conf -Dlogger.file=/home/benchq/benchq-data/conf/logback.xml console
scala> knownRevisionService.lastKnownRevision(Branch.v2_12_x)
res0: Option[benchq.model.KnownRevision] = Some(KnownRevision(2.12.x,cbf7daa57d70ccacf8cfc7c2f4a7c0e81e1c773a))
scala> q // to shutdown the application
scala> :q
./scripts/dba /home/benchq/benchq-data/db
sql> select * from knownRevision;
BRANCH | REVISION
2.11.x | 011cc7ec86105640a6d606998f769986630fb62a
2.13.x | 6ebf4140561e2564ec7ed30c3f6d9a2dea92be01
2.12.x | cbf7daa57d70ccacf8cfc7c2f4a7c0e81e1c773a
(3 rows, 1 ms)
sql> quit
Restart the service as ubuntu
:
ssh ubuntu@jenkins-grafana
sudo sv up benchq
- Running on
ssh benchq@jenkins-grafana
, port8084
. - Exposed via the scala-ci reverse proxy
ssh ubuntu@jenkins-grafana
Service by runit, here's a tutorial.
Script at /etc/service/benchq/run
(uses a fat jar by sbt-assembly):
#!/bin/sh -e
exec 2>&1
exec chpst -u benchq -U benchq \
env HOME=/home/benchq \
java \
-Dhttp.port=8084 \
-Dplay.evolutions.db.default.autoApply=true \
-Dpidfile.path=/dev/null \
-Dconfig.file=/home/benchq/benchq-data/conf/application.conf \
-Dlogger.file=/home/benchq/benchq-data/conf/logback.xml \
-jar /home/benchq/compiler-benchq/target/scala-2.11/benchq.jar
- Ordinary (not "bare") clone at
/home/benchq/compiler-benchq
- Allow pushes to update the index:
git config receive.denyCurrentBranch updateInstead
post-receive
script installed withln -s ../../scripts/post-receive .git/hooks/post-receive
- Add
prod
remote to local checkout:git remote add prod ssh://benchq@jenkins-grafana/home/benchq/compiler-benchq
git push prod master
ssh benchq@jenkins-grafana
tail -n 100 -f /home/benchq/benchq-data/logs/application.log