PIVT icon indicating copy to clipboard operation
PIVT copied to clipboard

Question: Can we do this without argo

Open zimab opened this issue 6 years ago • 31 comments

If I change the templates(EX: hlf-kube/peer-org-flow/templates/peerorg-workflow.yaml) to not use argo and kind type workflow will the process still work/what would I need to change? Our K8s environment does not allow argo currently. This would be for samples/simple example.

zimab avatar Oct 25 '19 14:10 zimab

nope, sorry, I'm afraid not!

you need a mechanism to orchestrate the tasks, (i.e. what will run after what), you may search for another tool, but:

  1. it will be an almost complete re-write
  2. most possibly you would need to install that tool to your K8S too. if you are not allowed to install Argo, then possibly you wont be allowed to install that tool either

raftAtGit avatar Oct 25 '19 14:10 raftAtGit

@raftAtGit Thank you for the info.

zimab avatar Oct 25 '19 15:10 zimab

is argo used in this network startup command? helm install ./hlf-kube --name hlf-kube -f samples/simple/network.yaml -f samples/simple/crypto-config.yaml

or is it just used in the next steps for channel and chaincode?

zimab avatar Oct 26 '19 18:10 zimab

no, it's not used when launching the network. but used in all flows.

it's not used behind the scenes, go over the samples in README, if there no call like | argo submit then it's not used.

raftAtGit avatar Oct 26 '19 18:10 raftAtGit

so you mean that if I see | argo submit then it is used I assume, but not used in the above command I gave?

zimab avatar Oct 26 '19 18:10 zimab

right, if you see it, it's used. if dont see it, it's not used :)

in the above command it's not used. that command is for launching the network, not a flow

raftAtGit avatar Oct 26 '19 18:10 raftAtGit

Thank you :)

zimab avatar Oct 26 '19 18:10 zimab

I am getting the following errors when bringing up the sample/simple network.

2019-10-27 17:52:27.678 UTC [msp] getPemMaterialFromDir -> WARN 001 Failed reading file /etc/hyperledger/fabric/msp/admincerts/cert.pem: no pem content for file /etc/hyperledger/fabric/msp/admincerts/cert.pem 2019-10-27 17:52:27.678 UTC [main] InitCmd -> ERRO 002 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: Setup error: nil conf reference

zimab avatar Oct 27 '19 17:10 zimab

do not use cryptogen 1.4.3. it's a known issue. also mentioned in requirements in README

raftAtGit avatar Oct 27 '19 17:10 raftAtGit

cryptogen: Version: 1.3.0 Commit SHA: ab0a67a Go version: go1.10.4 OS/Arch: darwin/amd64

zimab avatar Oct 27 '19 18:10 zimab

himm, what is the output of this command? tree samples/simple/crypto-config/peerOrganizations/atlantis.com/peers/peer0.atlantis.com/msp/

raftAtGit avatar Oct 27 '19 18:10 raftAtGit

tree samples/simple/crypto-config/peerOrganizations/""/peers/peer0.""/msp/ samples/simple/crypto-config/peerOrganizations/""/peers/peer0.""/msp/ ├── cacerts │   └── ca.""-cert.pem ├── config.yaml ├── keystore │   └── 320326145b205359bb43a6bf262a1c6a08c3bd407ae349c7653b5e8886300d6e_sk ├── signcerts │   └── peer0.""-cert.pem └── tlscacerts └── tlsca."*****"-cert.pem

4 directories, 5 files

I renamed the peer..

zimab avatar Oct 27 '19 18:10 zimab

there should be an admincerts folder there too. never tried cryptogen 1.3.0 before. looks like it doesnt create that folder. use 1.4.2 or 1.4.1, they are known to be working well

raftAtGit avatar Oct 27 '19 18:10 raftAtGit

How can I upgrade cryptogen? I believe I have it from hyperledger binaries download

zimab avatar Oct 27 '19 18:10 zimab

follow the link in README/requirements

raftAtGit avatar Oct 27 '19 18:10 raftAtGit

Thanks!

zimab avatar Oct 27 '19 18:10 zimab

Can I remove hlf-kube/requirements.yaml since sample/simple does not use kafka currently? I want to be able to run the network without doing the following for sample/simple helm repo add kafka http://storage.googleapis.com/kubernetes-charts-incubator helm dependency update ./hlf-kube/

zimab avatar Oct 28 '19 18:10 zimab

I guess it should be fine

raftAtGit avatar Oct 29 '19 08:10 raftAtGit

Since I cannot use argo I assume I have to run the commands manually for the channel/chaincode. Do I have the correct info below since some commands need to be run on only one and some need to be run on all peers? Anything I am missing?

create channel on peer1 all peers join channel install chaincode on each peer instantiate chaincode on only one peer query on each peer invoke on only one peer

zimab avatar Oct 29 '19 17:10 zimab

right, that's basically the flow. except:

query on each peer -> we do not do this invoke on only one peer -> we do this for each peer. not mandatory but handy, see FAQ page for the reasoning

raftAtGit avatar Oct 30 '19 12:10 raftAtGit

Thank you! and seems no need to do anchor peers commands(as basic fabric-samples byfn does)?

zimab avatar Oct 30 '19 12:10 zimab

I guess it's good practice actually to set anchor peers. but if you only have one peer per organization, possibly no need

raftAtGit avatar Oct 30 '19 13:10 raftAtGit

I keep getting this error on only peer images..

PEER IMAGE ERRORS Error from server (BadRequest): a container name must be specified for pod hlf-peer--""...., choose one of: [peer couchdb]

zimab avatar Nov 12 '19 15:11 zimab

well specify the container name as the error says ;) -c peer

raftAtGit avatar Nov 12 '19 15:11 raftAtGit

Where to specify that? in what command?

zimab avatar Nov 12 '19 15:11 zimab

while executing which command you get this error?

raftAtGit avatar Nov 12 '19 15:11 raftAtGit

helm install ./hlf-kube --name hlf-kube -f samples/simple/network.yaml -f samples/simple/crypto-config.yaml

then the containers show error so I check logs and it shows the error provided

zimab avatar Nov 12 '19 15:11 zimab

so you try to check the logs with kubectl command, provide -c peer argument to kubectl command :)

man, sorry but this is not a Kubernetes basics forum!

raftAtGit avatar Nov 12 '19 15:11 raftAtGit

oh wow thought that was container run error, sry

zimab avatar Nov 12 '19 15:11 zimab

I didn't liked argo, I used helm hooks (https://helm.sh/docs/topics/charts_hooks/) for install CC and join channel

idanilt avatar Mar 16 '20 12:03 idanilt