Skip to content

Commit 3643263

Browse files
committed
TD-44 document configuration options
1 parent fc18eb6 commit 3643263

1 file changed

Lines changed: 81 additions & 60 deletions

File tree

src/content/docs/customization/configuration.md

Lines changed: 81 additions & 60 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,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"),
406-
prefix: proc { "#{AppConfig[:cookie_prefix]}_" },
398+
region: "us-east-1",
399+
aws_access_key_id: "ASIAY34FZKBOKMUTVV7A",
400+
aws_secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
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+
TODO: For dynamic enums, automatically slot in the `"other_unmapped"` string as an allowable value.
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`
447450

448451
### Proxy URLs
449452

@@ -463,6 +466,12 @@ Proxy URL for the public interface
463466

464467
`AppConfig[:public_proxy_url] = proc { AppConfig[:public_url] }`
465468

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

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

546555
### Theme
547-
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,18 +583,25 @@ 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.
587+
588+
575589

576590
#### `AppConfig[:search_username]`
577591

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

580595
#### `AppConfig[:public_username]`
581596

597+
The user name of the hidden system user that the PUI uses to access the backend API
598+
582599
`AppConfig[:public_username] = "public_anonymous"`
583600

584601
#### `AppConfig[:staff_username]`
585602

603+
The user name of the hidden system user that the Staff UI uses to access the backend API
604+
586605
`AppConfig[:staff_username] = "staff_system"`
587606

588607
### Authentication sources
@@ -591,6 +610,8 @@ Sessions marked as non-expirable will eventually expire too, but after a longer
591610
592611
#### `AppConfig[:authentication_sources]`
593612

613+
Additional authentication sources are configured here, see for example: https://github.com/lyrasis/aspace-oauth?tab=readme-ov-file#configuration
614+
594615
`AppConfig[:authentication_sources] = []`
595616

596617
### Misc. backlog and snapshot settings

0 commit comments

Comments
 (0)