1. %% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
  2. %% ex: ts=4 sw=4 et
  3. [
  4.  %% Riak CS configuration
  5.  {riak_cs, [
  6.               %% == Basic Configuration ==
  7.  
  8.               %% Riak CS http/https port and IP address to listen at
  9.               %% for object storage activity
  10.               {cs_ip, "0.0.0.0"},
  11.               {cs_port, 8080 } ,
  12.  
  13.               %% Riak node to which Riak CS accesses
  14.               {riak_ip, "127.0.0.1"},
  15.               {riak_pb_port, 8087 } ,
  16.  
  17.               %% Configuration for access to request
  18.               %% serialization service
  19.               {stanchion_ip, "stanchion.domain.com"},
  20.               {stanchion_port, 8085 },
  21.               {stanchion_ssl, false },
  22.  
  23.               %% Enable this to allow the creation of an admin user
  24.               %% when setting up a system. It is recommended to only
  25.               %% enable this temporarily unless your use-case
  26.               %% specifically dictates letting anonymous users to
  27.               %% create accounts.
  28.               {anonymous_user_creation, false},
  29.  
  30.               %% Admin user credentials. Admin access like
  31.               %% /riak-cs/stats requires this entry to be set
  32.               %% properly. The credentials specified here must match
  33.               %% the admin credentials specified in the stanchion
  34.               %% app.config for the system to function properly.
  35.               {admin_key, "[redacted]"},
  36.               {admin_secret, "[redacted]"},
  37.  
  38.               %% Port and IP address to listen on for system
  39.               %% administration tasks. Uncomment the following lines
  40.               %% to use a separate IP and port for administrative
  41.               %% API calls.
  42.               %% {admin_ip, "127.0.0.1"},
  43.               %% {admin_port, 8000 } ,
  44.  
  45.               %% If SSL needed, un-comment. Without SSL
  46.               %% section, CS will be accessible via http.
  47.               %% {ssl, [
  48.               %%        {certfile, "./etc/cert.pem"},
  49.               %%        {keyfile, "./etc/key.pem"}
  50.               %%       ]},
  51.  
  52.               %% Root host name which Riak CS accepts.
  53.               %% Your CS bucket at s3.example.com will be accessible
  54.               %% via URL like http://bucket.s3.example.com/object/name
  55.               {cs_root_host, "cs.asktyne.com"},
  56.  
  57.               %% Connection pools
  58.               %% Each pool is specified as a nested
  59.               %% tuple of {Name, {FixedSize, OverflowSize}}
  60.               {connection_pools,
  61.                [
  62.                 {request_pool, {128, 0} },
  63.                 {bucket_list_pool, {5, 0} }
  64.                ]},
  65.  
  66.               %% == API and Authentication ==
  67.              {rewrite_module, riak_cs_s3_rewrite },
  68.              {auth_module, riak_cs_s3_auth },
  69.  
  70.               %% == Bucket (List Objects) ==
  71.  
  72.               %% Set this to true once you've upgraded all of your
  73.               %% Riak nodes to 1.4.0 or greater.
  74.               {fold_objects_for_list_keys, false},
  75.  
  76.               %% == n-val 1 GET requests ==
  77.  
  78.               {n_val_1_get_requests, true},
  79.  
  80.               %% == Rolling upgrade support ==
  81.  
  82.               %% Riak CS version number. This is used to selectively
  83.               %% enable new features for the current version to better
  84.               %% support rolling upgrades. New installs should not
  85.               %% need to modify this. If peforming a rolling upgrade
  86.               %% then set this value to 0 until all nodes have been
  87.               %% upgraded and then set back to the original value.
  88.               {cs_version, 10300 },
  89.  
  90.               %% == Usage recording ==
  91.  
  92.               %% Riak CS version number. This is used to selectively
  93.               %% enable new features for the current version to better
  94.               %% support rolling upgrades. New installs should not
  95.               %% need to modify this. If peforming a rolling upgrade
  96.               %% then set this value to 0 until all nodes have been
  97.               %% upgraded and then set back to the original value.
  98.               {cs_version, 10300 },
  99.  
  100.               %% == Usage recording ==
  101.  
  102.               %% How often to flush the access log; integer factor of
  103.               %% access_archive_period (1 == once per period; 2 ==
  104.               %% twice per period, etc.)
  105.               {access_log_flush_factor, 1},
  106.  
  107.               %% Additional access log flush trigger - flush after
  108.               %% this many accesses are recorded, even if the flush
  109.               %% interval has not expired; integer number of accesses
  110.               {access_log_flush_size, 1000000},
  111.  
  112.               %% How large each access archive object is. Should be a
  113.               %% multiple of access_log_flush_interval; integer number
  114.               %% of seconds (3600 == 1 hour)
  115.               {access_archive_period, 3600},
  116.  
  117.               %% How many access logs are allowed to pile up in the
  118.               %% archiver's queue before it starts skipping to catch
  119.               %% up; integer number of logs
  120.               {access_archiver_max_backlog, 2},
  121.  
  122.               %% When to automatically start storage calculation
  123.               %% batches; list of "HHMM" UTC times
  124.               %% ([] == do not automatically calculation;
  125.               %%  ["0600"] == automatically calculate at 6am UTC every day;
  126.               %%  ["0600","1945"] == automatically calculate at 6am and
  127.               %%                     again at 7:45pm every day)
  128.               {storage_schedule, []},
  129.  
  130.               %% How large each storage archive object is. Should be
  131.               %% chosen such that each storage_schedule entry falls in
  132.               %% a different period; integer number of seconds
  133.               %% (86400 == 1 day)
  134.               {storage_archive_period, 86400},
  135.  
  136.               %% How many archive periods a user can request in one
  137.               %% usage read, applied independently to access and
  138.               %% storage; integer number of intervals (744 == 1 month
  139.               %% @ 1 hour intervals)
  140.               {usage_request_limit, 744},
  141.  
  142.               %% == Garbage Collection ==
  143.  
  144.               %% The number of seconds to retain the block
  145.               %% for an object after it has been deleted.
  146.               %% This leeway time is set to give the delete
  147.               %% indication time to propogate to all replicas.
  148.               %% 86400 is 24-hours.
  149.               {leeway_seconds, 86400},
  150.  
  151.               %% How often the garbage collection daemon
  152.               %% waits in-between gc batches.
  153.               %% 900 is 15-minutes.
  154.               {gc_interval, 900},
  155.  
  156.               %% How long a move to the garbage
  157.               %% collection to do list can remain
  158.               %% failed, before we retry it.
  159.               %% 21600 is 6-hours.
  160.               {gc_retry_interval, 21600},
  161.  
  162.               %% If your load balancer adds 'X-Forwarded-For' header
  163.               %% and it is reliable (able to gaurantee it is not added
  164.               %% by malicious user), turn this true. Otherwise, by
  165.               %% default, Riak CS takes source IP address as an input.
  166.               {trust_x_forwarded_for, false},
  167.  
  168.               %% == DTrace ==
  169.  
  170.               %% If your Erlang virtual machine supports DTrace (or
  171.               %% user-space SystemTap), set dtrace_support to true.
  172.               {dtrace_support, false}
  173.  
  174.              ]},
  175.  
  176.  {webmachine, [
  177.                %% custom server name at http response header "Server: Riak CS"
  178.                {server_name, "Riak CS"},
  179.  
  180.                %% The webmachine_log_handler entry can be
  181.                %% commented-out or removed to disable access
  182.                %% logging. Do not remove the
  183.                %% riak_cs_access_log_handler entry.
  184.                {log_handlers, [
  185.                                {webmachine_log_handler, ["/var/log/riak-cs"]},
  186.                                {riak_cs_access_log_handler, []}
  187.                               ]}
  188.               ]},
  189.  
  190.  {lager, [
  191.           %% What handlers to install with what arguments
  192.           %% The defaults for the logfiles are to rotate the files when
  193.           %% they reach 10Mb or at midnight, whichever comes first, and keep
  194.           %% the last 5 rotations. See the lager README for a description of
  195.           %% the time rotation format:
  196.           %% https://github.com/basho/lager/blob/master/README.org
  197.           %%
  198.           %% If you wish to disable rotation, you can either set the size to 0
  199.           %% and the rotation time to "", or instead specify a 2-tuple that only
  200.           %% consists of {Logfile, Level}.
  201.           %%
  202.           %% To enable logging to syslog, add the following handler:
  203.           %%
  204.           %% {lager_syslog_backend, ["riak", local1, info]}
  205.           {handlers, [
  206.                       {lager_console_backend, info},
  207.                       {lager_file_backend, [{file, "/var/log/riak-cs/error.log"},
  208.                                             {level, error},
  209.                                             {size, 10485760},
  210.                                             {date, "$D0"},
  211.                                             {count, 5}]},
  212.                       {lager_file_backend, [{file, "/var/log/riak-cs/console.log"},
  213.                                             {level, info},
  214.                                             {size, 10485760},
  215.                                             {date, "$D0"},
  216.                                             {count, 5}]}
  217.                      ]},
  218.  
  219.           %% Whether to write a crash log, and where.
  220.           %% Commented/omitted/undefined means no crash logger.
  221.           {crash_log, "/var/log/riak-cs/crash.log"},
  222.  
  223.           %% Maximum size in bytes of events in the crash log - defaults to 65536
  224.           {crash_log_msg_size, 65536},
  225.  
  226.           %% Maximum size of the crash log in bytes, before its rotated, set
  227.           %% to 0 to disable rotation - default is 0
  228.           {crash_log_size, 10485760},
  229.  
  230.           %% What time to rotate the crash log - default is no time
  231.           %% rotation. See the lager README for a description of this format:
  232.           %% https://github.com/basho/lager/blob/master/README.org
  233.           {crash_log_date, "$D0"},
  234.  
  235.           %% Number of rotated crash logs to keep, 0 means keep only the
  236.           %% current one - default is 0
  237.           {crash_log_count, 5},
  238.  
  239.           %% Whether to redirect error_logger messages into lager - defaults to true
  240.           {error_logger_redirect, true}
  241.          ]},
  242.  
  243.  %% SASL config
  244.  {sasl, [
  245.          {sasl_error_logger, false}
  246.         ]}
  247. ].
  248.  

Posted by Andrew T. at 14 Nov 2013, 05:01:28 Etc/UTC
Language: text