Configuration Files

Configuration Files

Avalon configuration files are in YAML format and located in the application’s config directory.

settings.yml

Instance and environment-specific Avalon configuration options.

Config file overwrites should be placed in config/settings/<environment>.local.yml.

If using env var, set SETTINGS__EMAIL__MAILER=aws_sdk to send emails using Amazon SES. 

name: 'Avalon Media System' # used in page titles domain: host: localhost port: 80 protocol: http dropbox: path: '/usr/local/masterfiles/dropbox/' upload_uri: 'sftp://localhost/srv/avalon/dropbox' google_drive: # See Google Drive Dropbox (https://samvera.atlassian.net/wiki/spaces/AVALON/pages/1957954421/Google+Drive+Dropbox) for more details. client_id: id client_secret: secret redis_token_store_url: redis://host:port # if different from Avalon's Redis sharepoint: client_id: YOUR_MICROSOFT_GRAPH_CLIENT_ID client_secret: YOUR_MICROSOFT_GRAPH_CLIENT_SECRET tenant_id: YOUR_MICROSOFT_GRAPH_TENANT_ID scope: offline_access https://graph.microsoft.com/.default redirect_uri: https://example.com/browse/connect encoding: engine_adapter: ffmpeg presets_path: config/ffmpeg_presets.yml working_file_path: '/usr/local/masterfiles mediainfo: path: '/usr/bin/mediainfo' ffmpeg: path: '/usr/bin/ffmpeg' ffprobe: path: '/usr/bin/ffprobe' email: comments: 'digitalcollections@northwestern.edu' notification: 'digitalcollections@northwestern.edu' support:'digitalcollections@northwestern.edu' mailer: :smtp # or aws_sdk if using Amazon SES config: address: 'mail-relay.iu.edu' port: 587 enable_starttls_auto: false # Accessibility request form link displayed on item view page accessibility_request_link: 'https://example.edu/a11y-form' solr: configset: avalon configset_source_path: <%= File.join(Rails.root, 'solr', 'config') %> collection_options: async: auto_add_replicas: collection: config_name: avalon create_node_set: max_shards_per_node: num_shards: 1 replication_factor: router: name: field: rule: shards: snitch: zookeeper: connection_str: "localhost:9983/configs" streaming: server: :nginx # or :wowza content_path: /var/avalon/derivatives http_base: http://localhost:3000/streams stream_token_ttl: 20 #minutes default_quality: 'auto' # Referer header to use when making m3u8 requests to the streaming server which the streaming # server then uses to make auth callbacks. This is useful to allow the streaming server to use # an alternate address (like an internal firewalled address) for avalon than the public address auth_referer: http://127.0.0.1:3000 redis: host: localhost port: 6379 db: 0 # The redis database is now configurable.  0 is the default redis database. groups: system_groups: ['administrator', 'group_manager', 'manager'] master_file_management: strategy: 'move' path: '/mnt/diskarray/avalon-archive' bib_retriever: protocol: sru url: http://zgate.library.example.edu:9000/catdb query: rec.id=%{bib_id} controlled_vocabulary: path: 'config/controlled_vocabulary.yml' fedora: namespace: 'numedia' minio: # if using endpoint: http://minio:9000 public_host: http://localhost:9000 # if different from endpoint access: <minio access key> secret: <minio secret key> flash_message: type: ['success', 'notice', 'error', 'alert'] message: '<p>A test message.</p>' auth: registerable: true # Set to false to disable new user registrations configuration: # List of available Authentication Providers and associated configurations. # The name and logo settings are used when displaying multiple auth providers to choose from at login time. # provider and params are passed directly to config.omniauth as described in the Devise OmniAuth Overview. - :name: Avalon Test Auth :provider: :identity :params: :fields: - :email - :name: Avalon Lti OAuth :provider: :lti :hidden: true :params: :oauth_credentials: somekey: somevalue - :name: My LDAP Server :logo: auth_provider_logo.png :provider: :ldap :params: :method: :ssl :host: ldap.example.edu :port: 636 :bind_dn: cn=avalon,ou=service,dc=example,dc=edu :password: avalon_bind_password recaptcha: site_key: # Setting a site_key will enable recaptcha on the comments form secret_key: # Required along with site_key type: "v2_checkbox" # or "v3" v3: action: "comment" minimum_score: 0.5 google_analytics_tracking_id: "your_GA_id" max_upload_size: "4294967296" # Change maximum file size accepted for web upload, in bytes (ex is for 4 GiB). supplemental_files: proxy: false waveform: player_width: 1200 #pixels finest_zoom: 5 #seconds sample_rate: 41000 active_storage: service: local #bucket: supplementalfiles root: 'storage' # The directory used for storing supplemental files locally can now be configured using the root setting and in s3 or minio using the bucket setting.  This avoids the need to edit config/storage.yml controlled_digital_lending: enable: false collections_enabled: false # Set Controlled Digital Lending (CDL) to be enabled or disabled by default for new collections default_lending_period: 'P14D' # ISO8601 duration format: P14D == 14.days, PT8H == 8.hours, etc. caption_default: # Define default values in the HLS manifest for caption language and label language: 'eng' # language should be 3 letter ISO 639-2 code name: 'English' home_page: featured_collections: ['7m01bk80s', 'qz20ss619'] carousel_collections: ['v118rd550', 'pn89d6567', 'mp48sc83h', 'qz20ss50s'] # Enable read-only mode for disabling all save interactions with fedora and solr # Does not affect actions that only affect the database # This is useful when running long migrations repository_read_only_mode: false repository_read_only_mode_message: "🚧 Read-only mode: all content editing has been disabled 🚧"

database.yml

Environment-specific database connection information for Rails. See Configuring a Database in the Ruby on Rails Getting Started Guide for more options. Changing the database adapter will require updating Gemfile to require the correct adapter. Here are the instructions for installing the mysql adapter called mysql2.

production: adapter: mysql2 host: localhost database: rails username: rails password: rails pool: 5 timeout: 5000 

fedora.yml

Environment-specific Fedora repository connection information for Hydra

production: user: fedoraAdmin password: fedoraAdmin url: http://127.0.0.1:8984/fedora4/rest base_path: /prod

intercom.yml

Configuration for optional Intercom feature. Allows this instance on Avalon to push contents to another instance of Avalon. Intercom utilizes the Ingest API and requires an API token to connect. This token is generated on the target Avalon with `bundle exec rake avalon:token:generate username=archivist email=archivist1@example.com`

The streaming files will remain in place. Both instances of Avalon must be able to stream from that location.

intercom:   default:     url: https://some.avalon.com/     api_token: a_valid_token     import_bib_record: true     publish: false push_label: text for the 'push' button

solr.yml

Environment-specific Solr connection information for Hydra

production: url: http://localhost:8983/solr/avalon

role_map_<environment>.yml

Role groups and associated members to initialize the Hydra access controls database with. Example environments: development, production, test. For example, in a production environment the file would be named role_map_production.yml.

collection_manager: - archivist1@example.edu - archivist2@example.edu group_manager: - donor1@example.com manager: - researcher1@example.edu administrator: - user1@example.edu - user2@otherinstitution.edu

controlled_vocabulary.yml

See Controlled Vocabularies.

Things to Note About Avalon Configuration

Changes to configuration files often require restarting Avalon to take affect. They also require Sidekiq (the background jobs processor) to be restarted.

It's recommended to override the default settings by creating a config/settings/<environment>.local.yml instead of modifying the config/settings.yml directly.

You can also use environment variables, for example SETTINGS__DOMAIN__HOST maps to Settings.domain.host.

Since the Config gem doesn't support arrays in environment variable, Settings.auth.configuration requires a key for every entry, e.g.:

  SETTINGS__AUTH__CONFIGURATION__IU__NAME=Indiana University SETTINGS__AUTH__CONFIGURATION__IU__PROVIDER=cas SETTINGS__AUTH__CONFIGURATION__IU__PARAMS__CLIENT_ID=client_id_value SETTINGS__AUTH__CONFIGURATION__IU__PARAMS__CLIENT_SECRET=client_secret_value