2011-05-02 01:36:11 +00:00
|
|
|
{ "_for-emacs": "-*- mode: js2;-*-",
|
2014-04-01 16:03:20 +00:00
|
|
|
"handlerConfig": true,
|
|
|
|
"baseURL": ["_env", "${CAMLI_BASEURL}"],
|
|
|
|
"auth": ["_env", "${CAMLI_AUTH}"],
|
|
|
|
"https": ["_env", "${CAMLI_TLS}", false],
|
|
|
|
"httpsCert": "config/selfgen_pem.crt",
|
|
|
|
"httpsKey": "config/selfgen_pem.key",
|
|
|
|
"prefixes": {
|
|
|
|
"/": {
|
|
|
|
"handler": "root",
|
|
|
|
"handlerArgs": {
|
|
|
|
"ownerName": ["_env", "${USER}-dev"],
|
|
|
|
"blobRoot": "/bs-recv/",
|
|
|
|
"statusRoot": "/status/",
|
|
|
|
"searchRoot": "/my-search/",
|
|
|
|
"stealth": false
|
|
|
|
}
|
|
|
|
},
|
2011-06-17 03:45:47 +00:00
|
|
|
|
2014-05-08 14:07:29 +00:00
|
|
|
"/hello/": {
|
|
|
|
"handler": "app",
|
2014-06-13 21:03:49 +00:00
|
|
|
"enabled": ["_env", "${CAMLI_HELLO_ENABLED}"],
|
2014-05-08 14:07:29 +00:00
|
|
|
"handlerArgs": {
|
|
|
|
"program": "hello",
|
|
|
|
"appConfig": {
|
|
|
|
"word": "world"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/pics/": {
|
2014-06-14 20:14:34 +00:00
|
|
|
"handler": "app",
|
2014-04-01 16:03:20 +00:00
|
|
|
"enabled": ["_env", "${CAMLI_PUBLISH_ENABLED}"],
|
|
|
|
"handlerArgs": {
|
2014-06-14 20:14:34 +00:00
|
|
|
"program": "publisher",
|
|
|
|
"appConfig": {
|
|
|
|
"camliRoot": "dev-pics-root",
|
|
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}", ""],
|
|
|
|
"cacheRoot": ["_env", "${CAMLI_ROOT_CACHE}"],
|
|
|
|
"goTemplate": "gallery.html"
|
|
|
|
}
|
2014-04-01 16:03:20 +00:00
|
|
|
}
|
|
|
|
},
|
2011-06-19 20:09:43 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/stub-test-disable/": {
|
|
|
|
"handler": "publish",
|
|
|
|
"enabled": false,
|
|
|
|
"handlerArgs": {
|
|
|
|
}
|
|
|
|
},
|
2011-07-08 16:08:41 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/ui/": {
|
|
|
|
"handler": "ui",
|
|
|
|
"handlerArgs": {
|
|
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}", ""],
|
|
|
|
"jsonSignRoot": "/sighelper/",
|
|
|
|
"cache": "/cache/",
|
|
|
|
"scaledImage": {
|
|
|
|
"type": "kv",
|
|
|
|
"file": ["_env", "${CAMLI_ROOT_CACHE}/thumbnails.kv", ""]
|
2014-06-14 20:14:34 +00:00
|
|
|
}
|
2014-04-01 16:03:20 +00:00
|
|
|
}
|
|
|
|
},
|
2011-05-02 01:36:11 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/status/": {
|
|
|
|
"handler": "status"
|
|
|
|
},
|
2013-06-05 17:18:27 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/sync-index/": {
|
|
|
|
"handler": "sync",
|
|
|
|
"handlerArgs": {
|
|
|
|
"from": "/bs/",
|
|
|
|
"to": ["_env", "${CAMLI_INDEXER_PATH}"],
|
|
|
|
"queue": { "type": "memory" },
|
|
|
|
"fullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"],
|
|
|
|
"blockingFullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-09 13:05:58 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/sync-r1/": {
|
|
|
|
"handler": "sync",
|
|
|
|
"handlerArgs": {
|
|
|
|
"from": "/bs/",
|
|
|
|
"to": "/r1/",
|
|
|
|
"queue": { "type": "memory" }
|
|
|
|
}
|
|
|
|
},
|
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 22:33:31 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/sighelper/": {
|
|
|
|
"handler": "jsonsign",
|
|
|
|
"handlerArgs": {
|
|
|
|
"secretRing": ["_env", "${CAMLI_SECRET_RING}"],
|
|
|
|
"keyId": ["_env", "${CAMLI_KEYID}"],
|
|
|
|
"publicKeyDest": "/bs/"
|
|
|
|
}
|
|
|
|
},
|
2011-05-02 01:36:11 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/bs-recv/": {
|
|
|
|
"handler": "storage-replica",
|
|
|
|
"handlerArgs": {
|
|
|
|
"minWritesForSuccess": 2,
|
|
|
|
"backends": ["/bs/", ["_env", "${CAMLI_INDEXER_PATH}"]],
|
|
|
|
"readBackends": ["/bs/"]
|
|
|
|
}
|
|
|
|
},
|
2011-06-04 04:52:56 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/cond-unused/": {
|
|
|
|
"handler": "storage-cond",
|
|
|
|
"handlerArgs": {
|
|
|
|
"write": {
|
|
|
|
"if": "isSchema",
|
|
|
|
"then": "/bs-recv/",
|
|
|
|
"else": "/bs/"
|
|
|
|
},
|
|
|
|
"read": "/bs/"
|
|
|
|
}
|
|
|
|
},
|
2011-06-04 04:52:56 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/bs/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-02 01:36:11 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/cache/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_CACHE}"]
|
|
|
|
}
|
|
|
|
},
|
2011-06-04 16:58:50 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/sharder/": {
|
|
|
|
"handler": "storage-shard",
|
|
|
|
"handlerArgs": {
|
|
|
|
"backends": ["/s1/", "/s2/"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-21 16:26:20 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/s1/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_SHARD1}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-21 16:26:20 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/s2/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_SHARD2}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-21 16:26:20 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/repl/": {
|
|
|
|
"handler": "storage-replica",
|
|
|
|
"handlerArgs": {
|
|
|
|
"backends": ["/r1/", "/r2/", "/r3/"],
|
|
|
|
"minWritesForSuccess": 2
|
|
|
|
}
|
|
|
|
},
|
2011-05-23 04:22:21 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/r1/": {
|
|
|
|
"handler": "storage-diskpacked",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA1}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-23 04:22:21 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/r2/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA2}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-23 04:22:21 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/r3/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA3}"]
|
|
|
|
}
|
|
|
|
},
|
2011-05-23 04:22:21 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/enc/": {
|
|
|
|
"handler": "storage-encrypt",
|
|
|
|
"handlerArgs": {
|
|
|
|
"I_AGREE": "that encryption support hasn't been peer-reviewed, isn't finished, and its format might change.",
|
|
|
|
"meta": "/encmeta/",
|
|
|
|
"blobs": "/encblob/",
|
|
|
|
"metaIndex": { "type": "memory" },
|
|
|
|
"key": "000102030405060708090a0b0c0d0e0f"
|
|
|
|
}
|
|
|
|
},
|
2013-06-15 22:05:27 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/encmeta/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_ENCMETA}"]
|
|
|
|
}
|
|
|
|
},
|
2013-06-15 22:05:27 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/encblob/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
|
|
|
"path": ["_env", "${CAMLI_ROOT_ENCBLOB}"]
|
|
|
|
}
|
|
|
|
},
|
2013-06-15 22:05:27 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/index-kv/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_KVINDEX_ENABLED}"],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "kv",
|
|
|
|
"file": ["_env", "${CAMLI_DBNAME}", ""]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-08-23 22:19:21 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/index-mongo/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_MONGO_ENABLED}", true],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "mongo",
|
|
|
|
"host": "localhost",
|
|
|
|
"database": ["_env", "${CAMLI_DBNAME}"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2011-12-25 20:30:56 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/index-mysql/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_MYSQL_ENABLED}", true],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "mysql",
|
|
|
|
"database": ["_env", "${CAMLI_DBNAME}"],
|
|
|
|
"user": "root",
|
|
|
|
"password": "root",
|
|
|
|
"host": "127.0.0.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2011-05-02 01:36:11 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/index-postgres/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_POSTGRES_ENABLED}", true],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "postgres",
|
|
|
|
"database": ["_env", "${CAMLI_DBNAME}"],
|
|
|
|
"user": "postgres",
|
|
|
|
"password": "postgres",
|
|
|
|
"host": "127.0.0.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2012-11-03 18:58:50 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/index-sqlite/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_SQLITE_ENABLED}", true],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "sqlite",
|
|
|
|
"file": ["_env", "${CAMLI_DBNAME}"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-09-19 23:01:22 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/my-search/": {
|
|
|
|
"handler": "search",
|
|
|
|
"handlerArgs": {
|
|
|
|
"index": ["_env", "${CAMLI_INDEXER_PATH}"],
|
|
|
|
"owner": ["_env", "${CAMLI_PUBKEY_BLOBREF}"],
|
|
|
|
"slurpToMemory": true,
|
|
|
|
"devBlockStartupOn": "/sync-index/"
|
|
|
|
}
|
|
|
|
},
|
2013-06-23 20:50:02 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/importer/": {
|
|
|
|
"handler": "importer",
|
|
|
|
"handlerArgs": {
|
|
|
|
"dummy": {
|
|
|
|
"clientID": "dummyID",
|
|
|
|
"clientSecret": "foobar"
|
|
|
|
},
|
|
|
|
"flickr": {
|
|
|
|
"clientSecret": ["_env", "${CAMLI_FLICKR_API_KEY}", ""]
|
|
|
|
},
|
|
|
|
"foursquare": {
|
|
|
|
"clientSecret": ["_env", "${CAMLI_FOURSQUARE_API_KEY}", ""]
|
|
|
|
},
|
|
|
|
"picasa": {
|
|
|
|
"clientSecret": ["_env", "${CAMLI_PICASA_API_KEY}", ""]
|
|
|
|
},
|
|
|
|
"twitter": {
|
|
|
|
"clientSecret": ["_env", "${CAMLI_TWITTER_API_KEY}", ""]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-10-19 22:48:05 +00:00
|
|
|
|
2014-04-01 16:03:20 +00:00
|
|
|
"/share/": {
|
|
|
|
"handler": "share",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobRoot": "/bs/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-05-02 01:36:11 +00:00
|
|
|
|
|
|
|
}
|