Support multiple instance type for pipeline runner executor
Problem to solve
Currently, the gitlab runner supports only 2 predefined executor:
- local docker executor that runs on the instance where gitlab-runner is installed
- k8s executor with predefined instance type(Number of CPU and GPU )
If we want to support multiple executor options, e.g., on the basis of what user selects, that is not supported right now.
Proposal for Technical Solution
The pipeline executes on the basis of a pre defined .mlreef.yml template. The template uses to the predefined non tagged executor to execute the job( k8s executor in the current case).
The suggested solution workflow:
Infra:
- Different executors as per different instance type can be registered in gitlab runner. Each type would be assigned a tag to identify the executor. The CI .yml file needs to use the respective tag to execute the job on respective instance type.
Frontend:
- Frontend has feature to select the instance type from given instance type options.
- Frontend stores/sends this data to backend
Backend:
There are 2 suggested solutions for backend to handle this:
- Option 1 : We predefine multiple template for different instance type groups like CPU and GPU and backend selects the right template as per the value received from frontend
- Option 2 : The single template gets dynamically created to final .yml as per the value received from the frontend.
Nautilus:
- Nautilus by default will hardcode one CPU instance type value which backend would be reading to execute the job.
Permissions and Security
Documentation
Availability, Testing & Test Cases
Additional Notes
Is this a cross-stage feature?
Links / references
cc @cpmlreef