You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you add or remove any terraform input or outputs you will need to regenerate the docs. Note that running the following will automatically update the README.md sections
42
+
If you add or remove any terraform input or outputs or change headings in README.md you will need to regenerate the docs. Note that running the following will automatically update the README.md sections
Copy file name to clipboardExpand all lines: README.md
+67-39Lines changed: 67 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,27 +9,32 @@ compatibility issues to be aware of are around provider requirements. For more
9
9
10
10
This repo contains a [Terraform](https://www.terraform.io/) module for provisioning a Kubernetes cluster for [Jenkins X](https://jenkins-x.io/) on [Google Cloud](https://cloud.google.com/).
11
11
12
-
<!-- TOC -->
13
-
14
-
-[Jenkins X GKE Module](#jenkins-x-gke-module)
15
-
-[What is a Terraform module](#what-is-a-terraform-module)
16
-
-[How do you use this module](#how-do-you-use-this-module)
-[Configuring a Terraform backend](#configuring-a-terraform-backend)
29
+
-[FAQ](#faq)
30
+
-[How do I get the latest version of the terraform-google-jx module](#how-do-i-get-the-latest-version-of-the-terraform-google-jx-module)
31
+
-[How to I specify a specific google provider version](#how-to-i-specify-a-specific-google-provider-version)
32
+
-[Why do I need Application Default Credentials](#why-do-i-need-application-default-credentials)
33
+
-[Development](#development)
34
+
-[Releasing](#releasing)
35
+
-[How do I contribute](#how-do-i-contribute)
36
+
37
+
<!-- tocstop -->
33
38
34
39
## What is a Terraform module
35
40
@@ -114,6 +119,10 @@ The following two paragraphs provide the full list of configuration and output v
114
119
| <aname="input_apex_domain"></a> [apex\_domain](#input\_apex\_domain)| The parent / apex domain to be used for the cluster |`string`|`""`| no |
115
120
| <aname="input_apex_domain_gcp_project"></a> [apex\_domain\_gcp\_project](#input\_apex\_domain\_gcp\_project)| The GCP project the apex domain is managed by, used to write recordsets for a subdomain if set. Defaults to current project. |`string`|`""`| no |
116
121
| <aname="input_apex_domain_integration_enabled"></a> [apex\_domain\_integration\_enabled](#input\_apex\_domain\_integration\_enabled)| Flag that when set attempts to create delegation records in apex domain to point to domain created by this module |`bool`|`true`| no |
| <aname="input_artifact_enable"></a> [artifact\_enable](#input\_artifact\_enable)| Create artifact registry repository |`bool`|`true`| no |
124
+
| <aname="input_artifact_location"></a> [artifact\_location](#input\_artifact\_location)| artifact registry repository Location |`string`|`"us-central1"`| no |
125
+
| <aname="input_artifact_repository_id"></a> [artifact\_repository\_id](#input\_artifact\_repository\_id)| artifact registry repository Name |`string`|`"oci"`| no |
117
126
| <aname="input_autoscaler_location_policy"></a> [autoscaler\_location\_policy](#input\_autoscaler\_location\_policy)| location policy for primary node pool |`string`|`"ANY"`| no |
118
127
| <aname="input_autoscaler_max_node_count"></a> [autoscaler\_max\_node\_count](#input\_autoscaler\_max\_node\_count)| primary node pool max nodes |`number`|`5`| no |
119
128
| <aname="input_autoscaler_min_node_count"></a> [autoscaler\_min\_node\_count](#input\_autoscaler\_min\_node\_count)| primary node pool min nodes |`number`|`3`| no |
@@ -188,33 +197,52 @@ The following two paragraphs provide the full list of configuration and output v
188
197
| <aname="output_vault_bucket_url"></a> [vault\_bucket\_url](#output\_vault\_bucket\_url)| The URL to the bucket for secret storage |
189
198
<!-- END_TF_DOCS -->
190
199
191
-
### Running `jx boot`
192
200
193
-
A terraform output (_jx\_requirements_) is available after applying this Terraform module.
201
+
### Artifact Registry in setup with multiple Jenkins X clusters
202
+
In a multi cluster setup, you should leave the value of `artifact_enable` as `true`**only in a
203
+
development cluster** and set `artifact_enable = false` for other clusters. A development cluster is
204
+
one where application build pipelines are executed. If you have multiple development clusters you
205
+
can set `artifact_repository_id` to different values for them. Alternatively you can have
206
+
`artifact_enable = true` in one and manually copy the values of `cluster.registry` and
207
+
`cluster.dockerRegistryOrg` from `jx-requirements.yml` from that cluster repository to the other
208
+
cdevelopment cluster repositories.
194
209
195
-
```sh
196
-
terraform output jx_requirements
197
-
```
210
+
If you leave `artifact_enable` as `true` for multiple clusters and don't override
211
+
`artifact_repository_id` terraform will fail since it can't create an already existing repository.
198
212
199
-
This `jx_requirements` output can be used as input to [Jenkins X Boot](https://jenkins-x.io/docs/getting-started/setup/boot/) which is responsible for installing all the required Jenkins X components into the cluster created by this module.
213
+
### Migration from Container to Artifact Registry
200
214
201
-

215
+
Google has deprecated `gcr.io` and now recommends the use of Artifact Registry. The default of this module is now to create and use a repository in Artifact Registry for container images.
202
216
203
-
:warning:**Note**: The generated _jx-requirements_ is only used for the first run of `jx boot`.
204
-
During this first run of `jx boot` a git repository containing the source code for Jenkins X Boot is created.
205
-
This (_new_) repository contains a _jx-requirements.yml_ (_which is now ahead of the jx-requirements output from terraform_) used by successive runs of `jx boot`.
217
+
Google GKE clusters automatically have permissions to download from the Artifact Registry. For multi cluster setups across different projects, additional permission configurations may be necessary.
206
218
207
-
Execute:
219
+
#### Configuration Note
220
+
The `jx-requirements.yml` will be automatically updated by the Jenkins X boot job when triggered by a push to the main branch of the cluster repository.
# jenkins-x creates the environment repository directory localy before pushing to the Git server of choice
212
-
cd<some_empty_dir>
213
-
jx boot --requirements jx-requirements.yml
222
+
#### Migration Options
223
+
Here are two strategies for transitioning container images from `gcr.io` to the Artifact Registry:
224
+
225
+
##### Don't Migrate Existing Images
226
+
- Continue developing applications as usual. New images, upon their release, will be pushed to the Artifact Registry.
227
+
-**Important**: Ensure that all builds are triggered and applications are promoted before Google completely shuts down the Container Registry. This step is critical to avoid disruptions in service.
228
+
To identify which images from you container registry are currently used in your cluster, you can use the following command line (replace `project_id` with your actual GCP project id):
0 commit comments