Created
January 5, 2021 05:59
-
-
Save iam-veeramalla/3dd9ee48c0403d0cce4cc74e5c63e638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Modify to Argo CD Operator | |
1.1. defaults.go | |
1.1.1. replace redis image to | |
1.1.1.1. ArgoCDDefaultRedisImage = "registry.redhat.io/rhel8/redis-5" | |
1.1.1.2. ArgoCDDefaultRedisVersion = "sha256:85d7f044c718567ed9375e845299ee8aa0fef8f327262c444506c6c7c7a42eb0" // latest | |
1.2. deployment.go | |
1.2.1. Disable dex deployment/reconciliation | |
1.2.2. Change redis command args: | |
"redis-server", | |
"--save", | |
"", | |
"--appendonly", | |
"no", | |
"--protected-mode", | |
"no", | |
1.3. env.sh | |
1.3.1. set ARGOCD_OPERATOR_IMAGE_BUILDER to docker | |
1.3.2. set ARGOCD_OPERATOR_IMAGE_HOST_ORG to yours e.g. "quay.io/wtam" (ORG=wtam) | |
1.3.3. set ARGOCD_OPERATOR_BUNDLE_IMAGE_REPO to yours e.g. "quay.io/wtam/${ARGOCD_OPERATOR_BUNDLE_IMAGE_NAME}"} | |
2. Build argocd-operator image | |
2.1. hack/biuld.sh | |
3. Push argocd-operator image | |
3.1. hack/push.sh | |
3.2. record the sha (OPERATOR_SHA256) | |
3.3. Modify argocd-operator.v0.0.14.clusterserviceversion.yaml | |
3.3.1. replace all argocd operator images. (2 occurances: containerImage and image) | |
3.3.1.1. quay.io/${ORG}/argocd-operator@sha256:${OPERATOR_SHA256} | |
3.3.2. Add related images | |
relatedImages: | |
- name: dex | |
image: quay.io/dexidp/dex@sha256:01e996b4b60edcc5cc042227c6965dd63ba68764c25d86b481b0d65f6e4da308 | |
- name: argocd-operator-util | |
image: quay.io/jmckind/argocd-operator-util@sha256:f987796f3b4be500516689b24988f5c27f8d4f6e537b5c5d862090451de90794 | |
- name: argocd | |
image: argoproj/argocd@sha256:b835999eb5cf75d01a2678cd971095926d9c2566c9ffe746d04b83a6a0a2849f | |
- nmae: grafana | |
image: grafana/grafana@sha256:afef23a1b4cf159ec3180aac3ad693c10e560657313bfe3ec81f344ace6d2f05 | |
- name: redis | |
image: registry.redhat.io/rhel8/redis-5@sha256:85d7f044c718567ed9375e845299ee8aa0fef8f327262c444506c6c7c7a42eb0 | |
- name: redis-haproxy | |
image: haproxy@sha256:cd4b3d4d27ae5931dc96b9632188590b7a6880469bcf07f478a3280dd0955336 | |
4. Build and push argocd-operator bundle | |
4.1. hack/bundle.sh | |
5. Build and push argocd-operator-registry | |
5.1. hack/registry.sh | |
5.2. record the sha (OPERATOR_REGISTRY_SHA256) | |
6. set MIRROR_REGISTRY_DNS env var | |
6.1. e.g. export MIRROR_REGISTRY_DNS=ec2-3-135-184-169.us-east-2.compute.amazonaws.com:5000 | |
7. set AUTH_FILE env var | |
7.1. log to cluster as kubeadmin | |
7.2. oc extract secret/pull-secret -n openshift-config | |
7.3. mv .dockerconfigjson mirror_pullsecret_config.json | |
7.4. edit mirror_pullsecret_config.json to add registry.redhat.io token | |
7.5. export AUTH_FILE=/path/to/mirror_pullsecret_config.json | |
8. mirror registry | |
8.1. run these commands: | |
oc adm catalog mirror \ | |
quay.io/${ORG}/argocd-operator-registry@sha256:${OPERATOR_REGISTRY_SHA256} \ | |
${MIRROR_REGISTRY_DNS} \ | |
--registry-config=${AUTH_FILE} \ | |
--insecure=true | |
oc image mirror \ | |
quay.io/${ORG}/argocd-operator-registry@sha256:${OPERATOR_REGISTRY_SHA256} \ | |
${MIRROR_REGISTRY_DNS}/${ORG}/argocd-operator-registry \ | |
-a ${AUTH_FILE} \ | |
--insecure=true | |
8.2. record mirror registry sha MIRROR_REGISTRY_SHA256 from the output of "oc image mirror" command above | |
8.3. review generated argocd-operator-registry-manifests\imageContentSourcePolicy.yaml | |
9. Update catalog_source.yaml | |
9.1. replace image by the mirror image: | |
${MIRROR_REGISTRY_DNS}/${ORG}/argocd-operator-registry@sha256:${MIRROR_REGISTRY_SHA256} | |
e.g. ec2-3-135-184-169.us-east-2.compute.amazonaws.com:5000/wtam/argocd-operator-registry@sha256:919d19ca55ff0bc5f37555edc41a679724782db68ca0dfd19dabe50941604220 | |
10. oc new-project argocd | |
11. oc apply -f argocd-operator-registry-manifests/imageContentSourcePolicy.yaml | |
12. oc apply -f deploy/catalog_source.yaml | |
13. In dev console, argocd operator will show up in Operator hub in the argocd namespace | |
14. Install argocd operator in argocd namespace | |
15. Create an argocd instance in the argocd name with "openshift route" enabled. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment