mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Compare commits
3 commits
47c0313a85
...
0a99506d19
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a99506d19 | ||
|
|
722539244c | ||
|
|
a2c40e6522 |
11 changed files with 50 additions and 46 deletions
|
|
@ -6,6 +6,9 @@
|
||||||
#
|
#
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# TODO delete me
|
||||||
|
export THIRD_PARTY_CONTAINER_REGISTRY=quay.io/lib
|
||||||
|
|
||||||
# Test matrix parameters
|
# Test matrix parameters
|
||||||
export CONTAINER_CLI=${CONTAINER_CLI:-docker}
|
export CONTAINER_CLI=${CONTAINER_CLI:-docker}
|
||||||
export CLIENT_LANGUAGE=${CLIENT_LANGUAGE:-typescript}
|
export CLIENT_LANGUAGE=${CLIENT_LANGUAGE:-typescript}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
restartPolicy: "Never"
|
restartPolicy: "Never"
|
||||||
containers:
|
containers:
|
||||||
- name: main
|
- name: main
|
||||||
image: busybox:latest
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/busybox:latest
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
restartPolicy: "Never"
|
restartPolicy: "Never"
|
||||||
containers:
|
containers:
|
||||||
- name: main
|
- name: main
|
||||||
image: busybox:latest
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/busybox:latest
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ spec:
|
||||||
mountPath: /var/hyperledger/fabric/config/tls
|
mountPath: /var/hyperledger/fabric/config/tls
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
image: couchdb:${COUCHDB_VERSION}
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:${COUCHDB_VERSION}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: "COUCHDB_USER"
|
- name: "COUCHDB_USER"
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
mountPath: /var/hyperledger/fabric/config/tls
|
mountPath: /var/hyperledger/fabric/config/tls
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
image: couchdb:${COUCHDB_VERSION}
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:${COUCHDB_VERSION}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: "COUCHDB_USER"
|
- name: "COUCHDB_USER"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ spec:
|
||||||
restartPolicy: "Never"
|
restartPolicy: "Never"
|
||||||
containers:
|
containers:
|
||||||
- name: main
|
- name: main
|
||||||
image: busybox:latest
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/busybox:latest
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ spec:
|
||||||
mountPath: /var/hyperledger/fabric/config/tls
|
mountPath: /var/hyperledger/fabric/config/tls
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
image: couchdb:${COUCHDB_VERSION}
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:${COUCHDB_VERSION}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: "COUCHDB_USER"
|
- name: "COUCHDB_USER"
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ spec:
|
||||||
mountPath: /var/hyperledger/fabric/config/tls
|
mountPath: /var/hyperledger/fabric/config/tls
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
image: couchdb:${COUCHDB_VERSION}
|
image: ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:${COUCHDB_VERSION}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: "COUCHDB_USER"
|
- name: "COUCHDB_USER"
|
||||||
|
|
|
||||||
|
|
@ -28,44 +28,45 @@ function context() {
|
||||||
export ${name}="${!override_name:-${default_value}}"
|
export ${name}="${!override_name:-${default_value}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
context FABRIC_VERSION 2.5
|
context FABRIC_VERSION 2.5
|
||||||
context FABRIC_CA_VERSION 1.5
|
context FABRIC_CA_VERSION 1.5
|
||||||
|
|
||||||
context CLUSTER_RUNTIME kind # or k3s for Rancher
|
context CLUSTER_RUNTIME kind # or k3s for Rancher
|
||||||
context CONTAINER_CLI docker # or nerdctl for containerd
|
context CONTAINER_CLI docker # or nerdctl for containerd
|
||||||
context CONTAINER_NAMESPACE "" # or "--namespace k8s.io" for containerd / nerdctl
|
context CONTAINER_NAMESPACE "" # or "--namespace k8s.io" for containerd / nerdctl
|
||||||
|
|
||||||
context FABRIC_CONTAINER_REGISTRY hyperledger
|
context FABRIC_CONTAINER_REGISTRY ghcr.io/hyperledger
|
||||||
context FABRIC_PEER_IMAGE ${FABRIC_CONTAINER_REGISTRY}/fabric-peer:${FABRIC_VERSION}
|
context FABRIC_PEER_IMAGE ${FABRIC_CONTAINER_REGISTRY}/fabric-peer:${FABRIC_VERSION}
|
||||||
context COUCHDB_VERSION 3.4.2
|
context THIRD_PARTY_CONTAINER_REGISTRY docker.io # or a suitable alternative, e.g. quay.io/lib
|
||||||
context NETWORK_NAME test-network
|
context COUCHDB_VERSION 3.4.2
|
||||||
context CLUSTER_NAME kind
|
context NETWORK_NAME test-network
|
||||||
context KUBE_NAMESPACE ${NETWORK_NAME}
|
context CLUSTER_NAME kind
|
||||||
context NS ${KUBE_NAMESPACE}
|
context KUBE_NAMESPACE ${NETWORK_NAME}
|
||||||
context ORG0_NS ${NS}
|
context NS ${KUBE_NAMESPACE}
|
||||||
context ORG1_NS ${NS}
|
context ORG0_NS ${NS}
|
||||||
context ORG2_NS ${NS}
|
context ORG1_NS ${NS}
|
||||||
context DOMAIN localho.st
|
context ORG2_NS ${NS}
|
||||||
context CHANNEL_NAME mychannel
|
context DOMAIN localho.st
|
||||||
context ORDERER_TYPE raft # or bft for BFT Orderer (for Fabric v3.0+)
|
context CHANNEL_NAME mychannel
|
||||||
context ORDERER_TIMEOUT 10s # see https://github.com/hyperledger/fabric/issues/3372
|
context ORDERER_TYPE raft # or bft for BFT Orderer (for Fabric v3.0+)
|
||||||
context TEMP_DIR ${PWD}/build
|
context ORDERER_TIMEOUT 10s # see https://github.com/hyperledger/fabric/issues/3372
|
||||||
context CHAINCODE_BUILDER ccaas # see https://github.com/hyperledgendary/fabric-builder-k8s/blob/main/docs/TEST_NETWORK_K8S.md
|
context TEMP_DIR ${PWD}/build
|
||||||
context K8S_CHAINCODE_BUILDER_IMAGE ghcr.io/hyperledger-labs/fabric-builder-k8s/k8s-fabric-peer
|
context CHAINCODE_BUILDER ccaas
|
||||||
context K8S_CHAINCODE_BUILDER_VERSION 0.15.1 # For Fabric v2.5+, 0.11.0 or later should be specified
|
context K8S_CHAINCODE_BUILDER_IMAGE ghcr.io/hyperledger-labs/fabric-builder-k8s/k8s-fabric-peer
|
||||||
|
context K8S_CHAINCODE_BUILDER_VERSION 0.15.1 # For Fabric v2.5+, 0.11.0 or later should be specified
|
||||||
|
|
||||||
context LOG_FILE network.log
|
context LOG_FILE network.log
|
||||||
context DEBUG_FILE network-debug.log
|
context DEBUG_FILE network-debug.log
|
||||||
context LOG_ERROR_LINES 2
|
context LOG_ERROR_LINES 2
|
||||||
context LOCAL_REGISTRY_NAME kind-registry
|
context LOCAL_REGISTRY_NAME kind-registry
|
||||||
context LOCAL_REGISTRY_INTERFACE 127.0.0.1
|
context LOCAL_REGISTRY_INTERFACE 127.0.0.1
|
||||||
context LOCAL_REGISTRY_PORT 5000
|
context LOCAL_REGISTRY_PORT 5000
|
||||||
context STAGE_DOCKER_IMAGES false
|
context STAGE_DOCKER_IMAGES false
|
||||||
context NGINX_HTTP_PORT 80
|
context NGINX_HTTP_PORT 80
|
||||||
context NGINX_HTTPS_PORT 443
|
context NGINX_HTTPS_PORT 443
|
||||||
|
|
||||||
context RCAADMIN_USER rcaadmin
|
context RCAADMIN_USER rcaadmin
|
||||||
context RCAADMIN_PASS rcaadminpw
|
context RCAADMIN_PASS rcaadminpw
|
||||||
|
|
||||||
function print_help() {
|
function print_help() {
|
||||||
set +x
|
set +x
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,10 @@ function pull_docker_images() {
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_CONTAINER_REGISTRY}/fabric-ca:$FABRIC_CA_VERSION
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_CONTAINER_REGISTRY}/fabric-ca:$FABRIC_CA_VERSION
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_CONTAINER_REGISTRY}/fabric-orderer:$FABRIC_VERSION
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_CONTAINER_REGISTRY}/fabric-orderer:$FABRIC_VERSION
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_PEER_IMAGE}
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${FABRIC_PEER_IMAGE}
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} couchdb:$COUCHDB_VERSION
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:$COUCHDB_VERSION
|
||||||
|
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ghcr.io/hyperledger/fabric-rest-sample:latest
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ghcr.io/hyperledger/fabric-rest-sample:latest
|
||||||
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} redis:6.2.5
|
$CONTAINER_CLI pull ${CONTAINER_NAMESPACE} ${THIRD_PARTY_CONTAINER_REGISTRY}/redis:6.2.5
|
||||||
|
|
||||||
pop_fn
|
pop_fn
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,10 @@ function kind_load_docker_images() {
|
||||||
kind load docker-image ${FABRIC_CONTAINER_REGISTRY}/fabric-ca:$FABRIC_CA_VERSION
|
kind load docker-image ${FABRIC_CONTAINER_REGISTRY}/fabric-ca:$FABRIC_CA_VERSION
|
||||||
kind load docker-image ${FABRIC_CONTAINER_REGISTRY}/fabric-orderer:$FABRIC_VERSION
|
kind load docker-image ${FABRIC_CONTAINER_REGISTRY}/fabric-orderer:$FABRIC_VERSION
|
||||||
kind load docker-image ${FABRIC_PEER_IMAGE}
|
kind load docker-image ${FABRIC_PEER_IMAGE}
|
||||||
kind load docker-image couchdb:$COUCHDB_VERSION
|
kind load docker-image ${THIRD_PARTY_CONTAINER_REGISTRY}/couchdb:$COUCHDB_VERSION
|
||||||
|
|
||||||
kind load docker-image ghcr.io/hyperledger/fabric-rest-sample:latest
|
kind load docker-image ghcr.io/hyperledger/fabric-rest-sample:latest
|
||||||
kind load docker-image redis:6.2.5
|
kind load docker-image ${THIRD_PARTY_CONTAINER_REGISTRY}/redis:6.2.5
|
||||||
|
|
||||||
pop_fn
|
pop_fn
|
||||||
}
|
}
|
||||||
|
|
@ -105,7 +105,7 @@ function launch_docker_registry() {
|
||||||
--restart always \
|
--restart always \
|
||||||
--name "${reg_name}" \
|
--name "${reg_name}" \
|
||||||
--publish "${reg_interface}:${reg_port}:5000" \
|
--publish "${reg_interface}:${reg_port}:5000" \
|
||||||
registry:2
|
${THIRD_PARTY_CONTAINER_REGISTRY}/registry:2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# connect the registry to the cluster network
|
# connect the registry to the cluster network
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue