INTO-CPS-Association / DTaaS

:factory: :left_right_arrow: :busts_in_silhouette: Digital Twin as a Service
https://into-cps-association.github.io/DTaaS/
Other
116 stars 57 forks source link

[FEATURE] Port libms config from env to yaml format #1041

Open prasadtalasila opened 2 weeks ago

prasadtalasila commented 2 weeks ago

Describe the feature

A clear and concise description of the new feature using "As a developer I want to migrate libms config to yaml format So That a more generic configuration can be used.

Describe the problems your feature request solves

The proposed git mode of libms requires separate git credentials (ssh key/http token) for each user. Such listing of users and dedicated credentials are difficult to specify in env file. This issue is related to feature #1040 and discussion #951.

Describe the solution you'd like

Port the libms configuration to yaml format using js-yaml

The proposed configuration is:

port: 4001
file-storage: '/Users/<Username>/DTaaS/files'
log-level='debug'
api-paths:
    graphql:
         path: '/lib' or ''
         playground: 'false' or 'true'
    file-server:
         path: '/lib/files' or '/files'
mode:
    local:
    gitlab:
        - user-1:
              server:
              http-token:
              ssh-key: |

        - user-2:
              server:
              http-token:
              ssh-key: |

Describe alternatives you've considered

An alternative INI format - see wiki and examples - has been considered but yaml has much wider community support so yaml format has been chosen.

Additional context

The runner microservice already uses js-yaml. It's code can be adapted here.

Success Criterion

Checklist:

prasadtalasila commented 1 week ago

@nichlaes Suggestions on the new config file.

  1. The config file needs to be named as config/libms.default.yaml
  2. The Dockerfiles and compose files in docker, deploy/docker, deploy/config and compose.lib.yaml