Skip to content

Commit

Permalink
clean up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mallikprojects committed Sep 25, 2019
1 parent 9547d7d commit 903955a
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 1,007 deletions.
522 changes: 0 additions & 522 deletions fabric-kube/artifacts-flow/bkup-artifacts-workflow.yaml

This file was deleted.

34 changes: 18 additions & 16 deletions fabric-kube/artifacts-flow/templates/artifacts-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
configMap:
name: hlf-scripts
defaultMode: 0777 # make scripts executable

#orderer volumes
{{- range $i, $org := .Values.OrdererOrgs }}
- name: hlf-orderer--{{ $org.Name | lower }}
persistentVolumeClaim:
Expand All @@ -28,6 +30,8 @@ spec:

{{- end }} {{- /* orderer hosts */ -}}{{""}}
{{- end }} {{- /* orderer orgs */ -}}{{""}}

#peer org volumes
{{- range $i, $org := .Values.PeerOrgs }}
- name: hlf-peer-org--{{ $org.Name | lower }}
persistentVolumeClaim:
Expand Down Expand Up @@ -154,7 +158,7 @@ spec:



# leaf register orderer identify templates
# leaf register orderer identity templates
{{- range $i, $ordererOrg := .Values.OrdererOrgs }}
- name: register-orderer--{{ $ordererOrg.Name | lower }}
inputs:
Expand Down Expand Up @@ -209,11 +213,11 @@ spec:
- name: FABRIC_CA_CLIENT_HOME
value: /etc/hyperledger/cas/ca-{{ $ordererOrg.Name | lower }}
- name: CA_ADMIN_USER
value: admin
value: {{ $.Values.ca.userName }}
- name: CA_ADMIN_PASS
value: adminpw
value: {{ $.Values.ca.password }}
- name: CA_ADMIN_USER_PASS
value: admin:adminpw
value: {{ $.Values.ca.userName }}:{{ $.Values.ca.password }}
- name: CA_HOST
value: hlf-ca--{{ $ordererOrg.Name | lower }}
- name: ORDERER_ADMIN_NAME
Expand Down Expand Up @@ -288,11 +292,11 @@ spec:
- name: FABRIC_CA_CLIENT_HOME
value: /etc/hyperledger/cas/ca-{{ $org.Name | lower }}
- name: CA_ADMIN_USER
value: admin
value: {{ $.Values.ca.userName }}
- name: CA_ADMIN_PASS
value: adminpw
value: {{ $.Values.ca.password }}
- name: CA_ADMIN_USER_PASS
value: admin:adminpw
value: {{ $.Values.ca.userName }}:{{ $.Values.ca.password }}
- name: CA_HOST
value: hlf-ca--{{ $org.Name | lower }}
- name: ORG_ADMIN_NAME
Expand Down Expand Up @@ -378,11 +382,11 @@ spec:
- name: FABRIC_CA_CLIENT_HOME
value: /etc/hyperledger/cas/ca-{{ $org.Name | lower }}
- name: CA_ADMIN_USER
value: admin
value: {{ $.Values.ca.userName }}
- name: CA_ADMIN_PASS
value: adminpw
value: {{ $.Values.ca.password }}
- name: CA_ADMIN_USER_PASS
value: admin:adminpw
value: {{ $.Values.ca.userName }}:{{ $.Values.ca.password }}
- name: CA_HOST
value: hlf-ca--{{ $org.Name | lower }}
- name: ORG_ADMIN_NAME
Expand Down Expand Up @@ -477,11 +481,11 @@ spec:
- name: FABRIC_CA_CLIENT_HOME
value: /etc/hyperledger/cas/ca-{{ $org.Name | lower }}
- name: CA_ADMIN_USER
value: admin
value: {{ $.Values.ca.userName }}
- name: CA_ADMIN_PASS
value: adminpw
value: {{ $.Values.ca.password }}
- name: CA_ADMIN_USER_PASS
value: admin:adminpw
value: {{ $.Values.ca.userName }}:{{ $.Values.ca.password }}
- name: CA_HOST
value: hlf-ca--{{ $org.Name | lower }}
- name: ORG_ADMIN_NAME
Expand Down Expand Up @@ -747,9 +751,7 @@ spec:
# name: ca-tls
- mountPath: /hlf-scripts
name: hlf-scripts
#- mountPath: /hlf-data
# name: hlf-data


- mountPath: /hlf-peer-org--{{ $org.Name | lower }}
name: hlf-peer-org--{{ $org.Name | lower }}

Expand Down
24 changes: 5 additions & 19 deletions fabric-kube/artifacts-flow/values.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# Default values for hlf-kube.
# Default values for artifacts-workflow.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# number of times to retry a failed leaf task
retryCount: 4

hyperledgerVersion: 1.4.1
hyperledgerVersion: 1.4.3

# see the Raft sample in the README for how to enable TLS
tlsEnabled: false

# use actual domain names like peer0.atlantis.com instead of internal service names
# this should be set to true for TLS
useActualDomains: false

# adds additional DNS entries to /etc/hosts files
# see https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/#adding-additional-entries-with-hostaliases
# this value should be provided if either tlsEnabled or useActualDomains is set to true
# see the Raft sample in the README for how to use this
hostAliases: []
hyperledgerVersion: 1.4.3
logLevel: info
adminCerts: true
ca:
Expand All @@ -31,18 +24,11 @@ ca:

flow:
orderer:
# should we run top level channel flows in parallel?
# dont set to true if you are using Kafka orderer (as of HL 1.4.0)
# run orderer certificate generation in parallel
parallel: false
# fill in this array with channel names to limit the channel flow only to these ones

peerorgs:
# should we run top level channel flows in parallel?
# dont set to true if you are using Kafka orderer (as of HL 1.4.0)
# run peer org certificate generation in parallel
parallel: false
# fill in this array with channel names to limit the channel flow only to these ones

artifacts:
# run channel join flows in parallel?
parallel: true


53 changes: 1 addition & 52 deletions fabric-kube/chaincode-flow/templates/chaincodes-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,7 @@ spec:
{{- end }} {{- /* peers */ -}}{{""}}
{{- end }} {{- /* peer orgs */ -}}{{""}}

#- name: hlf-data
# persistentVolumeClaim:
# claimName: azurefile

# - name: orderer-tlsca
# secret:
# # only use the first orderer
# secretName: hlf-orderer--{{ $ordererOrg.Name | lower }}-tlsca

# {{- range $i, $org := .Values.PeerOrgs }}

# - name: peer-{{ $org.Name | lower }}-admin-msp
# secret:
# secretName: hlf-peer--{{ $org.Name | lower }}--admin-msp
# items:
# - key: cert.pem
# path: signcerts/cert.pem
# - key: key.pem
# path: keystore/key.pem
# - key: cacert.pem
# path: cacerts/cert.pem
# - key: tlscacert.pem
# path: tlscacerts/cert.pem
# - key: admincert.pem
# path: admincerts/cert.pem

# {{- range $peerIndex := until ($org.Template.Count | int) }}
# {{- $peer := (printf "peer%s" ($peerIndex | toString)) }}

# - name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
# secret:
# secretName: hlf-peer--{{ $org.Name | lower }}--{{ $peer | lower }}-tls

# {{- end }} {{- /* Peers */ -}}
# {{- end }} {{- /* Orgs */ -}}{{""}}


# chaincodes configMaps
{{- range $i, $chaincode := $.Values.network.chaincodes }}
{{- if or (not $.Values.flow.chaincode.include) (has $chaincode.name $.Values.flow.chaincode.include) }}
Expand Down Expand Up @@ -284,10 +249,6 @@ spec:
name: hlf-peer-org--{{ $org.Name | lower }}
subPath: admin/msp

#- mountPath: /etc/hyperledger/fabric/tls/
# name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
#- mountPath: /etc/hyperledger/fabric/msp/
# name: peer-{{ $org.Name | lower }}-admin-msp
- mountPath: /hlf_config/chaincode/
name: chaincode-{{ $chaincode.name | lower }}

Expand Down Expand Up @@ -404,12 +365,6 @@ spec:
name: hlf-peer-org--{{ $org.Name | lower }}
subPath: admin/msp

#- mountPath: /hlf_config/orderer-tlsca
# name: orderer-tlsca
#- mountPath: /etc/hyperledger/fabric/tls/
# name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
#- mountPath: /etc/hyperledger/fabric/msp/
# name: peer-{{ $org.Name | lower }}-admin-msp

env:
- name: CORE_PEER_ADDRESS
Expand Down Expand Up @@ -484,12 +439,6 @@ spec:
name: hlf-peer-org--{{ $org.Name | lower }}
subPath: admin/msp

#- mountPath: /hlf_config/orderer-tlsca
# name: orderer-tlsca
#- mountPath: /etc/hyperledger/fabric/tls/
# name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
#- mountPath: /etc/hyperledger/fabric/msp/
# name: peer-{{ $org.Name | lower }}-admin-msp

env:
- name: CORE_PEER_ADDRESS
Expand Down
52 changes: 3 additions & 49 deletions fabric-kube/channel-flow/templates/channel-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ spec:

volumes:



{{- range $i, $org := .Values.OrdererOrgs }}
- name: hlf-orderer--{{ $org.Name | lower }}
persistentVolumeClaim:
Expand Down Expand Up @@ -51,46 +53,14 @@ spec:

{{- end }} {{- /* peers */ -}}{{""}}
{{- end }} {{- /* peer orgs */ -}}{{""}}
#- name: hlf-data
# persistentVolumeClaim:
# claimName: azurefile

- name: hlf-scripts
configMap:
name: hlf-scripts
defaultMode: 0777 # make scripts executable
- name: hlf-configtx
secret:
secretName: hlf-configtx.yaml
# - name: orderer-tlsca
# secret:
# # only use the first orderer
# secretName: hlf-orderer--{{ $ordererOrg.Name | lower }}-tlsca

# {{- range $i, $org := .Values.PeerOrgs }}

# - name: peer-{{ $org.Name | lower }}-admin-msp
# secret:
# secretName: hlf-peer--{{ $org.Name | lower }}--admin-msp
# items:
# - key: cert.pem
# path: signcerts/cert.pem
# - key: key.pem
# path: keystore/key.pem
# - key: cacert.pem
# path: cacerts/cert.pem
# - key: tlscacert.pem
# path: tlscacerts/cert.pem
# - key: admincert.pem
# path: admincerts/cert.pem

# {{- range $peerIndex := until ($org.Template.Count | int) }}
# {{- $peer := (printf "peer%s" ($peerIndex | toString)) }}

# - name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
# secret:
# secretName: hlf-peer--{{ $org.Name | lower }}--{{ $peer | lower }}-tls
# {{ end }} {{- /* Peers */ -}}
# {{ end }} {{- /* Orgs */ -}} {{ "" }}

templates:
- name: channels
Expand Down Expand Up @@ -349,14 +319,6 @@ spec:
name: hlf-peer-org--{{ $org.Name | lower }}
subPath: admin/msp



#- mountPath: /hlf_config/orderer-tlsca
# name: orderer-tlsca
#- mountPath: /etc/hyperledger/fabric/tls/
# name: peer-{{ $org.Name | lower }}-{{ $peer | lower }}-tls
#- mountPath: /etc/hyperledger/fabric/msp/
# name: peer-{{ $org.Name | lower }}-admin-msp

env:
- name: CORE_PEER_ADDRESS
Expand Down Expand Up @@ -457,14 +419,6 @@ spec:
- mountPath: /hlf_config/
name: hlf-configtx

#- mountPath: /hlf_config/orderer-tlsca
# name: orderer-tlsca
#- mountPath: /etc/hyperledger/fabric/msp/
# name: peer-{{ $org.Name | lower }}-admin-msp
#- mountPath: /hlf-scripts
# name: hlf-scripts
#- mountPath: /hlf_config/
# name: hlf-configtx

env:
- name: FABRIC_LOGGING_SPEC
Expand Down
30 changes: 0 additions & 30 deletions fabric-kube/extend.sh

This file was deleted.

39 changes: 3 additions & 36 deletions fabric-kube/hlf-init-kube/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
{{ if .Values.backup.enabled }}
Wait for all CA pods to come up
This is necessary to run artifacts-flow to retreive necessary crypto material from CA's

HL Fabric network is now prepared for backup!

Wait for all pods are up and running then run the backup Argo flow!
After that is completed, make another Helm upgrade to return back to normal operation.

{{- if (index .Values "hlf-kafka").enabled }}

IMPORTANT: Looks like you are using Kafka Orderer.
In this case you also need to manually backup Kafka cluster!

{{- end}}

{{ else if .Values.restore.enabled }}

HL Fabric network is now prepared for restore!

Wait for all pods are up and running then run the restore Argo flow!
After that is completed, make another Helm upgrade to return back to normal operation.

{{- if (index .Values "hlf-kafka").enabled }}

IMPORTANT: Looks like you are using Kafka Orderer.
In this case you also need to manually restore Kafka cluster!

{{- end}}

{{ else }}

Happy BlockChaining :)

And don't forget the first rule of BlockChain club:

"Do not use BlockChain unless absolutely necessary!"

r a f t
Intermediate CA's are not supported

{{- end }}
Loading

0 comments on commit 903955a

Please sign in to comment.