Skip to content

scala/compiler-benchq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Admin

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

CLI

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

Deployment

Sever admin

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

Push to deploy

  • Ordinary (not "bare") clone at /home/benchq/compiler-benchq
  • Allow pushes to update the index: git config receive.denyCurrentBranch updateInstead
  • post-receive script installed with ln -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

Logs

ssh benchq@jenkins-grafana
tail -n 100 -f /home/benchq/benchq-data/logs/application.log

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •