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
Copy file name to clipboardExpand all lines: ztp/gitops-subscriptions/argocd/ImageRegistry.md
+37-8
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,42 @@
1
1
Installation
2
2
-
3
-
1. Use SiteConfig to generate MachineConfig for disk partitioning. Make sure to modify values in the mc appropriately as it is dependent on the underlying disk.
3
+
1. Use SiteConfig to generate MachineConfig for disk partitioning. Make sure to modify values in the mc appropriately as it is dependent on the underlying disk.
4
+
5
+
It is important use persistent naming for device, especially if you have more than one disk as names like `/dev/sda` and `/dev/sdb` may switch at every reboot. You can use `rootDeviceHints` to choose the bootable device and then use same the device for further partitioning, in this case, for Image registry. More info on persistent naming [here](https://wiki.archlinux.org/title/persistent_block_device_naming#Persistent_naming_methods).
6
+
7
+
wwn is used below.
8
+
9
+
4
10
```yaml
5
11
nodes:
6
-
- diskPartition:
7
-
- device: /dev/sda
12
+
- rootDeviceHints:
13
+
wwn: "0x62cea7f05c98c2002708a0a22ff480ea"
14
+
diskPartition:
15
+
- device: /dev/disk/by-id/wwn-0x62cea7f05c98c2002708a0a22ff480ea # depends on the hardware. can also serial num or device name. recommend using wwn. match with the rootDeviceHint above
8
16
partitions:
9
17
- mount_point: /var/imageregistry
10
-
size: 102500
11
-
start: 344844
18
+
size: 102500# min value 100gig for image registry
19
+
start: 344844# 25000 min value, otherwise root partition is too small. Recommended startMiB (Disk - sizeMiB - some buffer), if startMiB + sizeMiB exceeds disk size, installation will fail
12
20
```
13
21
14
-
3. Use PGT, to apply the following to create the pv and pvc and patch imageregistry config as part of normal day-2 operation
22
+
3. Use PGT, to apply the following to create the pv and pvc and patch imageregistry config as part of normal day-2 operation. Select the appropriate PGT for each source-cr and refer to `wave` doc for more help. Below is as example if you would like to test it at the site level.
15
23
```yaml
16
24
sourceFiles:
25
+
# storage class
26
+
- fileName: StorageClass.yaml
27
+
policyName: "sc-for-image-registry"
28
+
metadata:
29
+
name: image-registry-sc
30
+
annotations:
31
+
ran.openshift.io/ztp-deploy-wave: "100" # remove this when moved to the right PGT (site/group/common)
32
+
# persistent volume claim
17
33
- fileName: StoragePVC.yaml
18
34
policyName: "pvc-for-image-registry"
19
35
metadata:
20
36
name: image-registry-pvc
21
37
namespace: openshift-image-registry
38
+
annotations:
39
+
ran.openshift.io/ztp-deploy-wave: "100" # remove this when moved to the right PGT (site/group/common)
22
40
spec:
23
41
accessModes:
24
42
- ReadWriteMany
@@ -27,10 +45,20 @@ nodes:
27
45
storage: 100Gi
28
46
storageClassName: image-registry-sc
29
47
volumeMode: Filesystem
30
-
- fileName: ImageRegistryPV.yaml
31
-
policyName: "pv-for-image-registry"
48
+
# persistent volume
49
+
- fileName: ImageRegistryPV.yaml # this is assuming that mount_point is set to `/var/imageregistry` in SiteConfig
50
+
# using StorageClass `image-registry-sc` (see the first sc-file)
51
+
policyName: "pv-for-image-registry"
52
+
metadata:
53
+
annotations:
54
+
ran.openshift.io/ztp-deploy-wave: "100"# remove this when moved to the right PGT (site/group/common)
55
+
# configure registry to point to the pvc created above
32
56
- fileName: ImageRegistryConfig.yaml
33
57
policyName: "config-for-image-registry"
58
+
complianceType: musthave # do not use `mustlyonlyhave` as it will cause deployment failure of registry pod.
59
+
metadata:
60
+
annotations:
61
+
ran.openshift.io/ztp-deploy-wave: "100"# remove this when moved to the right PGT (site/group/common)
34
62
spec:
35
63
storage:
36
64
pvc:
@@ -41,6 +69,7 @@ Verify/Debug
41
69
-
42
70
- Check the CRD `Config` of group `imageregistry.operator.openshift.io`'s instance `cluster` is not reporting any error
43
71
- Within a few minutes after the installation process is complete you should see the pvc filling up.
72
+
- Check "registry*" pod is up correctly under `openshift-image-registry` namespace
0 commit comments