Add runHydra shell
runHyda automatically starts hydra and postgres: ``` $ nix-shell -A runHydra ``` The shell receives hydra from the working copy as buildInput. Running hydra, queue-runner, evaluator and postgres is managed by foreman (https://github.com/ddollar/foreman) and configured in `Procfile`.
This commit is contained in:
committed by
Tobias Pflug
parent
a614199449
commit
d1237c315d
6
scripts/start-evaluator.sh
Executable file
6
scripts/start-evaluator.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait for hydra-server to listen
|
||||
while ! nc -z localhost 3000; do sleep 1; done
|
||||
|
||||
exec hydra-evaluator
|
11
scripts/start-hydra.sh
Executable file
11
scripts/start-hydra.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait for postgresql to listen
|
||||
while ! nc -z localhost 5432; do sleep 1; done
|
||||
|
||||
createdb -h $(pwd)/.hydra-data/postgres hydra
|
||||
|
||||
hydra-init
|
||||
hydra-create-user alice --password foobar --role admin
|
||||
|
||||
exec hydra-server
|
4
scripts/start-postgres.sh
Executable file
4
scripts/start-postgres.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
initdb ./.hydra-data/postgres
|
||||
exec postgres -D ./.hydra-data/postgres -k $(pwd)/.hydra-data/postgres
|
6
scripts/start-queue-runner.sh
Executable file
6
scripts/start-queue-runner.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# wait until hydra is listening on port 3000
|
||||
while ! nc -z localhost 3000; do sleep 1; done
|
||||
|
||||
hydra-queue-runner
|
Reference in New Issue
Block a user