Nuvla Job Engine.
Project description
Nuvla Job Engine
This repository contains the code and configuration for the Job engine, packaged as a Docker container.
Nuvla job engine use cimi job resource and zookeeper as a locking queue. It's done in a way to be horizontally scalled on different nodes.
Artifacts
nuvla/job:<version>
. A Docker container that can be obtained from the nuvla/job repository in Docker Hub. The tags indicate the release number.
Contributing
Source Code Changes
To contribute code to this repository, please follow these steps:
-
Create a branch from master with a descriptive, kebab-cased name to hold all your changes.
-
Follow the developer guidelines concerning formatting, etc. when modifying the code.
-
Once the changes are ready to be reviewed, create a GitHub pull request. With the pull request, provide a description of the changes and links to any relevant issues (in this repository or others).
-
Ensure that the triggered CI checks all pass. These are triggered automatically with the results shown directly in the pull request.
-
Once the checks pass, assign the pull request to the repository coordinator (who may then assign it to someone else).
-
Interact with the reviewer to address any comments.
When the reviewer is happy with the pull request, he/she will "squash & merge" the pull request and delete the corresponding branch.
Code Formatting
The bulk of the code in this repository is written in Python.
The formatting follows the coding style in defined in PEP 8.
Job engine behavior
- Each action should be distributed by a standalone distributor
- More than one distributor for the same action can be started but only one will be elected to distribute the job
- Executor load actions dynamically at startup time
- Zookeeper is used as a Locking queue containing only job uuid in /job/entries
- Running jobs are put in zookeeper under /job/taken
- If executor is unable to communicate with CIMI, the job in running state is released (put back in zookeeper queue).
- The action implementation should take care to continue or to make the cleanup of a running interrupted job
- If the connection break with zookeeper, job in exection will be released automatically. This is because /job/taken entries are ephemeral nodes.
- Stopping the executor will try to make a proper shuttdown by waiting 2 minutes before killing the process. Each thread that terminate his running action will not take a new one.
Copyright
Copyright © 2019-2024, SixSq SA
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nuvla_job_engine-3.9.6.tar.gz
.
File metadata
- Download URL: nuvla_job_engine-3.9.6.tar.gz
- Upload date:
- Size: 91.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.8 Linux/6.2.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ee63d5de3184561b955eb3cc4bc58ef1dfd868bf2ff0244fc31d0d0d854e831 |
|
MD5 | f2e1f3d0483221b8ed89e8df5773a698 |
|
BLAKE2b-256 | 59175dcb1937f8c7666e3283b55b9fcdf94306d82b23a5fb91787a8f426f0a78 |
File details
Details for the file nuvla_job_engine-3.9.6-py3-none-any.whl
.
File metadata
- Download URL: nuvla_job_engine-3.9.6-py3-none-any.whl
- Upload date:
- Size: 135.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.8 Linux/6.2.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d174ef69a4fee3fa2da2dd3a59ce6427eb298abfc9fe8d00dad466e283ab2e3 |
|
MD5 | 43db040afd9b8ec99c5738c8ac3edc24 |
|
BLAKE2b-256 | b279846adbfcbb017b8b9457089e4a123edc07ec9d54cc33aef54b13ef86446f |