summaryrefslogtreecommitdiff
path: root/README
blob: 8a0b36b55fe2256ed7a15c93154c054fa3368bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Firehose
========

Firehose is a tool which reads yaml files (see the `examples/` directory) which
instruct the tool in how to perform integrations of upstream changes into a
Baserock definitions set.  It is meant to be used in conjunction with the
Baserock CD pipeline (Mason) to reduce the cognitive load on the systems
integration role, freeing brain cycles for more constructive development work.

Currently Firehose is limited to applying all of its inputs in a single
integration and it only supports the absolute-sha landing method (which assumes
a zero delta between upstream and what we need for Baserock) but for anything
where that holds true, Firehose can provide a valuable service pre-integrating
and running those integrations through a CD pipeline to gain confidence in the
proposed change.

Presently Required Instructions to Run Firehose
===============================================

Firehose deployment isn't automated yet. Here are instructions on how to do it
manually:

In a 'build' machine in the cloud:

 morph build systems/build-system-x86_64.morph
 morph deploy baserock-firehose/baserock-firehose.morph

Instatiate this image and SSH into it.

 git clone git://git.baserock.org/baserock/baserock/firehose
 git checkout baserock/lauren/firehose
 python ./setup.py install
 adduser firehose -s /bin/false -D
 sudo -u firehose -- ssh-keygen -C 'firehose@baserock.org' -N ''
 sudo chown -R firehose:firehose /var/lib/firehose

Create an account on the Gerrit instance where Firehose will be pushing:

 ssh -p 29418 you@gerrit.baserock.org gerrit \
 create-account --group "'Non-Interactive Users'" \
 --ssh-key xxxx --full-name "'Firehose integration tool'" \
 --email='firehose@firehose.baserock.org' \
 firehose

Test that the Firehose user can connect to Gerrit (this should give you a help
message if successful, or a 'Permission denied' error otherwise):

 sudo -u firehose -- ssh -p 29418 firehose@gerrit.baserock.org gerrit

Move firehose.service and firehose.timer files to /etc/systemd/system/

Run:

 systemctl enable firehose.timer
 systemctl start firehose.timer
 systemctl enable firehose.service

As Firehose, ensure that the git config matches what gerrit expects W.R.T email address, i.e.

 git config --global user.email firehose@firehose.baserock.org

If Firehose fails due to an error in /tmp/morph_tmp/, edit /etc/morph.conf to include the following:

 [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/

Comparing tags within repos
===========================
To compare release version tags within repos some Debian code is used,
which can be found within the *debian* directory. Only the version compare
function is relevant here. The rest of the Debian stuff isn't used.