canvas-lms/config/cassandra.yml.example

57 lines
2.3 KiB
Plaintext

# This file is used to configure any Apache Cassandra clusters that Canvas is
# going to use. Currently, all Cassandra usage is optional and disabled by
# default.
#
# Similar to database configuration, Keyspaces are not created by Canvas.
# You'll need to create the keyspace you are going to use *before* enabling
# Cassandra and trying to run the migrations. This gives you the flexibility
# to configure replication to meet your availability/retention requirements.
#
# Properly configuring a Cassandra cluster and replication is not trivial.
# Reading the documentation at http://www.datastax.com/docs/1.1/index is a good
# start.
#
# To create the page views keyspace locally for development and testing:
#
# For Cassandra 1.1 run `cqlsh -3` and:
# CREATE KEYSPACE page_views WITH strategy_class = 'SimpleStrategy' AND strategy_options:replication_factor = '1';
# CREATE KEYSPACE auditors WITH strategy_class = 'SimpleStrategy' AND strategy_options:replication_factor = '1';
#
# For Cassandra 1.2 and 2.0 run `cqlsh` and:
# CREATE KEYSPACE page_views WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
# CREATE KEYSPACE auditors WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
#
# To create the keyspace in production you'll need to determine the appropriate
# placement strategy and options.
# To use Cassandra for page views:
# 1. Create the keyspace in Cassandra.
# 2. Enable and fill in the configuration below. You can specify as many "seed" servers as you'd like from the cluster.
# 3. Run rake db:migrate to create the tables in the specified Keyspace.
# 4. In a script/console, run Setting.set('enable_page_views', 'cassandra')
# 5. Restart all app/job processes.
# You'll also need to have redis enabled and configured in redis.yml.
#
# To migrate the page views already in your database to cassandra, run
# rake db:migrate_pageviews_to_cassandra
# This will migrate all page views from the last 52 weeks for non-deleted accounts.
# development:
# page_views:
# servers:
# - 127.0.0.1:9160
# keyspace: page_views
# auditors:
# servers:
# - 127.0.0.1:9160
# keyspace: auditors
# test:
# page_views:
# servers:
# - 127.0.0.1:9160
# keyspace: page_views_test
# auditors:
# servers:
# - 127.0.0.1:9160
# keyspace: auditors_test