ORDERER_NAME=orderer
HOST_NAME=example.com
cd scray-ledger/containers/orderer/
kubectl apply -f k8s-orderer-service.yaml
kubectl delete configmap hl-fabric-orderer
kubectl create configmap hl-fabric-orderer \
--from-literal=hostname=$HOST_NAME \
--from-literal=sans=orderer1.internal.example.com,orderer1.external.example.com \
--from-literal=org_name=$ORDERER_NAME \
--from-literal=ORDERER_GENERAL_LOCALMSPID=${ORDERER_NAME}MSP \
--from-literal=NODE_TYPE=orderer
kubectl apply -f k8s-orderer.yaml
Print orderer logs
ORDERER_POD=$(kubectl get pod -l app=orderer-org1-scray-org -o jsonpath="{.items[0].metadata.name}")
kubectl logs -f $ORDERER_POD -c orderer
kubectl delete -f k8s-orderer.yaml
CHANNEL_NAME=mychannel
ORDERER_POD=$(kubectl get pod -l app=orderer-org1-scray-org -o jsonpath="{.items[0].metadata.name}")
ORDERER_PORT=$(kubectl get service orderer-org1-scray-org -o jsonpath="{.spec.ports[?(@.name=='orderer-listen')].nodePort}")
ORDERER_PORT=30081
kubectl exec --stdin --tty $ORDERER_POD -c scray-orderer-cli -- /bin/sh /mnt/conf/orderer/scripts/create_channel.sh $CHANNEL_NAME orderer.example.com $ORDERER_PORT