| Giorgi Lekveishvili | 4ec4c02 | 2024-08-17 15:09:24 +0400 | [diff] [blame] | 1 | # Gerrit replica init container image |
| 2 | |
| 3 | Kubernetes init container for initializing gerrit. The python script running in |
| 4 | the container initializes Gerrit including the installation of configured |
| 5 | plugins. |
| 6 | |
| 7 | ## Content |
| 8 | |
| 9 | * gerrit-base image |
| 10 | |
| 11 | ## Setup and configuration |
| 12 | |
| 13 | * install python 3 |
| 14 | * copy tool scripts |
| 15 | |
| 16 | ## Start |
| 17 | |
| 18 | * start the container via start script `python3 /var/tools/gerrit-initializer init` |
| 19 | |
| 20 | The `main.py init`-command |
| 21 | |
| 22 | * reads configuration from gerrit.config (via `gerrit_config_parser.py`) |
| 23 | * initializes Gerrit |
| 24 | |
| 25 | The `main.py validate_notedb`-command |
| 26 | |
| 27 | * validates and waits for the repository `All-Projects.git` with the refs |
| 28 | `refs/meta/config`. |
| 29 | * validates and waits for the repository `All-Users.git` with the ref |
| 30 | `refs/meta/config`. |
| 31 | |
| 32 | ## Configuration |
| 33 | |
| 34 | The configuration format looks as follows: |
| 35 | |
| 36 | ```yaml |
| 37 | plugins: [] |
| 38 | # A plugin packaged in the gerrit.war-file |
| 39 | # - name: download-commands |
| 40 | |
| 41 | # A plugin packaged in the gerrit.war-file that will also be installed as a |
| 42 | # lib |
| 43 | # - name: replication |
| 44 | # installAsLibrary: true |
| 45 | |
| 46 | # A plugin that will be downloaded on startup |
| 47 | # - name: delete-project |
| 48 | # url: https://example.com/gerrit-plugins/delete-project.jar |
| 49 | # sha1: |
| 50 | # installAsLibrary: false |
| 51 | libs: [] |
| 52 | # A lib that will be downloaded on startup |
| 53 | # - name: global-refdb |
| 54 | # url: https://example.com/gerrit-plugins/global-refdb.jar |
| 55 | # sha1: |
| 56 | #DEPRECATED: `pluginCache` was deprecated in favor of `pluginCacheEnabled` |
| 57 | # pluginCache: true |
| 58 | pluginCacheEnabled: false |
| 59 | pluginCacheDir: null |
| 60 | # Can be either true to use default CA certificates, false to disable SSL |
| 61 | # verification or a path to a custom CA certificate store. |
| 62 | caCertPath: true |
| 63 | highAvailability: false |
| 64 | ``` |