-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Use Occlum configuration in yaml format in NGO #276
Comments
Can the Occlum.yaml file accepts the bom file as one part of it. Users just write one file, then all the things can be done. |
@liqinggd I remembered we dicussed this before. The same with Occlum.json but just with comments in line
This way keeps all items open and users can do what they want to modify. All items are commented unless users uncommented it intentionally, otherwise use the ones from template.
|
Use Occlum configuration in yaml format
Summary
Current Occlum/NGO use the json format configuration file
Occlum.json
which is not friendly to users.Because json file neither support adding comment, nor pasing OS environments directly.
Yaml format could support both above, making the Occlum configuration more friendly and easy to use for users.
Motivation
Yaml format can support adding comment and pasing OS environments directly which makes the Occlum configuration more friendly and easy to use for users.
Guide-level explanation
With the the new introduced yaml format Occlum configuration file, nothing changed for the whole occlum build process but with minor changes described below.
occlum new
orocclum init
, there is a defaultOcclum.yaml
(with comments in line) in the occlum_instance instead of the oldOcclum.json
file.yq
to modify the configuration items inOcclum.yaml
.occlum build
, one extra step added in the building process which is converting theOcclum.yaml
to internalOcclum.json
at first, then all the building keeps the same with the internalOcclum.json
. That is to say, in the Occlum internal building/booting process, json format configuration file is still used. But users don't and shouldn't touch them.Reference-level explanation
This new yaml way described provides much better user experience, and keeps the same flow internally which introduces no changes in LibOS but minor changes in building.
Drawbacks
Most demos should be updated to adapt to the new yaml configuration.
For NGO, I think it is acceptable since no NGO formal release till now.
We can still support old json way by adding compatibility check as below:
(although I doubt if it is necessary for NGO).
Occlum.json
in occlum_instance, then just use it instead of creating newOcclum.yaml
.The text was updated successfully, but these errors were encountered: