Commit Graph

111 Commits

Author SHA1 Message Date
Brad Fitzpatrick 5c5666d037 Thumbnail cleanups and let the meta map persist on disk with a sorted.KeyValue
Previously, every time you restarted the server, it forgot about all
thumbnails previously generated.  (in practice it didn't/doesn't
matter with a single user, though, since they're still cached in the
browser and we always reply to If-Modified-Since immediately without
checking the cache)  But it'll matter more with the Publish handler.

Also, rename some stuff, clean up some stuff, drop an unused interface.

And then necessarily change the serverconfig low-level generator to use
a kvfile for the thumbmeta map when using local disk for blobs.

--

Change-Id: I4dcfcb21429a440aa118794c03f7abf7bd69c33b
2013-12-14 09:37:56 -08:00
Brad Fitzpatrick 15386a1d51 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-12-11 12:26:41 +04:00
Brad Fitzpatrick bf54591e8d Remove the memIndex option from genconfig and devcam; default memoryIndex to on.
We had the legacy "memIndex" option to put the Camlistore index in
memory (the leveldb memdb) as an option in genconfig called
"memIndex", and we also had an option called "memoryIndex" for whether
to slurp the on-disk index to memory on start-up.  Too confusing!

Instead, delete "memIndex" (since it's not the default anyway, now
that we have kv).

Then, also (the original point of this change): default the
memoryIndex option to true, so search works for people by default.
This option might go away in the future if it becomes the only required
way.

Also, document this.

Change-Id: Iddffa6e19adbf09c5aacd063aa44de362d90633b
2013-12-11 12:20:22 +04:00
mpl f9bfed9b57 camlistored: use osutil for default TLS cert/key
http://camlistore.org/issue/254

Change-Id: I9a0944497db64387058230c5245ed2718f36fde2
2013-12-10 15:13:50 +01:00
Brad Fitzpatrick 5f1e7de0d1 serverconfig: also write mem profile with CAMLI_PPROF_START
Change-Id: Iffe78c66916d6e690a28edfd258c51a5433edff5
2013-12-07 18:34:13 -08:00
Brad Fitzpatrick 6e900be6d0 serverconfig: add CAMLI_PPROF_START
Change-Id: Ia3d3e021710f7681de7d43de87c236f8e37e992c
2013-11-30 10:01:32 -08:00
Brad Fitzpatrick 1defe7b297 serverconfig: add 'memoryIndex' bool option to high-level config
Change-Id: If5edb272858f186931eeb57579e221bde3efb07c
2013-11-28 11:09:16 -08:00
Bill Thiede 270e8f54b6 genconfig: use same packed-ness for cache as blobs.
Change-Id: I857f7a3071bfd80ed5f4e8cef8ca2307a978655a
2013-11-27 21:26:04 -08:00
Brad Fitzpatrick fbad538fd8 gofmt
Change-Id: Ibec8c4b1a78bd93b78e26ff73de7a386699cc6c8
2013-11-27 20:46:58 -08:00
Brad Fitzpatrick 20273566bf serverconfig: fix another /path/to/secring canonicalization case
Change-Id: Ia0bdbdf0bdd0279055344d2c14a23eed473d7098
2013-11-25 08:27:11 -08:00
Brad Fitzpatrick 326b24cc7c Merge "Add diskPack as a high level local storage destination" 2013-11-25 16:20:11 +00:00
Tamás Gulácsi 184686e849 Add diskPack as a high level local storage destination
As a diskPack boolean flag in the high-level server config,
reusing the blobPath parameter for destination.

Change-Id: I9ec0583b160f89952cdad851e66c7fabf22b7bb4
2013-11-25 11:23:50 +01:00
Bill Thiede 6b9f81e3f8 serverconfig: fix secring path for update_golden.
Also regenerated the golden config files.

Change-Id: Id87dcad5f85b060eeee477e1fd3c72bff93d3d5e
2013-11-24 20:38:00 -08:00
Brad Fitzpatrick eae8a74fc9 serverconfig/genconfig: add kv queues to all sync handlers.
In the future this might be more configurable (e.g. mysql or sqlite or whatever, or different
paths).  But this works for now.

Change-Id: I85853e6bfdd9063fc2eba5922b138d5552b730a9
2013-11-24 15:12:11 -08:00
Brad Fitzpatrick f4294cecdf Format pkg/serverconfig/testdata golden files consistently. No semantic changes.
Change-Id: I8c190baf6514a2cf0580da45220d411b81445733
2013-11-24 15:08:47 -08:00
Brad Fitzpatrick a7f7fb8741 serverconfig test: simplify pretty-printing, use test.Diff, add flag to update golden files
Change-Id: I8c259dad8fc6f161f25fb4f63f97c4aef4b703b0
2013-11-24 15:04:20 -08:00
Brad Fitzpatrick 70475701d1 Get rid of QueueCreator and all its associated complexity.
Previous TODO entry was:

-- Get rid of QueueCreator entirely. Plan:
     -- sync handler still has a source and dest (one pair) but
        instead of calling CreateQueue on the source, it instead
        has an index.Storage (configured via a RequiredObject
        so it can be a kvfile, leveldb, mysql, postgres etc)
     -- make all the index.Storage types be instantiable
        from a jsonconfig Object, perhaps with constructors keyed
        on a "type" field.
     -- make sync handler support blobserver.Receiver (or StatReceiver)
        like indexes, so it can receive blobs.  but all it needs to
        do to acknowledge the ReceiveBlob is write and flush to its
        index.Storage. the syncing is async by default. (otherwise callers
        could just use "replica" if they wanted sync replication).
        But maybe for ease of configuration switching, we could also
        support a sync mode.  when it needs to replicate a blob,
        it uses the source.
     -- future option: sync mirror to an alternate path on ReceiveBlob
        that can delete. e.g. you're uploading to s3 and google,
        but don't want to upload to both at once, so you use the localdisk
        as a buffer to spread out your upstream bandwidth.
     -- end result: no more hardlinks or queue creator.

Change-Id: I6244fc4f3a655f08470ae3160502659399f468ed
2013-11-22 14:33:31 -08:00
Brad Fitzpatrick f94dbb35fa serverconfig: show the prefixes in config cycles.
Change-Id: I3ab42efa7e4d80f15ee338411c010beb11518c86
2013-11-22 13:59:16 -08:00
mpl 8f5d54361f serverconfig: fix tests because of previous publish config changes
Change-Id: I643b31be80dcc86b4cdb76bc8a9012dcb57e65ee
2013-11-22 18:14:01 +01:00
mpl f8b41e236e Merge "server/publish.go: use go html template for publishing" 2013-11-19 22:22:17 +00:00
mpl a6aeff034c server/publish.go: use go html template for publishing
Change-Id: Ic1c55d35e52e407864d339927b453de58a64e03c
2013-11-19 17:50:26 +01:00
Aaron Boodman 2a747ccd56 Add ability to specify flickr config for devcam.
Change-Id: Ic1139730d969558e2d6375dd86c6741e3dfd2b9b
2013-11-18 21:16:09 -08:00
Aaron Boodman 9c671f76eb Revert "Revert "Add genconfig support for flickr importer""
This reverts commit 8367de6e95.

Change-Id: I1fdfa4070572b1badc0f0980348404f905fa13a3
2013-11-17 14:15:12 -08:00
Brad Fitzpatrick 8367de6e95 Revert "Add genconfig support for flickr importer"
This reverts commit b53e79614d.

It broke the tests.
2013-11-17 13:43:06 -08:00
Aaron Boodman b53e79614d Add genconfig support for flickr importer
Change-Id: I8be13f81fae15acfe87cce9d65318524efc3035d
2013-11-17 13:29:49 -08:00
Aaron Boodman 9ae23e52b0 Rearrange the Flickr importer to use OAuth instead of Flickr's custom importer.
Change-Id: I8284431fa6572a08d3c7ff0d0e655297627a4eda
2013-11-16 22:30:21 -08:00
Brad Fitzpatrick ee57e351d2 Remove debug cruft actually submitted.
Change-Id: Iaa805afd2d6e76108319edf06113de8a260f7e46
2013-10-24 22:49:18 -07:00
Brad Fitzpatrick 0324143892 importer: make the schema.Signer available to the importer
Change-Id: Iad1a2f3bfe381b31a381957edb85d6d4aa21b38c
2013-10-24 22:45:28 -07:00
Brad Fitzpatrick 353c43c02a wip
Change-Id: I7cdafbd53b59fc53dafa4c19aa391f51f6982061
2013-10-21 20:17:57 -07:00
Brad Fitzpatrick 35e77c45ad importer: initialize Host's search handler and blobserver target
Change-Id: I482e6f192620c254648b19b3044eedbd44de288c
2013-10-20 12:00:15 -07:00
Brad Fitzpatrick cf116c6da9 importer: work on infrastructure for third-party import from other sites
Change-Id: Ib4e5e4d543a1b2a913b99fa0a4d92f1a5b94c5dc
2013-10-19 15:48:05 -07:00
Bill Thiede b576dcc481 serverconfig: conditionally install expvar handler.
Add local copy of the standard library's expvar handler.

Change-Id: Ida41553345d7d29665f33268356bf16a80386e38
2013-10-04 21:24:24 -07:00
Brad Fitzpatrick 128f56887b Handle GET and HEAD the same in more (all?) places.
Change-Id: I486a95f0a6fc127d17dcf0abeb94eab292980156
2013-09-15 20:12:26 +01:00
mpl edd7f68799 serverconfig: add test for mongo indexer, fix dev mongo config
Change-Id: Ifb7f8cef208dc93a4cf350ff197bb2af2c0e0e81
2013-09-09 22:54:32 +02:00
Aaron Boodman 97fab00c71 Fix bug parsing baseURL config
Change-Id: Ia8a5698ae5e0421672bd91f9a1c1497bcd36eb7c
2013-09-08 16:31:43 -07:00
Brad Fitzpatrick f3f48eb70b Support alternate S3 hostnames
Change-Id: I9a27eb5fb9c4e5ef3b516ce9cf5a4b5bb4e1df61
2013-09-01 09:50:35 -07:00
Brad Fitzpatrick 6d761897db Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2013-08-28 12:16:37 -07:00
mpl de3d73707a serverconfig: find username on windows too, to set dbname
http://camlistore.org/issue/215

Change-Id: I0599b8061d91c2f6a4ceaa00e54bd0b899540c97
2013-08-28 15:54:07 +02:00
Brad Fitzpatrick ca64e4f508 camlistored: on SIGINT, shut down cleanly, closing the kvfile index db
Change-Id: Ifcb8c22b088586bc72ad98dacc3be2d46e77928b
2013-08-26 21:07:28 -05:00
Brad Fitzpatrick 44acc3b2e7 serverconfig: add kvfile support
Change-Id: If8b4d6b74711cfc169e66ab60a568bcb9b67a7d0
2013-08-25 12:25:30 -05:00
Brad Fitzpatrick ae20a0f7de Ditch App Engine ContextWrapper noise; add test that App Engine always compiles.
I had broken App Engine in my previous commit, since it wasn't part of 'make presubmit'

Change-Id: I32c25efbc7c348ff516128c87b6e817ae0685386
2013-08-21 18:51:10 -05:00
Brad Fitzpatrick b24cad68dd Cleanup: remove BlobHub and time.Duration waits from storage interface
Move up a layer to the HTTP.  Also, start to remove ContextWrapper
stuff.  We've done it differently for App Engine instead, and will do
it differently yet moving forward.

Also add blobserver.Receive and use it in most places, moving checksum
verification up a layer.

Bunch of other cleanup and TODO fixing too.

Much simpler and cleaner.

Change-Id: I12e56c5d4e53bfcf82bdd8fb0b6d57c248ff605c
2013-08-21 13:57:28 -07:00
Brad Fitzpatrick f13fe9303f Merge "serverconfig: cleanup from previous review." 2013-08-21 17:02:38 +00:00
Bill Thiede 1ffd89a918 serverconfig: cleanup from previous review.
Addressing the comments in https://camlistore.org/r/510

Change-Id: I4523afe76805dbbb2247ece527b8e058ecd087f4
2013-08-21 09:55:57 -07:00
mpl 4acc10e6e4 serverconfig: idle synchandler when no localdisk as primary storage
Because no localdisk means either s3 or google is the primary,
and none of them support efficient replication.

1) Added a dummy synchandler constructor for when config has "idle"
2) Set "idle" for synchandler config when no localdisk
3) fixed corresponding tests

Also:
- added error (and test) when no localdisk and both s3 and google
in config
- added s3 + mysql test

http://camlistore.org/issue/201

Change-Id: I861fdca0c203bc0181ab6d548adab501ed98d2f0
2013-08-21 15:17:13 +02:00
Bill Thiede 75c79b5a77 serverconfig: conditionally install pprof handler.
This change enables the ability to profile with:
go tool pprof http://<host>:<port>/debug/pprof/profile

Setting CAMLI_HTTP_PPROF=1 in your environment before running camlistored will
enable the handler.

Change-Id: I91993f5166e257e5be406a4d2c3e6bc0028a435a
2013-08-19 21:36:13 -07:00
Brad Fitzpatrick b0d2a8f0e5 Merge "Adding Google Drive as a storage backend experimentally. No cheap-enough way of enumerating Drive files, needs to be fixed once Drive supports range queries. Allows you to sync to /sto-googledrive/, but not from." 2013-08-17 15:51:51 +00:00
Burcu Dogan 6e6e910af1 Adding Google Drive as a storage backend experimentally. No cheap-enough way
of enumerating Drive files, needs to be fixed once Drive supports
range queries. Allows you to sync to /sto-googledrive/, but not from.

Change-Id: I6ac5ef02c5f51a6abdab5c207a3a5693c6bb8581
2013-08-17 15:30:02 +02:00
Brad Fitzpatrick f3f0030b25 serverconfig: error on bad baseURL values.
Fixes https://code.google.com/p/camlistore/issues/detail?id=195

Change-Id: I74e194a3903cd7ae36319bc98659e436e9b142d4
2013-08-08 17:50:50 -07:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00