Skip to content
openworkloadPublic

About

Default job scheduler that is used in Sky Port

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Sky Port scheduler

Description

This is a scheduler for Open Workload project, which core daemon can be found here. Sky Port is an universal bus between user software and compute resources. It can also be considered as a transportation layer between workload producers and compute resource providers. Sky Port makes it easy to connect user software to different cloud resources. Jobs submitted to Sky Port are scheduled by the daemon represented by this repository.

Build

Requirements:

  • gcc with C++17 support
  • cmake version >= 3.16
  • Erlang/OTP with ei (set _KERL_ACTIVE_DIR to the Erlang root that contains usr/include and usr/lib/libei.a)
  • Sibling checkout of swm-core at ../swm-core (used via deps/swm-core)
  • clang-format-14 (for make format / CI format check; other major versions can reshuffle whitespace)

Installing GTest (optional)

Before generating compilation files, perform the following actions:

  1. Download and unzip GTest sources (https://github.com/google/googletest). Set directory with GTest sources as current.

  2. Generate GTest's compilation files by CMake tool:

  • Linux:
export GTEST_ROOT=/usr/local/GTest
cmake . -G "Unix Makefiles"
  1. Compile and install GTest:
make
make install
  1. Set up environment variable GTEST_ROOT as /usr/local/GTest.

Compile binaries

Optionally, enable unit tests by installing GTest (see the previous section). If GTEST_ROOT points at an installed GTest, CMake enables the unit tests automatically.

./build.sh

build.sh links deps/swm-core to ../swm-core when needed, then runs cmake and make. Defaults (_KERL_ACTIVE_DIR=/usr/erlang, GTEST_ROOT=/usr/local/GTest, CMAKE_BUILD_TYPE=RelWithDebInfo) match the skyport-dev container; override them in the environment for other setups.

Build hardening flags, plugin trust rules, and fuzz instructions are in HOWTO/SECURITY.md.

Run unit tests

./bin/swm-sched-tests

Fuzz smoke (optional, Clang + libFuzzer)

cmake . -DSWM_ENABLE_FUZZ=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
make fuzz-smoke

Format C++ sources

Style rules live in STYLE.md and are enforced by .clang-format.

make format         # rewrite src/ and tests/ in place
make format-check   # fail if any file differs from .clang-format

Or without CMake: ./scripts/format-cpp.sh / ./scripts/format-cpp.sh check.

Run github actions

scripts/run-act.sh runs nektos/act against the host Podman socket. From the host it starts skyport-dev if needed (sibling ../swm-core run-in-dev-container.sh, same stack as make cr), then runs act inside that container. Nested CI containers still use the bind-mounted host Podman API.

# Host (no local cmake): script starts/enters skyport-dev
./scripts/run-act.sh --job unittests --rm
./scripts/run-act.sh --job fuzz_smoke --rm

# Inside skyport-dev only (CMake Makefile needs cmake on PATH)
make act ARGS='--job unittests --rm'

Requires a Podman socket (systemctl --user enable --now podman.socket) and a sibling swm-core checkout. Repo .actrc maps ubuntu-24.04 to catthehacker/ubuntu:act-24.04 (includes Node for setup-beam).

Contributing

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

About

Default job scheduler that is used in Sky Port

Resources

Stars

5 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages