Skip to content

Instantly share code, notes, and snippets.

@cowboy-bebug
Last active June 9, 2022 10:33
Show Gist options
  • Save cowboy-bebug/966c0503ef02b5c74c78785bf01b01bb to your computer and use it in GitHub Desktop.
Save cowboy-bebug/966c0503ef02b5c74c78785bf01b01bb to your computer and use it in GitHub Desktop.
Run Ajuna node and worker

Run Ajuna and worker

Run compose with optinal logging (open http://localhost in your browser for app):

docker-compose up -d
docker logs ajuna-network_worker_1 -f

Bash into the worker container to start sending trusted calls:

docker exec -it ajuna-network_worker_1 /bin/bash

From the worker container:

# run the whole thing
demo_connect_four.sh -u ws://ajuna-node

# or run individual calls
export CLIENT="integritee-cli -u ws://ajuna-node"
export MRENCLAVE=$($CLIENT list-workers | awk '/  MRENCLAVE: / { print $2; exit }')
$CLIENT trusted --mrenclave ${MRENCLAVE} --direct set-balance //Alice 1000
$CLIENT trusted --mrenclave ${MRENCLAVE} --direct set-balance //Bob   1000
$CLIENT queue-game //Alice
$CLIENT queue-game //Bob
version: "3"
services:
ajuna-node:
image: ajuna/solochain:latest
command: --dev --tmp --ws-external
ports:
- 9933:9933
- 9944:9944
worker:
image: ajuna/worker:latest
command:
- /bin/bash
- -c
- |
integritee-service init-shard
integritee-service shielding-key
integritee-service signing-key
integritee-service --ws-external -u ws://ajuna-node run --dev --skip-ra
ports:
- 2000:2000 # trusted worker port
- 3443:3443 # mutual remote attestation port
depends_on:
- ajuna-node
polkadot-ui:
image: jacogr/polkadot-js-apps:latest
links:
- ajuna-node
environment:
- WS_URL=ws://localhost:9944
ports:
- 80:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment