Skip to content

This project contains the source code for both the client and server components of the SLATE platform.

License

Notifications You must be signed in to change notification settings

slateci/slate-client-server

Repository files navigation

SLATE Client and Server

License: Unlicense Deploy SLATE Remote Clients Deploy: PROD

This project contains the Helm Chart and source code for both the client and server components of the SLATE platform. These components can be built independently, following the instructions below.

Dependencies

Common

Server-only

Additionally, kubectl is needed at runtime by the server and by the client under some circumstances, and the server requires helm

This project also uses crow, RapidJSON, libcuckoo, and scrypt, but each of these dependencies is sufficiently lightweight that it is copied directly into this codebase.

Installing Dependencies

Rocky Linux 9

The canonical build now occurs in a container defined here. The Dockerfile gives the exact steps needed to build a container that can be used to build the server code.

yum install -y gcc-c++ openssl-devel libcurl-devel zlib-devel epel-release cmake3
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF && \
yum install -y kubectl

Building the server additionally requires:

yum install -y boost-devel yaml-cpp-devel   json-devel 
yum install -y protobuf-devel  protobuf-compiler  gmock gmock-devel gtest gtest-devel 
yum install -y google-benchmark google-benchmark-devel

Installing the AWS C++ SDK

RPMs do not appear to be available for this library, so it must be built from source. In a suitable location:

curl -LO https://github.com/aws/aws-sdk-cpp/archive/1.7.345.tar.gz && \
tar xzf 1.7.345.tar.gz && \
mkdir aws-sdk-cpp-1.7.345-build && \
cd aws-sdk-cpp-1.7.345-build && \
cmake ../aws-sdk-cpp-1.7.345 -DBUILD_ONLY="dynamodb;route53" -DBUILD_SHARED_LIBS=Off && \
make && \
make install

Building

Options for cmake include:

  • -DBUILD_CLIENT=<True|False>: whether the client will be built (default is True)
  • -DBUILD_SERVER=<True|False>: whether the server will be built (default is True)
  • -DBUILD_SERVER_TESTS=<True|False>: whether the server test binaries will be built (default is True); this option makes sense only when the server will be built.
  • -DSTATIC_CLIENT=True which builds the client as a static binary (defaults to False); this option works correctly only on Alpine Linux (or a system with suitable static libraries available).

Running make will generate the slate-client or slate-service executables, depending on the options selected.

In this project's directory:

mkdir -p build && \
cd build && \
cmake .. [options] && \
make