NixOS support (Multi-Linux Distro Support) (#1310)

Signed-off-by: AadithyanRaju <aadithyan75@gmail.com>
Signed-off-by: Aadithyan Raju <93834376+AadithyanRaju@users.noreply.github.com>
This commit is contained in:
Aadithyan Raju 2025-03-25 00:45:58 +05:30 committed by GitHub
parent 16d6d751da
commit b82a309d91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 90 additions and 92 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
function print() { function print() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
function print() { function print() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
function print() { function print() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
shellcheck --version shellcheck --version

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
function print() { function print() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")/../.." cd "$(dirname "$0")/../.."

View file

@ -1,4 +1,4 @@
#!/bin/bash -e #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -eou pipefail set -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -eou pipefail set -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledgendary Full Stack Asset Transfer project # Copyright contributors to the Hyperledgendary Full Stack Asset Transfer project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright contributors to the Hyperledger Fabric Operator project # Copyright contributors to the Hyperledger Fabric Operator project
# #

View file

@ -50,7 +50,7 @@ cluster_type := env_var_or_default("WORKSHOP_CLUSTER_TYPE", "k8s")
# Start a local KIND cluster with nginx, localhost:5000 registry, and *.localho.st alias in kube DNS # Start a local KIND cluster with nginx, localhost:5000 registry, and *.localho.st alias in kube DNS
kind: unkind kind: unkind
#!/bin/bash #!/usr/bin/env bash
set -e -o pipefail set -e -o pipefail
infrastructure/kind_with_nginx.sh {{cluster_name}} infrastructure/kind_with_nginx.sh {{cluster_name}}
@ -62,7 +62,7 @@ kind: unkind
# Shut down the KIND cluster # Shut down the KIND cluster
unkind: unkind:
#!/bin/bash #!/usr/bin/env bash
kind delete cluster --name {{cluster_name}} kind delete cluster --name {{cluster_name}}
if docker inspect kind-registry &>/dev/null; then if docker inspect kind-registry &>/dev/null; then
@ -73,7 +73,7 @@ unkind:
# Bring up the nginx ingress controller on the target k8s cluster # Bring up the nginx ingress controller on the target k8s cluster
nginx: nginx:
#!/bin/bash #!/usr/bin/env bash
kubectl apply -k https://github.com/hyperledger-labs/fabric-operator.git/config/ingress/{{ cluster_runtime }} kubectl apply -k https://github.com/hyperledger-labs/fabric-operator.git/config/ingress/{{ cluster_runtime }}
sleep 20 sleep 20
@ -130,7 +130,7 @@ test-console:
# Shut down the microfab (uf) instance # Shut down the microfab (uf) instance
microfab-down: microfab-down:
#!/bin/bash #!/usr/bin/env bash
if docker inspect microfab &>/dev/null; then if docker inspect microfab &>/dev/null; then
echo "Removing existing microfab container:" echo "Removing existing microfab container:"
@ -140,7 +140,7 @@ microfab-down:
# Start a micro fab instance and create configuration in _cfg/uf # Start a micro fab instance and create configuration in _cfg/uf
microfab: microfab-down microfab: microfab-down
#!/bin/bash #!/usr/bin/env bash
set -e -o pipefail set -e -o pipefail
export CFG=$CWDIR/_cfg/uf export CFG=$CWDIR/_cfg/uf
@ -207,7 +207,7 @@ microfab: microfab-down
# Creates a chaincode package and install/approve/commit # Creates a chaincode package and install/approve/commit
debugcc: debugcc:
#!/bin/bash #!/usr/bin/env bash
set -e -o pipefail set -e -o pipefail
export CFG=$CWDIR/_cfg/uf export CFG=$CWDIR/_cfg/uf
@ -297,7 +297,7 @@ ansible-doit: ansible-review-config ansible-operator ansible-console ansible-net
# Review the Ansible Blockchain Collection configuration in _cfg/ # Review the Ansible Blockchain Collection configuration in _cfg/
ansible-review-config: ansible-review-config:
#!/bin/bash #!/usr/bin/env bash
mkdir -p ${CWDIR}/_cfg mkdir -p ${CWDIR}/_cfg
rm -rf ${CWDIR}/_cfg/* || true rm -rf ${CWDIR}/_cfg/* || true
@ -333,7 +333,7 @@ ansible-review-config:
# Start the Kubernetes fabric-operator with the Ansible Blockchain Collection # Start the Kubernetes fabric-operator with the Ansible Blockchain Collection
ansible-ingress: ansible-ingress:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""
@ -355,7 +355,7 @@ ansible-ingress:
# Start the Kubernetes fabric-operator with the Ansible Blockchain Collection # Start the Kubernetes fabric-operator with the Ansible Blockchain Collection
ansible-operator: ansible-operator:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""
@ -374,7 +374,7 @@ ansible-operator:
# Start the Fabric Operations Console with the Ansible Blockchain Collection # Start the Fabric Operations Console with the Ansible Blockchain Collection
ansible-console: ansible-console:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""
@ -392,7 +392,7 @@ ansible-console:
ansible-playbook /playbooks/02-console-install.yml ansible-playbook /playbooks/02-console-install.yml
ansible-auth: ansible-auth:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
AUTH=$(curl -X POST https://{{namespace}}-hlf-console-console.{{ingress_domain}}:443/ak/api/v2/permissions/keys -u admin:password -k -H 'Content-Type: application/json' -d '{"roles": ["writer", "manager"],"description": "newkey"}') AUTH=$(curl -X POST https://{{namespace}}-hlf-console-console.{{ingress_domain}}:443/ak/api/v2/permissions/keys -u admin:password -k -H 'Content-Type: application/json' -d '{"roles": ["writer", "manager"],"description": "newkey"}')
@ -411,7 +411,7 @@ ansible-auth:
# Build a sample Fabric network with the Ansible Blockchain Collection # Build a sample Fabric network with the Ansible Blockchain Collection
ansible-network: ansible-auth ansible-network: ansible-auth
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""
@ -432,7 +432,7 @@ ansible-network: ansible-auth
# Bring down the sample network created with the Ansible Blockchain Collection # Bring down the sample network created with the Ansible Blockchain Collection
ansible-network-down: ansible-network-down:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
kubectl delete namespace {{ namespace }} --ignore-not-found kubectl delete namespace {{ namespace }} --ignore-not-found
@ -440,7 +440,7 @@ ansible-network-down:
# Build a chaincode package with Ansible Blockchain Collection # Build a chaincode package with Ansible Blockchain Collection
ansible-build-chaincode: ansible-build-chaincode:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
pushd ${CWDIR}/contracts/asset-transfer-typescript pushd ${CWDIR}/contracts/asset-transfer-typescript
@ -461,7 +461,7 @@ ansible-build-chaincode:
# Deploy a chaincode package with the Ansible Blockchain Collection # Deploy a chaincode package with the Ansible Blockchain Collection
ansible-deploy-chaincode: ansible-deploy-chaincode:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""
@ -502,7 +502,7 @@ ansible-deploy-chaincode:
# Creates a new identity for an application to use # Creates a new identity for an application to use
ansible-ready-application: ansible-ready-application:
#!/bin/bash #!/usr/bin/env bash
set -ex -o pipefail set -ex -o pipefail
export EXTRAS="" export EXTRAS=""

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -v -eou pipefail set -v -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -v -eou pipefail set -v -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -v -eou pipefail set -v -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -v -eou pipefail set -v -eou pipefail

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
function one_line_pem { function one_line_pem {
echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`" echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
function one_line_pem { function one_line_pem {
echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`" echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# This script uses the logspout and http stream tools to let you watch the docker containers # This script uses the logspout and http stream tools to let you watch the docker containers
# in action. # in action.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
function one_line_pem { function one_line_pem {
echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`" echo "`awk 'NF {sub(/\\n/, ""); printf "%s\\\\\\\n",$0;}' $1`"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Copyright 2023 Aditya Joshi, All rights reserved # Copyright 2023 Aditya Joshi, All rights reserved
function peer_cert() { function peer_cert() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
function createOrg1() { function createOrg1() {
infoln "Enrolling the CA admin" infoln "Enrolling the CA admin"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# installChaincode PEER ORG # installChaincode PEER ORG
function installChaincode() { function installChaincode() {

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# imports # imports
. scripts/envVar.sh . scripts/envVar.sh

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
source scripts/utils.sh source scripts/utils.sh

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp All Rights Reserved # Copyright IBM Corp All Rights Reserved
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
channel_name=$1 channel_name=$1

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
channel_name=$1 channel_name=$1

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
channel_name=$1 channel_name=$1

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
channel_name=$1 channel_name=$1

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.
# #

View file

@ -1,6 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
#!/bin/bash
source scripts/utils.sh source scripts/utils.sh

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Copyright IBM Corp. All Rights Reserved. # Copyright IBM Corp. All Rights Reserved.
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
C_RESET='\033[0m' C_RESET='\033[0m'
C_RED='\033[0;31m' C_RED='\033[0;31m'

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# This script fully tears down and deletes all artifacts from the sample network that was started with ./scripts/up.sh. # This script fully tears down and deletes all artifacts from the sample network that was started with ./scripts/up.sh.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Register and enroll all identities needed for the Token network. # Register and enroll all identities needed for the Token network.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# This script generates crypto, starts Fabric, deploys the chaincode and starts the token nodes. # This script generates crypto, starts Fabric, deploys the chaincode and starts the token nodes.