Downloading and Installing CreDB
Note: The current version of CreDB is still considered a tech prototype and shall not be used in production environments.
Downloading Docker images
We provide docker images that contain a pre-compiled version of CreDB. Currently there is no hardware support for SGX in Docker images so this setup only allows to run CreDB in simulation mode.
To clone the image and run credb execute the following.
sudo docker pull cskama/credb-simulation sudo docker tag cskama/credb-simulation credb # This will set all the necessary environment variables to run the server sudo docker run -e sgx_mode=simulation credb ../docker/run-server.sh # Run a python shell on another instance # (use docker inspect to find the IP of the server node) sudo docker run -it -e sgx_mode=simulation credb ../docker/credb-shell.sh
Building from Source
If you want to modify the CreDB sourcecode or run the enclave in hardware support, you need to build the project from source.
CreDB can be built from source on any Linux system that provides a compiler supporting C++17 and a kernel supporting epoll(). However, for the following we assume a Debian-based systems, in particular Ubuntu 18.04. We rely on multiple packages that need to be installed in order to successfully build CreDB and its prerequisites.
- Google Test
- Google Logging
- GNU Compiler Collection 7 or LLVM clang 6
- Python 3
- Boost Python
- Boost Program Options
- The Meson build system and Ninja
On Ubuntu the following command should install all these dependencies.
sudo apt install build-essentials clang-tidy-6.0 clang-6.0 google-test libgoogle-glog-dev doxygen libboost-python-dev libpython3-dev libboost-program-options-dev meson
Install the SGX SDK following the instructions here.
CreDB relies on multiple side projects to be built successfully
After all dependencies and prerequisites have been installed you can checkout the latest CreDB sourcecode.
git clone https://github.com/kaimast/credb.git
Then you can compile the project using the Meson build system
meson build cd build ninja
Note that there are several options to configure CreDB. The most important is sgx mode. For example, if you don’t have access to SGX hardware, you can build it in simulation mode like so.
meson configure -Dsgx_mode=simulation