From d06bf9a96254d8b4a6b32ce554945f80a8779086 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Thu, 28 Sep 2023 13:11:58 +0000 Subject: [PATCH] FSAT: Update ansible playbooks for compatibility with K8s v1.25.x The originally used image of Hyperledger Fabric Ansible Collection was not compatible with K8s v1.25.x. This patch replaces the image with the latest hyperledger-labs/fabric-ansible-collection. Additionally, deprecated notations in the latest Kustomize, patchesJson and patchesStrategicMerge, have been replaced with the recommended syntax to prevent ansible task execution failures. Signed-off-by: Tatsuya Sato --- .../templates/ingress/kustomization.yaml | 25 +++++++++---------- .../01-operator-install.yml | 2 +- .../02-console-install.yml | 2 +- full-stack-asset-transfer-guide/justfile | 18 ++++++------- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/full-stack-asset-transfer-guide/infrastructure/kind_console_ingress/templates/ingress/kustomization.yaml b/full-stack-asset-transfer-guide/infrastructure/kind_console_ingress/templates/ingress/kustomization.yaml index 6d57058b52..e1392885b4 100644 --- a/full-stack-asset-transfer-guide/infrastructure/kind_console_ingress/templates/ingress/kustomization.yaml +++ b/full-stack-asset-transfer-guide/infrastructure/kind_console_ingress/templates/ingress/kustomization.yaml @@ -19,19 +19,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/cloud?ref=controller-v1.1.2 +- https://github.com/kubernetes/ingress-nginx.git/deploy/static/provider/cloud?ref=controller-v1.1.2 -patchesStrategicMerge: - - ingress-nginx-controller.yaml # Remove the port `appProtocol` attribute as this is not accepted by all cloud providers -patchesJson6902: - - target: - kind: Service - name: ingress-nginx-controller - version: v1 - patch: |- - - op: remove - path: "/spec/ports/0/appProtocol" - - op: remove - path: "/spec/ports/1/appProtocol" +patches: +- patch: |- + - op: remove + path: "/spec/ports/0/appProtocol" + - op: remove + path: "/spec/ports/1/appProtocol" + target: + kind: Service + name: ingress-nginx-controller + version: v1 +- path: ingress-nginx-controller.yaml diff --git a/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/01-operator-install.yml b/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/01-operator-install.yml index 256f98b99a..daba33ced2 100644 --- a/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/01-operator-install.yml +++ b/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/01-operator-install.yml @@ -10,4 +10,4 @@ state: present wait_timeout: 3600 roles: - - ibm.blockchain_platform.fabric_operator_crds + - hyperledger.fabric_ansible_collection.fabric_operator_crds diff --git a/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/02-console-install.yml b/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/02-console-install.yml index 13718bc2df..936621ffd6 100644 --- a/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/02-console-install.yml +++ b/full-stack-asset-transfer-guide/infrastructure/operator_console_playbooks/02-console-install.yml @@ -10,4 +10,4 @@ state: present wait_timeout: 3600 roles: - - ibm.blockchain_platform.fabric_console + - hyperledger.fabric_ansible_collection.fabric_console diff --git a/full-stack-asset-transfer-guide/justfile b/full-stack-asset-transfer-guide/justfile index 6502b4c31b..782ee58d37 100644 --- a/full-stack-asset-transfer-guide/justfile +++ b/full-stack-asset-transfer-guide/justfile @@ -284,7 +284,7 @@ cloud-frontend: # ANSIBLE PLAYBOOK TARGETS # ############################################################################### -ansible_image := env_var_or_default("ANSIBLE_IMAGE", "ghcr.io/ibm-blockchain/ofs-ansibe:sha-ac6fd82") +ansible_image := env_var_or_default("ANSIBLE_IMAGE", "ghcr.io/hyperledger-labs/fabric-ansible:latest") namespace := env_var_or_default("WORKSHOP_NAMESPACE", "fabricinfra") # just set up everything with Ansible @@ -339,7 +339,7 @@ ansible-ingress: docker run \ --rm \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/_cfg:/_cfg \ -v $(pwd)/infrastructure/kind_console_ingress:/playbooks \ --network=host ${EXTRAS} \ @@ -361,7 +361,7 @@ ansible-operator: docker run \ --rm \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/_cfg:/_cfg \ -v $(pwd)/infrastructure/operator_console_playbooks:/playbooks ${EXTRAS} \ --network=host \ @@ -380,7 +380,7 @@ ansible-console: docker run \ --rm \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v $(pwd)/infrastructure/operator_console_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \ @@ -418,7 +418,7 @@ ansible-network: ansible-auth docker run \ --rm \ -u $(id -u) \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/infrastructure/fabric_network_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \ @@ -469,7 +469,7 @@ ansible-deploy-chaincode: docker run \ --rm \ -u $(id -u) \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \ @@ -479,7 +479,7 @@ ansible-deploy-chaincode: docker run \ --rm \ -u $(id -u) \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \ @@ -489,7 +489,7 @@ ansible-deploy-chaincode: docker run \ --rm \ -u $(id -u) \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \ @@ -509,7 +509,7 @@ ansible-ready-application: docker run \ --rm \ -u $(id -u) \ - -v ${HOME}/.kube/:/home/ibp-user/.kube/ \ + -v ${HOME}/.kube/:/home/hlf-user/.kube/ \ -v ${CWDIR}/infrastructure/production_chaincode_playbooks:/playbooks ${EXTRAS} \ -v ${CWDIR}/_cfg:/_cfg \ --network=host \