-
Notifications
You must be signed in to change notification settings - Fork 3
Build from source
You'll need to install the rust tools. Bob requires nightly rust channel.
Then clone repository:
git clone https://github.com/qoollo/bob
Build bob with cargo:
cargo build --release
Executables will be stored in target/release
directory.
You can also build bob with musl C standart library.
Firstly you need to add musl component:
rustup target add x86_64-unknown-linux-musl
Then build bob with cargo:
cargo build --release --target x86_64-unknown-linux-musl
Executables will be stored in
target/x86_64-unknown-linux-musl/release
directory.
Bob have docker images based on ubuntu
and alpine
docker images.
Dockerfiles for these images can be found in dockerfiles
directory.
You can build bob image based on ubuntu
using this command
from root of the repository:
docker build . -f dockerfiles/ubuntu/Dockerfile -t bob
And bob image based on alpine
:
docker build . -f dockerfiles/alpine/Dockerfile -t bob
If build failed due to incompatible compiler version as shown below
...
Installed version: 1.49.0 (2020-10-16)
Minimum required: 1.54.0-nightly (2021-05-18)
...
You can specify newer version of compiler by adding
--build-arg RUST_TC_VER={NEWER_VERSION}
to build command.
For example:
docker build . -f dockerfiles/alpine/Dockerfile -t bob \
--build-arg RUST_TC_VER=nightly-2021-05-19
If you want to test your cluster configuration then
you can run bob with docker-compose. Some examples
of bob cluster built with docker-compose presented in
compose_examples
directory.
You can build cluster with one node:
cd compose_examples/one_node
docker-compose build
And two nodes:
cd compose_examples/two_nodes
docker-compose build
Also you can specify newer version of compiler by adding
--build-arg RUST_TC_VER={NEWER_VERSION}
to build command.
For example:
docker-compose build \
--build-arg RUST_TC_VER=nightly-2021-05-19