Skip to content

Commit f03a4f0

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

1 file changed

Lines changed: 82 additions & 63 deletions

File tree

src/content/docs/customization/configuration.md

Lines changed: 82 additions & 63 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,118 +312,143 @@ 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"),
406-
prefix: proc { "#{AppConfig[:cookie_prefix]}_" },
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"),
402+
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+
408+
410409
### Misc. database options
411410

412411
#### `AppConfig[:allow_other_unmapped]`
413412

414-
> TODO - Needs more documentation
413+
414+
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.
415+
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.
415416

416417
`AppConfig[:allow_other_unmapped] = false`
417418

418419
#### `AppConfig[:db_url_redacted]`
419420

420-
> TODO - Needs more documentation
421+
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:
422+
`"user=john&password=secret123"`
423+
becomes
424+
`"user=[REDACTED]&password=[REDACTED]"`
421425

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

424428
#### `AppConfig[:demo_db_backup_schedule]`
425429

426-
> TODO - Needs more documentation
430+
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.
427431

428432
`AppConfig[:demo_db_backup_schedule] = "0 4 * * *"`
429433

434+
#### `AppConfig[:demo_db_backup_number_to_keep] = 7`
435+
436+
How many backups to keep available when using the embedded demo database
437+
438+
`AppConfig[:demo_db_backup_number_to_keep] = 7`
439+
430440
#### `AppConfig[:allow_unsupported_database]`
431441

432-
> TODO - Needs more documentation
442+
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!).
433443

434444
`AppConfig[:allow_unsupported_database] = false`
435445

436446
#### `AppConfig[:allow_non_utf8_mysql_database]`
437447

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

440450
`AppConfig[:allow_non_utf8_mysql_database] = false`
441451

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`
447452

448453
### Proxy URLs
449454

@@ -463,6 +468,12 @@ Proxy URL for the public interface
463468

464469
`AppConfig[:public_proxy_url] = proc { AppConfig[:public_url] }`
465470

471+
#### `AppConfig[:oai_proxy_url]`
472+
473+
Proxy URL for the oai service (if exposed, see OAI section)
474+
475+
`AppConfig[:oai_proxy_url] = 'http://your-public-oai-url.example.com'`
476+
466477
#### `AppConfig[:frontend_proxy_prefix]`
467478

468479
Don't override this setting unless you know what you're doing
@@ -544,15 +555,18 @@ to the regular backend URL.
544555
`AppConfig[:backend_instance_urls] = proc { [AppConfig[:backend_url]] }`
545556

546557
### Theme
547-
548-
> TODO - Needs more documentation
558+
For theming customization, see https://docs.archivesspace.org/customization/theming/
549559

550560
#### `AppConfig[:frontend_theme]`
551561

562+
Name of the theme to use on the Staff UI
563+
552564
`AppConfig[:frontend_theme] = "default"`
553565

554566
#### `AppConfig[:public_theme]`
555567

568+
Name of the theme to use on the Public UI
569+
556570
`AppConfig[:public_theme] = "default"`
557571

558572
### Session expiration
@@ -571,25 +585,30 @@ Sessions marked as non-expirable will eventually expire too, but after a longer
571585

572586
### System usernames
573587

574-
> TODO - Needs more documentation
588+
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.
589+
590+
575591

576592
#### `AppConfig[:search_username]`
577593

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

580597
#### `AppConfig[:public_username]`
581598

599+
The user name of the hidden system user that the PUI uses to access the backend API
600+
582601
`AppConfig[:public_username] = "public_anonymous"`
583602

584603
#### `AppConfig[:staff_username]`
585604

605+
The user name of the hidden system user that the Staff UI uses to access the backend API
606+
586607
`AppConfig[:staff_username] = "staff_system"`
587608

588609
### Authentication sources
589610

590-
> TODO - Needs more documentation
591-
592-
#### `AppConfig[:authentication_sources]`
611+
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)
593612

594613
`AppConfig[:authentication_sources] = []`
595614

0 commit comments

Comments
 (0)