- All new docker images -- improved size and build times!
- Core and p2p unification -- now called worker
- More configuration -- you can now set any parameter via environment variables, or per-environment configuration
- Scalability -- Support for up to a bazillion worker nodes!
- Progress towards Test/Mainnet & packaging images provided to users
- Rewritten startup scripts in Python
- Change startup of aesm_service to non-daemon mode (docker doesn't like daemon processes)
- Supervisord now manages all image processes
- Preparing centralized logging
Just use the makefile to clone the repos from github:
make clone-all
clone-all
can take the following arguments:
Example:
make clone-all BRANCH=master
BRANCH
| default = develop
And build all the images:
make build
Build can take the following arguments:
SGX_MODE
| default = HWDEBUG
| default = 0
Example:
make build SGX_MODE=SW DEBUG=0
The following make targets also exist:
- clone-core
- clone-p2p
- clone-km
- clone-contract
- clone-client
- build-km
- build-contract
- build-worker
- build-client
Copy .env.template
to .env
and adjust any values as needed:
cp .env.template .env
Software mode:
docker-compose up
Hardware mode:
docker-compose -f docker-compose.yml -f docker-compose.hw.yml up
** Current develop is still kind of bugged, so it won't actually run all the tests successfully
The compose by default comes with a client you can use to run tests on the cluster. To use, just exec make test
in the client
docker-compose exec client make test
docker-compose scale worker=X
Be careful you have enough memory to run all those workers though!
- Clone from github both
core
andp2p
:
docker build -f gitclone_core.Dockerfile -t gitclone_core .
docker build -f gitclone_p2p.Dockerfile -t gitclone_p2p .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_core.Dockerfile -t gitclone_core --build-arg branch=develop .
docker build -f gitclone_p2p.Dockerfile -t gitclone_p2p --build-arg branch=develop .
- (Optional) Build base image:
docker build --build-arg DEBUG=1 --build-arg SGX_MODE=SW -f 01_core_base.Dockerfile -t enigmampc/core-base:latest .
- Build worker image:
docker build --build-arg SGX_MODE=SW -f 02_core_and_p2p.Dockerfile -t enigmampc/worker-minimal:latest .
- Build custom image based off baidu image:
docker build -f baidu1804.Dockerfile -t baiduxlab/sgx-rust:1804-1.0.9 .
- Recompile SGX binaries. Will be useful if we want to move off Ubuntu 18.04:
docker build -f buildSGX.Dockerfile -t buildsgx .
- Clone from github:
docker build -f gitclone_km.Dockerfile -t gitclone_km .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_km.Dockerfile -t gitclone_km --build-arg branch=develop .
- (Optional) Build base image:
docker build --build-arg SGX_MODE=SW -f 01_core_base.Dockerfile -t enigmampc/core-base:latest .
- Build Key Management image:
docker build --build-arg SGX_MODE=SW -f km.Dockerfile -t enigmampc/key_management:latest .
- Clone from github:
docker build -f gitclone_contract.Dockerfile -t gitclone_contract .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_contract.Dockerfile -t gitclone_contract --build-arg branch=develop .
- Build Enigma-Contract image:
docker build --build-arg SGX_MODE=SW -f contract.Dockerfile -t enigmampc/contract:latest .
- Build
enigma_common
Docker image:
cd common_scripts/
docker build -f common.Dockerfile -t enigma_common .
cd ..
- Clone
integration-tests
from Github:
cd client
docker build -f gitclone_integration.Dockerfile -t gitclone_integration .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_integration.Dockerfile -t gitclone_integration --build-arg branch=develop .
- Build Client image:
docker build -f client.Dockerfile -t enigmampc/client:latest .
Clone this repository. If cloned into Pycharm you should get all the build configurations for free
Each image uses the following:
- Dockerfile
- Devops folder -- containing docker-level configuration
- Scripts folder -- containing all the start-up scripts
- Config folder -- configuration defaults, per environment
- More documentation on environment variables