Download the repository:
go get -u github.com/consensys/orchestrate
Go to downloaded repository:
cd ${GOPATH}/src/github.com/consensys/orchestrate
Install vendors locally:
make mod-vendor
Compile orchestrate binary
make gobuild
Missing include/secp256k1.h
Package manager go mod
prunes no *.go files therefore in order to be able to compile using local vendors you have to copy
over from $GO_PATH missing go-ethereum/crypto/secp256k1/**/**.h
. Run the following command:
$> GO111MODULE=off go get github.com/ethereum/go-ethereum
$> cp -r ${GOPATH}/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1 \
./vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
Orchestrate requires a bunch of services to persist data and exchange message such as:
- Kafka
- Postgres
- HashiCorp vault
- Redis
To launch those service execute the next command:
make deps
Orchestrate also requires at least one blockchain network for instance Quorum
or Besu
, and a EVM client such as geth
.
For instance we could run besu and geth using the next make commands:
make geth
make quorum
Finally we can run Orchestrate. Firstly, we validate if we have every required service running:
make bootstrap-deps
If that exits without errors we can proceed spawning orchestrate:
make orchestrate
Above command is going to initialize one of each of the orchestrate service using the latest compile version located at ./build/bin/orchestrate
. By default
orchestrate apis are launched in the following ports:
- CHAIN_API_HOST:
localhost:8011
,localhost:8012
- CONTRACT_REGISTRY_API_HOST:
localhost:8020
,localhost:8021
,localhost:8022
- TRANSACTION_SCHEDULER_API_HOST:
localhost:8031
,localhost:8032
Logging To monitor orchestrate logs we can do as follow:
docker-composer logs -f
Orchestrate initial setup In case of having multi tenancy enabled:
export MULTI_TENANCY_ENABLED=1
We will also need to define a set of ENV VARIABLES. First we indicate the namespace use within the generate token to store the tenant_id:
export AUTH_JWT_CLAIMS_NAMESPACE="orchestrate.info"
and define the server certificates to encode and verify generate token:
export AUTH_JWT_CERTIFICATE="MIIDYjCCAkoCCQC9pJWk7qdipjANBgkqhkiG9w0BAQsFADBzMQswCQYDVQQGEwJGUjEOMAwGA1UEBwwFUGFyaXMxEjAQBgNVBAoMCUNvbnNlblN5czEQMA4GA1UECwwHUGVnYVN5czEuMCwGA1UEAw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f0WOqE5xYv4/dyLCdjjXuETi4qFbqayYuwysfH+Zj2kuWCOkxXL6FOH8IQqeyENXHkoSRDkuqwCcAP1ynQzajskZwQwvUbPg+x039Hj4YQCCfOEtBA4T2Fnadmwn0wFJFiOkR/E6f2RSuXX2BAoGALvVqODsxk9s7B0IqH2tbZAsW0CqXNBesRA+w9tIHV2caViFfcPCs+jAORhkkbG5ZZbix+apl+CqQ+trNHHNMWNP+jxVTpTrChHAktdOQpoMu5MnipuLKedI7bPTT/zsweu/FhSFvYd4utzG26J6Rb9hPkOBx9N/KWTXfUcmFJv0CgYAUYVUvPe7MHSd5m8MulxRnVirWzUIUL9Pf1RKWOUq7Ue4oMxzE8CZCJstunCPWgyyxYXgj480PdIuL92eTR+LyaUESb6szZQTxaJfu0mEJS0KYWlONz+jKM4oC06dgJcCMvhgjta2KpXCm3qL1pmKwfFbOLWYBe5uMoHIn9FdJFQ=="
and finally we indicate to our API to use an API to authenticate the users:
export AUTH_API_KEY="with-key"
Generate a token
Run the following command:
orchestrate utils generate-jwt --tenant {TENANT_ID} --expiration ${TIME_IN_HOURS}h