diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-07-01 22:28:27 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-07-01 23:44:05 +0300 |
commit | b01f8b24a6ff6c8694b292d45e4d229262c8e2a7 (patch) | |
tree | cf3c5ab573d6bd191ab9b9030d238a418fdea78b /yarns | |
parent | f739ca2c67cc5dedfa383aaef86ac6f3fca3db6b (diff) | |
download | ick2-b01f8b24a6ff6c8694b292d45e4d229262c8e2a7.tar.gz |
Add: production controller application
Rewrite the controller to be a proper application. This is not quite
production ready, actually: it only runs in debug mode. Later on I'll
add support for uwsgi and systemd units for managing it, but for now
this is enough.
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/200-build.yarn | 3 | ||||
-rw-r--r-- | yarns/900.yarn | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/yarns/200-build.yarn b/yarns/200-build.yarn index 77daebc..40cb1c9 100644 --- a/yarns/200-build.yarn +++ b/yarns/200-build.yarn @@ -41,6 +41,7 @@ pretend output we sent ends up in the current build log. WHEN worker manager calls POST /worker/bar/snippet, ... with JSON body '{ + ... "project": "foo", ... "stdout": "ikiwiki build output", ... "stderr": "", ... "exit-code": null @@ -62,6 +63,7 @@ that we get a new thing to run. WHEN worker manager calls POST /worker/bar/snippet, ... with JSON body '{ + ... "project": "foo", ... "stdout": "|more output", ... "stderr": "", ... "exit-code": 0 @@ -86,6 +88,7 @@ previous log will contain the previously current log. WHEN worker manager calls POST /worker/bar/snippet, ... with JSON body '{ + ... "project": "foo", ... "stdout": "rsync output", ... "stderr": "", ... "exit-code": 0 diff --git a/yarns/900.yarn b/yarns/900.yarn index 23ae291..82ab42a 100644 --- a/yarns/900.yarn +++ b/yarns/900.yarn @@ -4,7 +4,10 @@ IMPLEMENTS GIVEN a running controller instance controller = os.path.join(srcdir, 'controller') - cliapp.runcmd(['/usr/sbin/daemonize', '-c.', controller, 'pid', 'port', 'ick.ick']) + cliapp.runcmd( + ['/usr/sbin/daemonize', '-c.', + controller, '--debug', '--pid-file=pid', + '--port-file=port', '--projects=ick.ick', '--log=log']) vars['pid'] = cat('pid').strip() vars['port'] = cat('port').strip() |