Commit Graph

140 Commits

Author SHA1 Message Date
Brad Fitzpatrick f9a00dce0b GCE: use our own lighter MySQL Docker image.
Use systemd/CoreOS instead of supervisor,
Less InnoDB memory,
No snapshots,
unrelated to Docker image: keep data files on CoreOS /var/lib/mysql-camli so
they persist across reboots.

Change-Id: Ib903c386fb3e2df0b7cf2d3eb466290f2b16f94b
2014-08-23 17:49:59 -07:00
Brad Fitzpatrick 1ca6a739cd gce: use systemd-docker on CoreOS
Change-Id: I4f5a169c78ca3806aa40b3716b267b539c8bfbca
2014-08-23 09:13:06 -07:00
Brad Fitzpatrick c78e9af4b6 gce: run mysql too. link it with camlistored.
I think I'm not using systemd correctly here. Things get very unhappy
if I reboot CoreOS: the Docker container named 'db' already exists, things keep
flapping up and down (not waiting for their dependencies), etc.

Maybe I need to register stop actions too.

Change-Id: I75ac3e965c03df4f7f3938ff13c66f137948bf4d
2014-08-18 23:18:45 -07:00
Brad Fitzpatrick 082876c600 gce: don't make http client twice.
doesn't really matter, but.

Change-Id: I21495be1780e74464c7016979174ba722400ef1a
2014-08-18 17:17:33 -07:00
Brad Fitzpatrick 5a95215fcc GCE: use host's /tmp dir instead of inside container.
Change-Id: I2a52249148541c97dfdd84bac57a1605e0366471
2014-08-18 17:13:46 -07:00
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 b191ece806 GCE: start systemd-journal-gatewayd.socket on boot.
Change-Id: I53e679f9a5f745c9a35904cdf65ff7844420e23b
2014-08-17 14:21:59 -07:00
Brad Fitzpatrick 274f838f6f Add make.go support for building the camlistored Docker binary.
Change-Id: I2f8ad914b217843749c0aee57c24ce44c1c619f1
2014-08-16 14:56:40 -07:00
Brad Fitzpatrick 494e9e7814 docker: add push target
Change-Id: I82fd35a3f1e5c4a76c9774aff28328a7acc97e78
2014-08-16 14:27:51 -07:00
Brad Fitzpatrick 38b97e1b9a Add Dockerfile and Makefile for 'camlistore/camlistored' Docker image.
Change-Id: Ied7055689f1946ce0e6a857b4e6ddd5f8dca79b9
2014-08-15 22:20:57 -07:00
Brad Fitzpatrick 38cceb30aa misc/gce: flesh out enough to boot instances running Camlistore.
Polish remains.

Change-Id: I998cf4d515049e6d0e462fa6c259c39fc1638cf2
2014-08-15 22:18:10 -07:00
Brad Fitzpatrick fd08eb7e1d Create GCE instance, but without Camlistore running.
Change-Id: I3775ad8dc90562f9d4cb6c59da9a4df63aa417e8
2014-08-15 13:19:12 -07:00
Brad Fitzpatrick bb8fe1aa33 GCE setup tool: more graceful OAuth setup
Change-Id: I28893735c49da18d3890a0df07b071048c29ba68
2014-08-15 12:47:05 -07:00
Brad Fitzpatrick c6c76ef859 Start of tool to create Camlistore instances on GCE.
Will be wrapped in a webserver later.

Change-Id: I95738e57e3e3db11436af777cbf21e680dd10d66
2014-08-14 14:55:06 -07:00
mpl e3e25c885f buildbot: option to skip test suite, mainly for debugging.
Change-Id: Ief506ed1403a48eecd3ef37e17818d3612ae40b4
2014-08-05 16:46:27 +02:00
Brad Fitzpatrick 73b5665805 re-tag 0.8
Change-Id: Ibbeb9027fd5719a8faca915a32207564041dce7d
2014-08-03 18:27:18 -07:00
Brad Fitzpatrick d57489b521 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-08-03 18:26:38 -07:00
Brad Fitzpatrick 992ae392fa tagging 0.8
Change-Id: I0aaed33cb582a7b2aeecacd33e70ee5effda86c2
2014-08-03 18:17:54 -07:00
Brad Fitzpatrick 43a50b9fbf google cloudstorage: stat bucket at start. WIP.
Change-Id: Ia5c0981a1f31e347218d334a0748af19867b1adf
2014-08-02 21:00:43 -07:00
Brad Fitzpatrick 90175c209c Add some GCE+Docker+CoreOS notes.
Change-Id: I67d37b3aaf08e22315bda6aae9e7c7d48c67dba5
2014-08-02 17:24:21 -07:00
mpl c23933efdc buildbot: be more patient when waiting for camlistored
I'm hoping this will help with our first test suite run (Go1) which
is often failing at the test trying to hit http://localhost:3179/ui

Change-Id: I972072ebc27b7a59136a90532000ca7e9d58a471
2014-07-05 18:20:06 +02:00
tnt 5d8eeb534b Fixed wrong calls to formatting functions.
E.g: fmt.Println("%s", "hello world") -> fmt.Printf("%s", "hello world")

Change-Id: I51c0bd54c14173e074fafd86c83a5287fcdb1520
2014-06-30 22:05:22 +02:00
mpl a52585d7b0 buildbot README: link to setup script for hacking
Change-Id: Id583796ede48fad0e3000b3ab97551e889fa2c37
2014-06-19 15:03:29 +02:00
mpl 678d7cc45a misc/pre-commit.githook: print gofmt to run
Change-Id: I1e177a2cbbc33bae2afc9bcef8c3da387f5bb303
2014-06-06 18:46:44 +02:00
mpl 4569a7f475 devcam review: submit changes for review
Context: http://camlistore.org/issue/408

Change-Id: I587de65c9dc8d87c02541096e1f4f7765e644962
2014-05-13 23:06:30 +02:00
mpl 335f6416b9 buildbot: add some context to error
Change-Id: Ia0733909ffd4d9e9451ac663cb7ece799169ab7c
2014-03-04 18:53:05 +01:00
Brad Fitzpatrick 9f70025a29 Add 0.7 to the release history
Change-Id: Ieb895939d302c594b35dfd51361c93fe9078a039
2014-02-28 15:33:48 -08:00
mpl 8f2c67241f buildbot: send sigterm instead of sigkill to child
Because if e.g. 'devcam test' is the current child process, we want it to be
able to catch the signal and kill its own child too.

Change-Id: I3e3c9c10c8d7f5d793c98b604baf8df56608003e
2014-02-21 20:52:30 +01:00
mpl e004ef414b buildbot: add timeout for task run
Change-Id: I49594d7d9aaa20d94213033d41e055c64e3da30c
2014-02-19 16:30:04 +01:00
mpl 08dad1803e camlibot: set GOROOT properly, stricter hash checks, simplify
Change-Id: I27fed6c52eeae239b9f8a17600331fc08dfd9ef7
2013-12-30 19:50:54 +01:00
Bill Thiede b030952753 buidbot/master: remove auto refresh on stderr view.
I thought this was clever, but now I see it is just annoying when
dealing with long stderr logs.

Change-Id: Iddb172240a046aedb9abb78fa5a74ebeded3c387
2013-12-27 11:21:21 -08:00
Brad Fitzpatrick 401579d656 Record 0.6 tag
Change-Id: I52da474ca3831c8be4685edfc0e132b27255f8a4
2013-12-25 10:59:18 -08:00
Bill Thiede 2e1dcca4e4 index/corpus: Add copyright header
Also update copyrightifity.

Change-Id: Icce92d96c4bd2eaba5002d85641756ed3fd672fa
2013-12-08 22:44:08 -08:00
Bill Thiede 738783ebf4 buildbot/master: add Basic Auth support.
Moved BasicAuth parsing and localhost detection code from pkg/auth ->
pkg/httputil for use by buildbot master.

Added user config file for remote access.  The file's name is
"masterbot-config.json" and is located in osutil.CamliConfigDir(),
which on Unix will resolve to $XDG_CONFIG_HOME/camlistore/, if
XDG_CONFIG_HOME set, or ~/.config/camlistore/.  On Windows it will be
under %APPDATA%\Camlistore\.  The expected format is a json object
with usernames as the keys and sha1 sums of the password as the
values, i.e.:

    {
        "user1": "1234567890abcdef12341234567890abcdef1234",
        "user2": "1234abcdef12345678901234abcdef1234567890"
    }

This file is polled at a 1 minute interval and reparsed if the file's
modification time is more recent then the previous parse attempt.  It
is ok for the file to go missing, it will zero out the remote user
list. A malformed file will result in the master exiting.

New commandline flags, -tlsCertFile & -tlsKeyFile, added.  Specifying
both will enable TLS on the listener specified by -host.  The go
source contains generate_cert.go in crypto/tls that can be used to
generate self-signed cert.pem and key.pem for testing.

Added -skiptlscheck commandline option to builder.  This allows the
builder to report to https:// addresses with self-signed certs as we
don't currently have a way to specify the cert chains to be used
for TLS verification.  This is a stop-gap solution.

When launching a master that listens for secure connections, we
currently need tell the builders to skip certificate validation. Add
'-builderopts="-skiptlscheck"' to the master's commandline to skip
cerfication verification.

Change-Id: I0750b5c9fa8f4def67fc05a841087b50abded2f7
2013-11-21 21:22:12 -08:00
Mathieu Lonjaret c1b21a9668 Merge "builder: add client side Basic Auth support." 2013-11-07 16:04:20 +00:00
Bill Thiede 05fa589675 builder: add client side Basic Auth support.
Adds support for specifying additional masters to send results to.
The config file, named "builderbot-config", must be located in
osutil.CamliConfigDir(); on Unix, it will be under
$XDG_CONFIG_HOME/camlistore/, if XDG_CONFIG_HOME set, or
~/.config/camlistore/.  On Windows it will be under %APPDATA%\Camlistore\.
The expected format is one host per line, comments are not allowed and used
only for illustration below.  Some examples:

    # Post to default path on host1, no user auth.
    http://host1
    # Post to / on host2, no user auth.
    http://host2/
    # Post to /other/path on host3, no user auth.
    http://host3/other/path
    # Post to default path on host4, user 'user', password 'pass'.
    http://user:pass@host4
    # Post to / on host4 port 7070, user 'user', password 'pass'.
    http://user:pass@host4:7070/

This change also explicitly sets GOPATH to the copy of camlistore.org checked
out by the master before building the builder, and starting the build run.
This ensures we're not building against a random checkout of camlistore
pointed to by the user's environment.

The directory of the checked out source is moved from ${PWD}/camlistore.org
-> ${PWD}/src/camlistore.org so GOPATH can be set to $PWD and the requirement
of packages being under src/ is met.

Change-Id: I6e121c0aae9dae0c1832f782fa32619434ce9d2c
2013-11-06 19:16:58 -08:00
Bill Thiede d950d683b5 buildbot/master: reformat task's error message.
The error message is already preformated with \n newlinews, so <pre> is a more
appropriate tag, shows error messages with proper line-breaks.

Change-Id: Ifcf63ae4c9fa857c48bd825edb8f83f1527ed57a
2013-10-30 21:21:19 -07:00
mpl 9ab3af23b6 misc/buildbot: a few fixes + README
-hack to disallow remote bots reports, until we have some auth working
-verify that the alternative latest hash provider response looks like
a git hash before using it.
-check that the buildbot code is the most recent before building
-a few more debugging prints
-some paths fixes
-README to get started

Change-Id: Ibe8b4472586b4902d3f28f70a2cceadfb6e41c80
2013-10-25 01:29:36 +02:00
Salman Aljammaz 7b870f3d9e pre-commit hook: gofmt files from git index rather than working directory.
Fixes http://camlistore.org/issue/245

Change-Id: Ib5647ad7d0f05141243732923112bc9597cb1512
2013-10-23 22:36:16 +01:00
mpl 74bb79e63b buildbot: broke into a master and a builder bot
This change is the first major step towards more improvements to the
buildbot. It cleans up various details, but most notably:
-it now uses a task as the basic data structure, to improve readability
and maintainability
-it breaks the bot into a master bot and a builder bot.
-it allows a master to receive reports from remote bots, and the
status page now aggregates all those reports.
-it allows a builder bot to send its reports to several master bots.
-the master bot uses whatever go version is installed to build the
builder bot, or the downloaded go tip if none is found.

The master bot is in charge of
1) monitoring the changes to the Camlistore and Go repos,
2) recompiling builder bot, which allows to add some new tests to the
test suite without having to interrupt the master bot.
3) starting a builder bot instance
4) waiting for the builder bot report and/or polling the builder bot
for its progress
5) answering the requests to display the various status pages.

http://camlistore.org/issue/185

Change-Id: I46a0b8fabbebf76b0c3ed04fd2ee73362d565cf7
2013-10-18 19:32:24 +02:00
Bill Thiede 0712432e1f buildbot: use ringBuffer to store last 1MB of logs
Change-Id: I689ca82c64b9c7f89913551c5138a78718377c0d
2013-10-14 17:20:36 -07:00
Brad Fitzpatrick 652719fd3f Merge "buildbot: Add more debugging." 2013-09-22 10:33:49 +00:00
Bill Thiede 570ea2a82d buildbot: Add more debugging.
This adds the error returned from exec to the log message, and
provides '(empty)' placeholders when no stdout or stderr is present
from the called binary.

This has the effect of changing the silent errors I was seeing on my
buildbot from:

"""
Error:
	:
"""

To:

"""
Error:

	exec: "devcam": executable file not found in $PATH

Stdout:
(empty)

Stderr:
(empty)
"""

Also provides a /stderr handler linked from the status page that
allows all the logs to be viewed.  This is handy when the logs from an
individual test don't provide enough info to debug a build problem.

Change-Id: I4b3ef5a5db6aac1ddf41c41bc2fff310f19a82a1
2013-09-21 12:04:39 -07:00
Brad Fitzpatrick cfc9ce026b Add 0.5 to misc/release-history-tags
Change-Id: Id5756cd120ebd2548ac314f34e5f0095280fd71f
2013-09-21 19:57:49 +01:00
mpl 0c1dc0d6e4 devcam test: generate keyblob with devcam put init
The integration tests run by devcam test require a
GPG keyblob in the default location (for camput), and
we do not track in git such a keyblob.
This change allows devcam test to create the keyblob
with devcam put init before running the tests.

Also, devcam server is now using CAMLI_KEYID instead
of hardcoding the key id in the dev server config file.

Change-Id: I030b88c9a9321016fedb62424e0e707621206922
2013-09-20 20:03:21 +02:00
mpl ba8f88c21a devcam test, replaces make presubmit
http://camlistore.org/issue/223

Change-Id: Iaaea9926a98d7d3335fd6ee52daa225e51ec4703
2013-09-19 17:00:59 +02:00
mpl 3a26c433db devcam: 'put' and 'get' commands, replace dev-camput and dev-camget
Also added -port flag, and untied the port to the
password in devcam server, always 'pass3179' now.

http://camlistore.org/issue/212

Change-Id: Iadf693951763d47907be17c53d4807a4706eb150
2013-09-01 10:25:09 -07:00
Brad Fitzpatrick f2dd7c1328 Add 0.4 to history
Change-Id: Idaf22fd681106349c693fc49a7bc5499212eb17c
2013-08-26 18:06:54 -05:00
mpl b3b16f73c2 buildbot: use make.go
Change-Id: I76544d7e0601be9a5bc2b9378a29db6c97894d76
2013-08-21 19:33:55 +02:00
Bill Thiede 502aff1fd5 camweb,buildbot: Update camlistore git repo URLs.
Also add redirect for /code/ request with a commit hash to new code host.

Change-Id: I68a8746dacb6f0a4fc6719e3f5ed23ee0f37778b
2013-08-18 08:56:16 -07:00