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],
|
2014-10-28 13:56:26 +00:00
|
|
|
"httpsCert": "config/tls.crt",
|
|
|
|
"httpsKey": "config/tls.key",
|
2014-04-01 16:03:20 +00:00
|
|
|
"prefixes": {
|
|
|
|
"/": {
|
|
|
|
"handler": "root",
|
|
|
|
"handlerArgs": {
|
|
|
|
"ownerName": ["_env", "${USER}-dev"],
|
2015-05-02 12:26:33 +00:00
|
|
|
"jsonSignRoot": "/sighelper/",
|
2014-04-01 16:03:20 +00:00
|
|
|
"blobRoot": "/bs-recv/",
|
2015-02-21 12:22:11 +00:00
|
|
|
"helpRoot": "/help/",
|
2014-04-01 16:03:20 +00:00
|
|
|
"statusRoot": "/status/",
|
|
|
|
"searchRoot": "/my-search/",
|
2016-11-09 23:14:32 +00:00
|
|
|
"shareRoot": "/share/",
|
2014-04-01 16:03:20 +00:00
|
|
|
"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",
|
2016-07-19 15:58:29 +00:00
|
|
|
"prefix": "/pics/",
|
|
|
|
"serverListen": "localhost:3179",
|
|
|
|
"serverBaseURL": ["_env", "${CAMLI_BASEURL}"],
|
2014-06-14 20:14:34 +00:00
|
|
|
"appConfig": {
|
|
|
|
"camliRoot": "dev-pics-root",
|
2016-08-30 16:41:57 +00:00
|
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}/app/publisher", ""],
|
2014-06-14 20:14:34 +00:00
|
|
|
"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}", ""],
|
|
|
|
"cache": "/cache/",
|
|
|
|
"scaledImage": {
|
2016-05-23 14:37:01 +00:00
|
|
|
"type": "leveldb",
|
|
|
|
"file": ["_env", "${CAMLI_ROOT_CACHE}/thumbnails.leveldb", ""]
|
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
|
|
|
|
2015-02-21 12:22:11 +00:00
|
|
|
"/help/": {
|
|
|
|
"handler": "help"
|
|
|
|
},
|
|
|
|
|
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/": {
|
2015-02-05 05:02:38 +00:00
|
|
|
"handler": "storage-blobpacked",
|
|
|
|
"handlerArgs": {
|
|
|
|
"smallBlobs": "/bs-loose/",
|
|
|
|
"largeBlobs": "/bs-packed/",
|
|
|
|
"metaIndex": {
|
2016-05-23 14:37:01 +00:00
|
|
|
"type": "leveldb",
|
|
|
|
"file": ["_env", "${CAMLI_ROOT}/packindex.leveldb"]
|
|
|
|
}
|
2015-02-05 05:02:38 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"/bs-loose/": {
|
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
2015-07-23 14:43:03 +00:00
|
|
|
"path": ["_env", "${CAMLI_ROOT}"]
|
2015-02-05 05:02:38 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"/bs-packed/": {
|
2014-04-01 16:03:20 +00:00
|
|
|
"handler": "storage-filesystem",
|
|
|
|
"handlerArgs": {
|
2015-02-05 05:02:38 +00:00
|
|
|
"path": ["_env", "${CAMLI_ROOT}/packed"]
|
2014-04-01 16:03:20 +00:00
|
|
|
}
|
|
|
|
},
|
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-08-26 16:27:23 +00:00
|
|
|
"/index-memory/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_MEMINDEX_ENABLED}"],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "memory"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2015-07-22 21:59:14 +00:00
|
|
|
"/index-leveldb/": {
|
|
|
|
"enabled": ["_env", "${CAMLI_LEVELDB_ENABLED}"],
|
|
|
|
"handler": "storage-index",
|
|
|
|
"handlerArgs": {
|
|
|
|
"blobSource": "/bs/",
|
|
|
|
"storage": {
|
|
|
|
"type": "leveldb",
|
|
|
|
"file": ["_env", "${CAMLI_DBNAME}", ""]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
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
|
|
|
|
|
|
|
}
|