This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
How to add a service to OpenPAI ? A simple guideline
Xiang Long edited this page Feb 3, 2021
·
2 revisions
While the process I implemented a docker pull-through cache service inside pai, I struggled to clarify how a service should be and service-configuration.yml generated.
In general, a service directory should have 2 or 3 sub-directory: "build"(optional), "config", "deploy".
- The "build" directory contains a dockerfile to generate service specific container when developer need custom docker for service.
- The "config" directory contains a config yaml file and a python script to add dynamic configurations. Both of those files have restrict naming convention: the config yaml file should be named as "<service_name>.yaml", the python script should be named as "<service_name_replace"-"with"_">.py. Consider "docker-cache/config/" as a sample, the config file name is "docker-cache.yaml", and the python script name is "docker_cache.py".
- The "deploy" directory contains many files related to service deployment. Those files can devided to 3 types: k8s api files, service operation scripts and service entry file. The entry file is service.yaml, which describes meta info of a service.
If there are any questions or concerns about this wiki, please open OpenPAI Issue directly.
- Developer handbook