Currently only solo mode is supported.
Requirements
- Go-lang >= 1.9
- Docker >= 17.12.0
- Rabbitmq >= 3.7.7
- Dep >= 1.11
-
Install Engine
go get github.com/it-chain/engine
-
Move to engine folder
cd $GOPATH/src/github.com/it-chain/engine
-
Install dependencies
dep ensure
-
Run engine
Make sure to run rabbitmq and docker before run it-chain
go install it-chain.go it-chain
-
Check block on http://localhost:4444/blocks
Sample icode url: https://github.com/junbeomlee/learn-icode
-
Fork learn-icode
-
Add deploy key
In terminal or cmd, type
ssh-keygen -t rsa
Then you can see
.ssh
directory on the path where you typed keygen commandIn
.ssh
, there'sid_rsa
,id_rsa.pub
. You need to add Deploy keys to github usingid_rsa.pub
- If you clone public repository, you can skip this process.
-
Deploy learn-icode
-
Deploy with ssh key
it-chain ivm deploy [learn-icode-url] [ssh-private-key-path] [password]
deploy
command clone from target repsoitory, and create docker container with that code
If you don't set ssh key password, you can skip to write [password] -
Deploy with no ssh key
it-chain ivm deploy [learn-icode-url]
We support to clone public repository. You can deploy learn-icode with no ssh
-
Check docker container
docker ps
-
Check icode on http://localhost:4444/icodes
-
- Invoke initA function using cmd (initA function sets key value A to zero)
it-chain ivm invoke [IcodeID] initA
- After invoking a initA, query getA (getA function get value of key A)
it-chain ivm query [IcodeID] getA
- If you invoke incA, you can increase the value of A
it-chain ivm invoke [IcodeID] incA
- Check block on http://localhost:4444/blocks