Skip to content

Commit 2b3a758

Browse files
RavlenRussell Dickenson
authored andcommitted
Fix kramdown warnings in the database support doc
1 parent d731cab commit 2b3a758

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

doc/development/database_support.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,32 @@ provides the design and definitions.
66

77
1. [Level 1](#level-1)
88
1. [Level 2](#level-2)
9-
1. [Examples](#examples)
10-
1. [Example 1: Registry database objects](#example-1-registry-database-objects)
11-
1. [Example 2: Registry database migrations](#example-2-registry-database-migrations)
12-
1. [Example 3: Use database objects and migrations of Registry](#example-3-use-database-objects-and-migrations-of-registry)
13-
1. [Example 4: Parametrized database objects resource for Rails](#example-4-parameterized-database-objects-resource-for-rails)
9+
1. [Examples](#examples)
10+
1. [Example 1: Registry database objects](#example-1-registry-database-objects)
11+
1. [Example 2: Registry database migrations](#example-2-registry-database-migrations)
12+
1. [Example 3: Use database objects and migrations of Registry](#example-3-use-database-objects-and-migrations-of-registry)
13+
1. [Example 4: Parametrized database objects resource for Rails](#example-4-parameterized-database-objects-resource-for-rails)
1414
1. [Level 3](#level-3)
1515
1. [Level 4](#level-4)
1616
1. [Considerations](#considerations)
1717
1. [Bridge the gap](#bridge-the-gap)
18-
1. [Reorganize the existing database operations](#reorganize-the-existing-database-operations)
19-
1. [Support dedicated PgBouncer user for databases](#support-dedicated-pgbouncer-user-for-databases)
20-
1. [Delay the population of PgBouncer database configuration](#delay-the-population-of-pgbouncer-database-configuration)
21-
1. [Configurable Consul watch for databases](#configurable-consul-watch-for-databases)
22-
1. [Helper class for general database migration requirements](#helper-class-for-general-database-migration-requirements)
18+
1. [Reorganize the existing database operations](#reorganize-the-existing-database-operations)
19+
1. [Support dedicated PgBouncer user for databases](#support-dedicated-pgbouncer-user-for-databases)
20+
1. [Delay the population of PgBouncer database configuration](#delay-the-population-of-pgbouncer-database-configuration)
21+
1. [Configurable Consul watch for databases](#configurable-consul-watch-for-databases)
22+
1. [Helper class for general database migration requirements](#helper-class-for-general-database-migration-requirements)
2323

2424
## Level 1
2525

26-
1. Add the new database-related configuration attributes to `gitlab.rb`. Do
27-
not forget to update `gitlab.rb.template`.
28-
1. Update the Chef recipe to consume the configuration attributes. At this
29-
level, the requirement is to pass down the attributes to the component,
30-
generally its through configuration files or command-line arguments.
26+
1. Add the new database-related configuration attributes to `gitlab.rb`. Do
27+
not forget to update `gitlab.rb.template`.
28+
1. Update the Chef recipe to consume the configuration attributes. At this
29+
level, the requirement is to pass down the attributes to the component,
30+
generally its through configuration files or command-line arguments.
3131

3232
For example in `registry` cookbook:
3333

3434
- `registry['database']` attribute is added to `gitlab.rb` (see [`attributes/default.rb`](https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/565f7a73f721fa40efc936dfd735b849986ce0ac/files/gitlab-cookbooks/registry/attributes/default.rb#L39)).
35-
3635
- The configuration template uses the attribute to configure registry (see [`templates/default/registry-config.yml.erb`](https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/565f7a73f721fa40efc936dfd735b849986ce0ac/files/gitlab-cookbooks/registry/templates/default/registry-config.yml.erb#L47)).
3736

3837
## Level 2
@@ -43,10 +42,10 @@ For example in `registry` cookbook:
4342

4443
1. Create a `database_objects` custom resource in `resources/` directory of the
4544
cookbook with the default `nothing` action (a no-op action) and a `create`
46-
action. The `create` action can leverage the existing `postgresql` custom
45+
action. The `create` action can leverage the existing `postgresql` custom
4746
resources to setup the required database objects for the component.
4847

49-
See:
48+
See:
5049
- `postgresql_user`
5150
- `postgresql_database`
5251
- `postgresql_schema`
@@ -329,13 +328,13 @@ end
329328
is enabled) or the name of the Consul service that is configured manually
330329
without Omnibus GitLab.
331330

332-
1. Use `database_watch` custom resource<sup>[[Needs Implementation](#configurable-consul-watch-for-databases)]</sup>
331+
1. Use `database_watch` custom resource<sup>([Needs Implementation](#configurable-consul-watch-for-databases))</sup>
333332
to define a new Consul watch for the database cluster service. It notifies
334333
PgBouncer to update the logical database endpoint when the leader of the
335334
cluster changes. Pass the name of the Consul service, logical database, and
336335
any other PgBouncer options as parameters to the watch.
337336

338-
_All `database_watch` resources must be placed in the `consul` cookbook_. As
337+
_All_ `database_watch` _resources must be placed in the_ `consul` _cookbook_. As
339338
opposed to the previous levels, this is the only place where database-related
340339
resources are concentrated in one cookbook, `consul`, and not managed in
341340
the same cookbooks as their associated components.
@@ -351,13 +350,13 @@ We don't want to introduce any breaking changes into `gitlab.rb`.
351350
- _No other resource should be involved with database setup_.
352351

353352
- All custom resources _must be idempotent_. For example they must not fail
354-
when an object already exist even though they are created or ran in another
355-
cookbook. Instead they must be able to update the current state of the
356-
database objects, configuration, or migrations based on the new user inputs.
353+
when an object already exist even though they are created or ran in another
354+
cookbook. Instead they must be able to update the current state of the
355+
database objects, configuration, or migrations based on the new user inputs.
357356

358357
- In HA mode, given that multiple physical nodes are involved, Omnibus GitLab
359-
may encounter certain limitations to provide full automation of the
360-
configuration. This is an acceptable limitation.
358+
may encounter certain limitations to provide full automation of the
359+
configuration. This is an acceptable limitation.
361360

362361
## Bridge the gap
363362

@@ -441,16 +440,16 @@ cookbook. It defines a database-specific Consul watch for database a cluster
441440
service and passes the required information to a parameterized failover script
442441
to notify PgBouncer. The key attributes of this resource are:
443442

444-
1. The service name, that specifies which database cluster must be watched.
445-
It could be the scope of the Patroni cluster when `patroni['register_service']`
446-
is enabled or a Consul service name when it is manually configured.
443+
1. The service name, that specifies which database cluster must be watched.
444+
It could be the scope of the Patroni cluster when `patroni['register_service']`
445+
is enabled or a Consul service name when it is manually configured.
447446

448-
1. The database name that specifies which logical databases should be
449-
reconfigured when the database cluster leader changes.
447+
1. The database name that specifies which logical databases should be
448+
reconfigured when the database cluster leader changes.
450449

451450
### Helper class for general database migration requirements
452451

453-
`MigrationHelper`<sup>[Needs implementation]</sup> implements general
452+
`MigrationHelper`<sup>(Needs implementation)</sup> implements general
454453
requirements of database migrations, including the central switch for enabling
455454
or disabling auto-migrations. It can also provides the mapping between the
456455
existing and new configuration attributes.

0 commit comments

Comments
 (0)