Skip to content

Commit e4140dd

Browse files
committed
TD-44 document configuration options
1 parent f09a842 commit e4140dd

File tree

1 file changed

+83
-64
lines changed

1 file changed

+83
-64
lines changed

src/content/docs/customization/configuration.md

Lines changed: 83 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,6 @@ Resist the urge to set this to a big number!
216216

217217
### OAI configuration options
218218

219-
#### `AppConfig[:oai_proxy_url]`
220-
221-
> TODO - Needs more documentation
222-
223-
`AppConfig[:oai_proxy_url] = 'http://your-public-oai-url.example.com'`
224-
225219
**NOTE: As of version 2.5.2, the following parameters (oai_repository_name, oai_record_prefix, and oai_admin_email) have been deprecated. They should be set in the Staff User Interface. To set them, select the System menu in the Staff User Interface and then select Manage OAI-PMH Settings. These three settings are at the top of the page in the General Settings section. These settings will be completely removed from the config file when version 2.6.0 is released.**
226220

227221
#### `AppConfig[:oai_repository_name]`
@@ -279,46 +273,32 @@ want ArchivesSpace to put its data files elsewhere.
279273

280274
#### `AppConfig[:backup_directory]`
281275

282-
> TODO - Needs more documentation
276+
Directory to store automated backups when using the embedded demo database (Apache Derby instead of MySQL). This defaults to `demo_db_backups` within the `data` directory.
283277

284278
`AppConfig[:backup_directory] = proc { File.join(AppConfig[:data_directory], "demo_db_backups") }`
285279

286-
#### `AppConfig[:solr_index_directory]`
287-
288-
> TODO - Needs more documentation
289-
290-
`AppConfig[:solr_index_directory] = proc { File.join(AppConfig[:data_directory], "solr_index") }`
291-
292-
#### `AppConfig[:solr_home_directory]`
293-
294-
> TODO - Needs more documentation
295-
296-
`AppConfig[:solr_home_directory] = proc { File.join(AppConfig[:data_directory], "solr_home") }`
297-
298280
### Solr defaults
299281

300282
#### `AppConfig[:solr_indexing_frequency_seconds]`
301283

302-
> TODO - Needs more documentation
284+
The number of seconds between each run of the SUI and PUI indexers. The indexers will perform and indexing cycle every configured number of seconds.
303285

304286
`AppConfig[:solr_indexing_frequency_seconds] = 30`
305287

306288
#### `AppConfig[:solr_facet_limit]`
307289

308-
> TODO - Needs more documentation
290+
The maximum number of distinct facet terms Solr will include in the response for a given field.
309291

310292
`AppConfig[:solr_facet_limit] = 100`
311293

312294
#### `AppConfig[:default_page_size]`
313295

314-
> TODO - Needs more documentation
315-
296+
The number of records included in each page in all paginated backend api responses.
316297
`AppConfig[:default_page_size] = 10`
317298

318299
#### `AppConfig[:max_page_size]`
319300

320-
> TODO - Needs more documentation
321-
301+
Requests to the backend api can define a custom page_size param. This is the maximum allowed page size.
322302
`AppConfig[:max_page_size] = 250`
323303

324304
### Cookie prefix
@@ -332,119 +312,141 @@ Default is "archivesspace".
332312

333313
`AppConfig[:cookie_prefix] = "archivesspace"`
334314

335-
### Indexer settings
315+
### SUI Indexer settings
336316

317+
The size of each batch of records passed to each indexer worker-thread to process and push to solr.
337318
The periodic indexer can run using multiple threads to take advantage of
338319
multiple CPU cores. By setting these two options, you can control how many
339320
CPU cores are used, and the amount of memory that will be consumed by the
340321
indexing process (more cores and/or more records per thread means more memory used).
341322

342323
#### `AppConfig[:indexer_records_per_thread]`
343324

325+
The size of each batch of records passed to each indexer worker-thread to process and push to solr. More records per thread means that more memory will be used by the indexer process.
344326
`AppConfig[:indexer_records_per_thread] = 25`
345327

346328
#### `AppConfig[:indexer_thread_count]`
347329

330+
The number of worker-thread to be used by the SUI indexer. More worker-threads means that more CPU cores will be used.
348331
`AppConfig[:indexer_thread_count] = 4`
349332

350333
#### `AppConfig[:indexer_solr_timeout_seconds]`
351334

352-
> TODO - Needs more documentation
335+
The indexer is making requests to solr in order to push updated records to the solr index. This is the maximum number of seconds that the indexer will wait for solr to respond to a request.
353336

354337
`AppConfig[:indexer_solr_timeout_seconds] = 300`
355338

356339
### PUI Indexer Settings
357340

358341
#### `AppConfig[:pui_indexer_enabled]`
359342

360-
> TODO - Needs more documentation
361-
343+
If false no pui indexer is started. Set to false if not using the PUI at all.
362344
`AppConfig[:pui_indexer_enabled] = true`
363345

364346
#### `AppConfig[:pui_indexing_frequency_seconds]`
365347

366-
> TODO - Needs more documentation
367-
348+
The number of seconds between each run of the PUI indexer. The indexer will perform and indexing cycle every configured number of seconds.
368349
`AppConfig[:pui_indexing_frequency_seconds] = 30`
369350

370351
#### `AppConfig[:pui_indexer_records_per_thread]`
371352

372-
> TODO - Needs more documentation
353+
The size of each batch of records passed to each indexer worker-thread to process and push to solr.
354+
The PUI indexer can run using multiple threads to take advantage of
355+
multiple CPU cores. By setting these two options, you can control how many
356+
CPU cores are used, and the amount of memory that will be consumed by the
357+
indexing process (more cores and/or more records per thread means more memory used).
373358

374359
`AppConfig[:pui_indexer_records_per_thread] = 25`
375360

376361
#### `AppConfig[:pui_indexer_thread_count]`
377362

378-
> TODO - Needs more documentation
379-
363+
The number of worker-thread to be used by the PUI indexer. More worker-threads means that more CPU cores will be used.
380364
`AppConfig[:pui_indexer_thread_count] = 1`
381365

382366
### Index state
383367

384368
#### `AppConfig[:index_state_class]`
385369

386-
Set to 'IndexStateS3' for amazon s3
387-
388-
> TODO - Needs more documentation
370+
The indexer needs a place to store it's state (keep track of which records have already been indexed).
371+
Set to 'IndexState' (default) to store the state in the local `data` directory.
372+
Set to 'IndexStateS3' (optional) to store the state in an AWS S3 bucket in the Amazon Cloud.
389373

390374
`AppConfig[:index_state_class] = 'IndexState'`
391375

392-
#### `AppConfig[:index_state_s3]`
376+
#### `AppConfig[:index_state_s3]` - Relevant only when using S3 storage for the indexer state
393377

394-
Store indexer state in amazon s3 (optional)
395-
NOTE: s3 charges for read / update requests and the pui indexer is continually
396-
writing to state files so you may want to increase pui_indexing_frequency_seconds
378+
If using S3 storage for the indexer state in amazon s3 (optional), you need to configure the access to S3.
397379

398-
> TODO - Needs more documentation
380+
NOTE: S3 charges for read / update requests and the pui indexer is continually
381+
writing to state files so you may want to increase `pui_indexing_frequency_seconds` and `solr_indexing_frequency_seconds`
382+
383+
##### Configuring S3 access using environment variables (default)
384+
385+
By default, the S3 configuration is fetched from the following shell environment variables:
386+
387+
- `AWS_REGION`
388+
- `AWS_ACCESS_KEY_ID`
389+
- `AWS_SECRET_ACCESS_KEY`
390+
- `AWS_ASPACE_BUCKET`
391+
392+
It is using the `:cookie_prefix` configuration as a prefix for the state files stored in the bucket - usefull when using the same bucket to store indexer state of multiple archivesspace instances.
393+
394+
##### Configuring S3 access using AppConfig variable in the `config.rb` file
399395

400396
```ruby
401397
AppConfig[:index_state_s3] = {
402-
region: ENV.fetch("AWS_REGION"),
403-
aws_access_key_id: ENV.fetch("AWS_ACCESS_KEY_ID"),
404-
aws_secret_access_key: ENV.fetch("AWS_SECRET_ACCESS_KEY"),
405-
bucket: ENV.fetch("AWS_ASPACE_BUCKET"),
398+
region: "us-east-1",
399+
aws_access_key_id: "ASIAXXXXEXAMPLEID",
400+
aws_secret_access_key: "xXxxXXxxXX/XXXXXX/XXXXXXXEXAMPLEKEY",
401+
bucket: ENV.fetch("my-as-test-bucket"),
406402
prefix: proc { "#{AppConfig[:cookie_prefix]}_" },
407403
}
408404
```
409405

406+
You can use `prefix: "some random string"` instead of the above code that used the `:cookie_prefix` AppConfig variable.
407+
410408
### Misc. database options
411409

412410
#### `AppConfig[:allow_other_unmapped]`
413411

414-
> TODO - Needs more documentation
412+
Allow assigning the special enumeration value `other_unmapped` for dynamic enum (controlled value) fields. When set to `true` `other_unmapped` is treated as a valid value for all enumeration (controlled value) fields. The `other_unmapped` value is added as a possible value for all controlled value lists.
413+
This feature is designed for handling unmapped or unknown enumeration values, eventually useful during data migrations where source data may have values not yet defined in controlled value lists, or generally importing external data that uses values that are not already defined in a controlled value list.
415414

416415
`AppConfig[:allow_other_unmapped] = false`
417416

418417
#### `AppConfig[:db_url_redacted]`
419418

420-
> TODO - Needs more documentation
419+
This is how the database url (which includes the database username and password) will appear in the logs. The default replaces the username and password with `REDACTED`, so that:
420+
`"user=john&password=secret123"`
421+
becomes
422+
`"user=[REDACTED]&password=[REDACTED]"`
421423

422424
`AppConfig[:db_url_redacted] = proc { AppConfig[:db_url].gsub(/(user|password)=(.*?)(&|$)/, '\1=[REDACTED]\3') }`
423425

424426
#### `AppConfig[:demo_db_backup_schedule]`
425427

426-
> TODO - Needs more documentation
428+
When using the embedded demo database (Apache Derby instead of MySQL) this is the schedule of the automated backups, in cron format. By default, it is at 4AM every day.
427429

428430
`AppConfig[:demo_db_backup_schedule] = "0 4 * * *"`
429431

432+
#### `AppConfig[:demo_db_backup_number_to_keep] = 7`
433+
434+
How many backups to keep available when using the embedded demo database
435+
436+
`AppConfig[:demo_db_backup_number_to_keep] = 7`
437+
430438
#### `AppConfig[:allow_unsupported_database]`
431439

432-
> TODO - Needs more documentation
440+
Set this to true if you are determined to use a database other than MySQL or the embedded demo database based on Apache Derby (not-recommended!).
433441

434442
`AppConfig[:allow_unsupported_database] = false`
435443

436444
#### `AppConfig[:allow_non_utf8_mysql_database]`
437445

438-
> TODO - Needs more documentation
446+
Set this to true to skip the standard validation of the character encoding of MySQL tables being set to UTF8 (not-recommended!).
439447

440448
`AppConfig[:allow_non_utf8_mysql_database] = false`
441449

442-
#### `AppConfig[:demo_db_backup_number_to_keep] = 7`
443-
444-
> TODO - Needs more documentation
445-
446-
`AppConfig[:demo_db_backup_number_to_keep] = 7`
447-
448450
### Proxy URLs
449451

450452
If you are serving user-facing applications via proxy
@@ -463,6 +465,12 @@ Proxy URL for the public interface
463465

464466
`AppConfig[:public_proxy_url] = proc { AppConfig[:public_url] }`
465467

468+
#### `AppConfig[:oai_proxy_url]`
469+
470+
Proxy URL for the oai service (if exposed, see OAI section)
471+
472+
`AppConfig[:oai_proxy_url] = 'http://your-public-oai-url.example.com'`
473+
466474
#### `AppConfig[:frontend_proxy_prefix]`
467475

468476
Don't override this setting unless you know what you're doing
@@ -545,14 +553,18 @@ to the regular backend URL.
545553

546554
### Theme
547555

548-
> TODO - Needs more documentation
556+
For theming customization, see https://docs.archivesspace.org/customization/theming/
549557

550558
#### `AppConfig[:frontend_theme]`
551559

560+
Name of the theme to use on the Staff UI
561+
552562
`AppConfig[:frontend_theme] = "default"`
553563

554564
#### `AppConfig[:public_theme]`
555565

566+
Name of the theme to use on the Public UI
567+
556568
`AppConfig[:public_theme] = "default"`
557569

558570
### Session expiration
@@ -571,25 +583,28 @@ Sessions marked as non-expirable will eventually expire too, but after a longer
571583

572584
### System usernames
573585

574-
> TODO - Needs more documentation
586+
Hidden (not viewable on the Staff UI User management) system users are automatically created to be used by the indexer, the PUI and the Staff UI in order to access the backend API.
575587

576588
#### `AppConfig[:search_username]`
577589

590+
The user name of the hidden system user that the indexer uses to access the backend API
578591
`AppConfig[:search_username] = "search_indexer"`
579592

580593
#### `AppConfig[:public_username]`
581594

595+
The user name of the hidden system user that the PUI uses to access the backend API
596+
582597
`AppConfig[:public_username] = "public_anonymous"`
583598

584599
#### `AppConfig[:staff_username]`
585600

601+
The user name of the hidden system user that the Staff UI uses to access the backend API
602+
586603
`AppConfig[:staff_username] = "staff_system"`
587604

588605
### Authentication sources
589606

590-
> TODO - Needs more documentation
591-
592-
#### `AppConfig[:authentication_sources]`
607+
ArchivesSpace comes with its own user management functionality but can also be configured to authenticate against one or more [LDAP directories](/customization/ldap/). Oauth authentication is available using the [aspace-oauth plugin](https://github.com/lyrasis/aspace-oauth)
593608

594609
`AppConfig[:authentication_sources] = []`
595610

@@ -601,15 +616,19 @@ Sessions marked as non-expirable will eventually expire too, but after a longer
601616
602617
`AppConfig[:realtime_index_backlog_ms] = 60000`
603618

619+
### Notifications configuration
620+
621+
An internal notification mechanism is used to keep user preferences, enumeration (controlled value list) values, repository information etc. up to date within the UI while minimizing requests to the backend API.
622+
604623
#### `AppConfig[:notifications_backlog_ms]`
605624

606-
> TODO - Needs more documentation
625+
Notifications older that this amount of miliseconds are considered expired and will not be announced anymore.
607626

608627
`AppConfig[:notifications_backlog_ms] = 60000`
609628

610629
#### `AppConfig[:notifications_poll_frequency_ms]`
611630

612-
> TODO - Needs more documentation
631+
How often should notifications be announced.
613632

614633
`AppConfig[:notifications_poll_frequency_ms] = 1000`
615634

0 commit comments

Comments
 (0)