Commit Graph

15 Commits

Author SHA1 Message Date
Brad Fitzpatrick e86d90dd42 GCE: expose host's systemd journal to camlistored; add /var/logs handler
The machine now boots with a new pair of cooperating systemd units:

1) cam-journal-gatewayd.service: a copy of the systemd-journal-gatewayd service,
   which runs an HTTP interface to the systemd journal.
2) cam-journal-gatewayd.socket: a unix socket listener listening on unix
   socket /run/camjournald.sock. Incoming connections will forward to 1).

Then the camlistored.service unit running camlistored under Docker now
passes -v /run/camjournald.sock:/run/camjournald.sock to make that unix socket
available to the Docker container.

Then in camlistored, a new handler at /debug/logs (wrapped in auth
checks) then opens that socket and makes an HTTP request to it,
copying its response (of log lines) back to the browser.

This will ease debugging, letting people only use their browser to
debug (or send logs to the Camlistore developers more likely), rather
than sshing in to CoreOS and learning CoreOS and systemd arcana.

Change-Id: Icd5967ae7e9946d36229bdbc5d37644a11ee5e9f
2014-08-18 15:20:59 -07:00
Brad Fitzpatrick ed4add5cf6 serverinit: add /debug/config handler to see low-level config
Useful for debugging GCE issues.

Change-Id: Iafd20de39ed64e66c8ff6cb736ec49ed8ae568c5
2014-08-16 21:40:12 -07:00
Brad Fitzpatrick 0757937177 serverinit: allow jsonconfig expansions in high-level configs.
Change-Id: I600fc56b9324143559ba594ed41a391296871689
2014-08-06 10:49:27 -07:00
Brad Fitzpatrick 966d25cb62 add wkfs.ReadFile, use it in serverinit
Change-Id: I2870568e41de9ddb879c51606c77aec0ec77c4ef
2014-08-05 12:51:17 -07:00
Brad Fitzpatrick 1bfd1b7d98 camlistored, serverinit: allow server config from URLs.
paves the way for server config from GCE metadata, too.

Change-Id: I9e54e3ad79eb53e7ae96159f2aa02f4a017e8e11
2014-08-02 16:53:58 -07:00
Brad Fitzpatrick 14bb3f48e4 serverinit: remove unused configPath field
Change-Id: Ide4c2eb07d7c3353563e5f354e833f9429542b65
2014-08-02 15:10:08 -07:00
mpl 0a869ad067 netutil: add HostPort, serverinit: return app baseURL
Context: http://camlistore.org/issue/479

This patch allows camlistored to wait for all the apps to be serving,
before printing its own listening address.

Change-Id: I4035b115a03ef6a2a43177b83b5b65ebc50a2188
2014-08-01 00:01:27 +02:00
mpl b8e3890d1f serverinit: bootstrap publisher camliRoot in dev-mode
http://camlistore.org/issue/455

Change-Id: If6e1977e5fd63d48accd4a7f99f063f6c990d4e1
2014-06-19 00:27:54 +02:00
mpl 9723b5c814 apps: more generic app handler work, to prepare for publisher
http://camlistore.org/issue/365

Change-Id: I3c34ba1f09debc3aaaf68ad9fb11b595470b6b5d
2014-06-14 18:36:10 +02:00
mpl c627b6325a app: register app authmode during setup
Fixes: http://camlistore.org/issue/439

Change-Id: I5d78f1fb764b83a0a9afc35b4ffb62a1a7934ed0
2014-05-21 19:57:09 +02:00
mpl 21dda2b4ef app/hello: dummy server application (hello world)
Change-Id: I6690b9459325af5a76d1de679d56701eefdd195e
2014-05-08 22:15:01 +02:00
Brad Fitzpatrick bf2a7b60a3 Importer overhaul. Only Foursquare is currently working.
The rest are currently stubbed out and will need updating
to the new APIs.

Change-Id: I9d70302b3ac1026192413bf9dcd3c8f1eb420349
2014-03-31 10:56:30 -07:00
Brad Fitzpatrick bf5740afb2 Add BaseURL method to handler Loader.
Change-Id: Ibc61cd19798aa1b0858cbe40b10544953db67b36
2014-03-23 17:13:40 -07:00
Brad Fitzpatrick bf28dd4488 More status handler HTML+JSON, more sync status.
Change-Id: I0381853191d5b871af649d102b976e592def791f
2014-03-16 20:14:57 -07:00
Brad Fitzpatrick 95e0f172e0 Rename serverconfig*.go to serverinit*.go
Change-Id: I198d8d17ed32202f8a014af645a006613246db85
2014-02-10 17:00:11 -08:00