Skip to content

Commit

Permalink
4.9: minor fixes (#17)
Browse files Browse the repository at this point in the history
* [4.9] rename integritee-worker to worker as this is the repo's name

* [4.9] fix dangling `-p` flag in docker run command

* [4.9] add example that exposes the default ports to the host.
  • Loading branch information
clangenb authored Dec 21, 2022
1 parent 63621bf commit d860885
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions 4-development/4.9-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ The launch scripts assume that those two repositories reside in the same directo
Steps to get a running setup:

1. Mount the current directory containing the integritee-worker and integritee node into the Docker container and start a bash session inside:
```
docker run -it --mount "type=bind,src=$(pwd),dst=/opt/shared" --workdir /opt/shared -p integritee/integritee-dev:0.1.10 /bin/bash
```shell
docker run -it --mount "type=bind,src=$(pwd),dst=/opt/shared" --workdir /opt/shared integritee/integritee-dev:0.1.10 /bin/bash

# If you want to expose the default ports of the services to the host, you can supply some `-p` args:
docker run -it --mount "type=bind,src=$(pwd),dst=/opt/shared" --workdir /opt/shared -p 9944:9944 -p 2000:2000 -p 3443:3443 integritee/integritee-dev:0.1.10 /bin/bash
```
2. Now you have access to the shell in the Docker container. So you can start the builds.
```shell
Expand All @@ -34,7 +37,7 @@ cargo build release --features "skip-extrinsic-filtering skip-ias-check"
cd ../

# Build the worker: in this example we compile it in the offchain worker mode.
cd integritee-worker
cd worker

# Build the offchain-worker in software mode if you don't have the SGX hardware set up.
# How to enable hardware mode in Docker can be found here in chapter 5.2.3.3.
Expand All @@ -49,15 +52,15 @@ SGX_MODE=SW WORKER_MODE=offchain-worker make
docker exec -it <container-id> bash

# Have a look at the logs with the handy tmux scripts (the logs are only populated if the launch.py was used).
cd integritee-worker/local-setup
cd worker/local-setup
./tmux_logger.sh

# The demo scripts can be executed in yet another terminal session where you enter the same running Docker container.
# Replace the <container-id> with the value returned upon container creation with the above command.
docker exec -it <container-id> bash

# This script also shows what kind of commands you can execute with the CLI.
cd integritee-worker/cli
cd worker/cli
./demo_shielding_unshielding.sh

# Check available commands of the CLI.
Expand Down

0 comments on commit d860885

Please sign in to comment.