Skip to content

Commit

Permalink
FSAT: Update ansible playbooks for compatibility with K8s v1.25.x
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
satota2 authored and denyeart committed Sep 29, 2023
1 parent f4f3201 commit 23dc50c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
state: present
wait_timeout: 3600
roles:
- ibm.blockchain_platform.fabric_operator_crds
- hyperledger.fabric_ansible_collection.fabric_operator_crds
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
state: present
wait_timeout: 3600
roles:
- ibm.blockchain_platform.fabric_console
- hyperledger.fabric_ansible_collection.fabric_console
18 changes: 9 additions & 9 deletions full-stack-asset-transfer-guide/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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} \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 23dc50c

Please sign in to comment.