Here you will find a number of IncludeOS demo examples. The examples demonstrate various features of IncludeOS. The examples are also built and started with conan.
Each example folder contains:
README.md
: Instructions on how to build/start the exampleCMakeLists.txt
: Build requirementsconfig.json
: Network configurations required for the exampleservice.cpp
: thec++
example serviceconanfile.txt
: the library/tool dependencies the example requiresvm.json
: some examples may have avm.json
if it requires some virtual configuration.
To build and start the examples, ensure the following dependencies are installed on your system.
- conan
- cmake
- git
- clang or gcc
- python3
Note that, you may require some other dependencies based on the example you are trying.
Install profiles and IncludeOS remotes
$ conan config install https://github.com/includeos/conan_config.git
Add the bincrafters remote
$ conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
Verify remotes
$ conan remote list
includeos: https://api.bintray.com/conan/includeos/includeos [Verify SSL: True]
bincrafters: https://api.bintray.com/conan/bincrafters/public-conan [Verify SSL: True]
You can choose between building all the examples together and then use boot
to run the service you want
to check out or you can build the one example you are
interested in and run that service. Below are instructions for both.
To build and run a single example, go into one of the examples and do;
cd <example>
mkdir build
cd build
conan install .. -pr clang-6.0-linux-x86_64
source activate.sh
cmake ..
cmake --build .
boot (service_name)
source deactivate.sh
Create a build folder and do
export CC=clang
export CXX=clang
mkdir build_all
cd build_all
cmake <path_to_repo> -DCONAN_PROFILE=clang-6.0-linux-x86_64 -DPROTOBUF=ON