Skip to content

Commit

Permalink
update how to run QKM (#312)
Browse files Browse the repository at this point in the history
* update how to run QKM

* update readme and how to run
  • Loading branch information
ggarri authored Sep 14, 2021
1 parent 5746e66 commit 6e57294
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Quorum Key Manager Release Notes

## v21.7.0-alpha.3 (2021-09-13)
### 🆕 Features
* Support pagination for listing endpoints
* Idempotent behaviour for update endpoints

### 🛠 Bug fixes
* EEA transaction signing using empty privateFor
* Invalid successful readiness response if PG is not reachable

## v21.7.0-alpha.2 (2021-08-26)
### 🆕 Features
* Support for authorization using OIDC, TLS and API-KEY
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,38 @@ In addition, using QKM, you can connect to your Ethereum nodes to sign your tran

## Run QKM

Available docker images can be found at `docker.consensys.net/pub/quorum-key-manager`.
First, define your Quorum Key Manager environment setup using manifest files.
Examples can be found at [`./deps/config/manifests`](./deps/config/manifests).
More information about how to setup service can be found in [documentation](#documentation).

To run the Quorum Key Manager service using docker you can execute the following command:
Once you manifests are written, specify where `quorum-key-manager` can find them on your filesystem
with the following environment variable:

```bash
export HOST_MANIFEST_PATH={your_manifests_folder}
```
docker run -it \
--name quorum-key-manager \
--mount type=bind,source="$(pwd)"/deps/config,target=/manifests \
docker.consensys.net/pub/quorum-key-manager:stable run --manifest-path=/manifests
```

Now launch Quorum Key Manager service using docker-compose with the following command:

You can find more information about the expected content of the `/manifest` folder in the project [documentation](#documentation)
```bash
docker-compose -f docker-compose.latest.yml up key-manager
```

## Build from source

To build binary locally requires Go (version 1.15 or later) and C compiler.

After installing project vendors (ie `go mod vendor`) you can run following command to compile the binary

```
make gobuild
```bash
go build -o ./build/bin/key-manager
```

Binary will be located in `./build/bin/key-manager`

## Documentation

Quorum Key Manager documentation website [https://docs.quorum-key-manager.consensys.net/](https://docs.quorum-key-manager.consensys.net/)


## License

Expand Down
72 changes: 72 additions & 0 deletions docker-compose.latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
version: "3.7"

x-default-variables: &default-variables
LOG_LEVEL: ${LOG_LEVEL-INFO}
LOG_FORMAT: ${LOG_FORMAT-text}
HTTP_PORT: ${HTTP_PORT-8080}
HTTP_HOST: ${HTTP_HOST-0.0.0.0}
HEALTH_PORT: ${HEALTH_PORT-8081}
DB_TLS_SSLMODE: ${DB_TLS_SSLMODE-disable}
DB_TLS_CERT: ${DB_TLS_CERT-}
DB_TLS_KEY: ${DB_TLS_KEY-}
DB_TLS_CA: ${DB_TLS_CA-}
DB_HOST: ${DB_HOST-postgres}
DB_PORT: ${DB_PORT-}
DB_DATABASE: ${DB_DATABASE-}
DB_POOLSIZE: ${DB_POOLSIZE-}
DB_POOL_TIMEOUT: ${DB_POOL_TIMEOUT-}
MANIFEST_PATH: "/manifests"

x-container-common: &container-common
image: docker.consensys.net/pub/quorum-key-manager:latest
restart: ${CONTAINER_RESTART-on-failure}
tty: true

x-postgres-common: &postgres-common
environment:
POSTGRES_PASSWORD: postgres

x-qkm-common: &qkm-common
DB_HOST: postgres

services:
postgres:
<<: *container-common
<<: *postgres-common
image: postgres:13.3-alpine
volumes:
- db-data-api:/var/lib/postgresql/data
ports:
- 5432

migration:
<<: *container-common
environment:
<<: *default-variables
<<: *qkm-common
restart: "no"
command: migrate up
depends_on:
- postgres
volumes:
- ./deps/migrations:/migrations:ro

key-manager:
<<: *container-common
environment:
<<: *default-variables
<<: *qkm-common
ports:
- 8080:8080
- 8081:8081
restart: "no"
depends_on:
- migration
command: run
volumes:
- ${HOST_MANIFEST_PATH-./deps/config/manifests}:/manifests:ro

volumes:
db-data-api:
driver: local

0 comments on commit 6e57294

Please sign in to comment.