diff options
author | Lauren Perry <lauren.perry@codethink.co.uk> | 2014-12-17 13:27:39 +0000 |
---|---|---|
committer | Lauren Perry <lauren.perry@codethink.co.uk> | 2015-01-08 16:33:41 +0000 |
commit | c9fd8cf3dd449caeafe27b6bef8bda594bcdfc30 (patch) | |
tree | e4463da3b464912536b3093110266b16e29ceaef | |
parent | 7bba3b9e9c3089bc0f88734cc83ed0fb669e2678 (diff) | |
download | firehose-c9fd8cf3dd449caeafe27b6bef8bda594bcdfc30.tar.gz |
Add firehose.configure, containing the necessary instructions to run firehose
-rw-r--r-- | firehose.configure | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/firehose.configure b/firehose.configure new file mode 100644 index 0000000..c17fe59 --- /dev/null +++ b/firehose.configure @@ -0,0 +1,40 @@ +#!/bin/sh +set -e + +ROOT="$1" + +# Clone the Firehose repo +git clone git://git.baserock.org/baserock/baserock/firehose + +# Move Firehose arguments to specific directory and timer/service +# files to /etc/systemd +mkdir -p "$ROOT"/var/lib/firehose +cd firehose/ +cp examples/*.yaml "$ROOT"/var/lib/firehose/ +cp firehose.service "$ROOT"/etc/systemd/system/firehose.service +cp firehose.timer "$ROOT"/etc/systemd/system/firehose.timer + +# Run the Firehose install script +/usr/bin/python ./setup.py install + +cat >>"$ROOT"/etc/morph.conf <<EOF +[config] +repo-alias=baserock=git://git.baserock.org/baserock/#ssh://firehose@testgerrit.baserock.org:29418/baserock/,upstream=git://git.baserock.org/delta/#ssh://firehose@testgerrit.baserock.org:29418/delta/ +EOF + +# This will run Firehose on the argument specified in firehose.timer +# automatically every six hours +systemctl enable firehose.timer +systemctl start firehose.timer +systemctl enable firehose.service + +# Add firehose user, then become firehose user +adduser firehose -s /bin/false -D +sudo -u firehose --ssh-keygen -C "firehose@baserock.org" -N "" +sudo chown -R firehose:firehose /var/lib/firehose/ +sudo -u firehose -s + +# Configure a git identity for Firehose +git config --global user.name "Firehose" +git config --global user.email firehose@firehose.baserock.org + |