The Job Manager component represents the core module of the ICOS Controller runtime. This module is responsible for the runtime management and provides control, persistence and the coordination between ICOS components. Such a component enables the continuum to be consistent within real time, furthermore becoming the centre of the truth in the mentioned continuum.
For ICOS to become trustable at runtime, and consistently manage ICOS execution in such a diverse continuum, Job Manager provides the notion of a Job. The Job Manager provides job lifecycle management operations (CRUD) that enable consistent and efficient execution of a job, furthermore, managing both the state of the job and the state of the actual resource within the agent that owes that job.
- 1. ICOS Concepts
- 2. Swagger Job Manager API
- 3. Models
- 4. Docker Installation
- 5. Kind Installation
- 6. Usage
- 7. Contributing
- 8. Legal
A Job defines the minimal executable unit to be managed by ICOS Controller at runtime. For this unit to become executable by the different ICOS Agents, more importantly, without considering their underlying runtime technology.
When an application is composed of multiple components it becomes a set of jobs, in other words, a job group. Job group holds all the information regarding the application, including all the components(jobs) that compose the application, the relationship between the different jobs (application topology) and other information such as requirements and policies such application must meet.
Describes, following ICOS syntax, the components an application is composed of, as well as their requirements to be met and policies to be enforced. Currently, the Application Descriptor may vary from version to version, so it is recommended to check the Application Descriptor Repository.
Defines the underlying infrastructure able to execute a single job, taking into consideration the mentioned requirements and the capacity the infrastructure piece provides, since appropriate quality of service must be enforced. This target is selected by the Matchmaker (described in the next section) for each job that comprises an application.
Abstract representation of the actual application component executed within a single target. This representation is retrieved from the orchestrator at runtime during the execution of the corresponding job.
The actual underlying orchestrator that manages the infrastructure where the job is executed. From a Job Manager’s perspective, whenever an agent takes a job for execution, it becomes the owner of such a job, meaning that only the mentioned agent can manage this job’s life cycle.
ICOS Job Manager Microservice.
Contact information:
API Support
http://www.swagger.io/support
[email protected]
License: Apache 2.0
OAuth 2.0
basic | Basic |
---|
Get all jobgroups
None
Code | Description | Schema |
---|---|---|
200 | OK | models.JobGroup |
400 | Bad Request | string |
404 | Not Found | string |
Create new jobgroup
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
application | body | Application manifest YAML | Yes | string |
Code | Description | Schema |
---|---|---|
201 | Created | models.JobGroup |
422 | Unprocessable Entity | string |
Update a jobgroup
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
JobGroup | body | JobGroup information | Yes | models.JobGroup |
Code | Description | Schema |
---|---|---|
200 | OK | models.JobGroup |
400 | Bad Request | string |
404 | Not Found | string |
Delete job group by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
group_uuid | path | JobGroup UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | string |
400 | Bad Request | string |
404 | Not Found | string |
Get jobgroup by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
group_uuid | path | JobGroup UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | models.JobGroup |
400 | Bad Request | string |
404 | Not Found | string |
Stop jobgroup by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
group_uuid | path | JobGroup UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | models.JobGroup |
400 | Bad Request | string |
404 | Not Found | string |
Get all jobs
None
Code | Description | Schema |
---|---|---|
200 | OK | array of models.Job |
404 | Not Found | string |
Update a job
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
job_uuid | path | Job UUID | Yes | string |
Job | body | Job information | Yes | models.Job |
Code | Description | Schema |
---|---|---|
200 | OK | models.Job |
400 | Job UUID is required | string |
404 | Not Found | string |
Delete job by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
job_uuid | path | Job UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Ok | string |
400 | Job UUID is required | string |
404 | Not Found | string |
Get job by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
job_uuid | path | Job UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | Ok | models.Job |
400 | Job UUID is required | string |
404 | Not Found | string |
Get jobs to execute
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
orchestrator | path | Orchestrator type [ocm | nuvla] | Yes |
owner_id | path | Owner ID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | array of models.Job |
400 | Orchestrator type is required | string |
404 | Not Found | string |
Promote job by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
job_uuid | path | Job UUID | Yes | string |
Code | Description | Schema |
---|---|---|
204 | Job Promoted | string |
400 | Job UUID is required | string |
404 | Not Found | string |
Create new policy incompliance
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
application | body | Incompliance Object | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | models.Incompliance |
400 | Incompliance Object is not correct | string |
422 | Unprocessable Entity | string |
Update resource status by UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | Resource UUID | Yes | string |
resource | body | Resource info | Yes | models.Resource |
Code | Description | Schema |
---|---|---|
200 | Resource updated | string |
400 | Resource UUID is required | string |
404 | Not Found | string |
Get resource status by job UUID
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
job_uuid | path | Job UUID | Yes | string |
Code | Description | Schema |
---|---|---|
200 | OK | models.Resource |
400 | Job UUID is required | string |
404 | Not Found | string |
Name | Type | Description |
---|---|---|
created_at | string | |
id | integer | |
lastTransitionTime | string | |
message | string | |
observedGeneration | integer | |
reason | string | |
status | string | models.ConditionStatus |
type | string | models.ResourceState |
updated_at | string |
Name | Type | Description |
---|---|---|
ConditionTrue | string | "True" |
ConditionFalse | string | "False" |
ConditionUnknown | string | "Unknown" |
Name | Type | Description |
---|---|---|
created_at | string | |
currentValue | string | ResourceID |
extraLabels | models.StringMap | |
id | string | |
measurementBackend | string | |
policyId | string | |
policyName | string | |
remediation | models.RemediationType | |
subject | models.Subject | |
threshold | string | |
updated_at | string |
Name | Type | Description |
---|---|---|
created_at | string | |
id | string | |
job_group_description | string | |
job_group_id | string | |
job_group_name | string | |
manifests | array of models.PlainManifest | |
namespace | string | |
orchestrator | models.OrchestratorType | |
owner_id | string | |
resource | models.Resource | |
state | models.JobState | |
sub_type | models.RemediationType | |
targets | models.Target | |
type | models.JobType | |
updated_at | string |
Name | Type | Description |
---|---|---|
appDescription | string | |
appName | string | |
created_at | string | |
id | string | |
jobs | array of models.Job | |
updated_at | string |
Name | Type | Description |
---|---|---|
JobCreated | integer | 1 |
JobProgressing | integer | 2 |
JobFinished | integer | 3 |
JobDegraded | integer | 4 |
Name | Type | Description |
---|---|---|
CreateDeployment | integer | 5 |
DeleteDeployment | integer | 6 |
UpdateDeployment | integer | 7 |
ReplaceDeployment | integer | 8 |
Name | Type | Description |
---|---|---|
OCM | string | ocm |
Nuvla | string | nuvla |
None | string | "" |
Name | Type | Description |
---|---|---|
created_at | string | |
id | integer | |
updated_at | string | |
yamlString | string |
Name | Type | Description |
---|---|---|
ScaleUp | string | scale-up |
ScaleDown | string | scale-down |
ScaleOut | string | scale-out |
ScaleIn | string | scale-in |
PatchDeployment | string | patch |
Reallocation | string | reallocation |
Name | Type | Description |
---|---|---|
conditions | array of models.Condition | |
created_at | string | |
id | string | |
job_id | string | |
resource_name | string | |
resource_uuid | string | |
updated_at | string |
Name | Type | Description |
---|---|---|
Progressing | string | Progressing |
Applied | string | Applied |
Available | string | Available |
Degraded | string | Degraded |
Name | Type | Description |
---|---|---|
additionalProperties | string |
Name | Type | Description |
---|---|---|
appComponent | string | |
appInstance | string | |
appName | string | |
created_at | string | |
id | string | |
resourceId | string | |
type | string | |
updated_at | string |
Name | Type | Description |
---|---|---|
cluster_name | string | |
created_at | string | |
id | integer | |
node_name | string | |
orchestrator | models.OrchestratorType | |
updated_at | string |
To install and run the job-manager
, follow these steps:
-
Clone the repository:
git clone https://production.eng.it/gitlab/icos/meta-kernel/job-manager.git
-
Navigate to the project directory:
cd job-manager
-
Build the Docker image:
docker build -t job-manager .
-
Run the Docker container:
docker run -p 8082:8082 job-manager
Please, refer to the helm suite in ICOS Controller Repository
After running the service, you can use tools like curl
, Postman
, Swagger
or any other API client to interact with the endpoints. Beware that you will need a Keycloak Token to perform requests to this service.
curl --location 'http://localhost:8082/jobmanager/jobs' \
--header 'Authorization: Bearer (Token)'
In order to contribute to this repository, feel free to open a pull request and assign @x_alvolkov
or x_magallar
as a reviewer.
The Job Manager is released under the Apache 2.0 license. Copyright © 2022-2024 Eviden. All rights reserved.
🇪🇺 This work has received funding from the European Union's HORIZON research and innovation programme under grant agreement No. 101070177.