Skip to content

Latest commit

 

History

History
126 lines (115 loc) · 3.9 KB

File metadata and controls

126 lines (115 loc) · 3.9 KB

REST server section parser

Default configuration

rest-server default configuration

How to configure rest-server section in service-configuraiton.yaml

There are 2 mandatory config fields in rest-server section: default-pai-admin-username and default-pai-admin-password, other config fields are optional, includes:

  • server-port: 9186 The port REST server service will listen
  • launcher-type: yarn The launcher type of REST server, should be "yarn" or "k8s". Default is "yarn"
  • jwt-secret: pai-secret The secret key of JSON web token
  • jwt-expire-time The expire time for a signed jwt token.
  • github-owner: Microsoft The marketplace repo owner in GitHub
  • github-repository: pai The marketplace repo name
  • github-path: marketplace The marketpalce path in the repo
  • debugging-reservation-seconds: 604800 The seconds to reserved a job container to debug.

Generated Configuration

After parsing, if you configured the rest-server the model will be like:

rest-server:
    uri: http://rest-server-host:9186/
    server-port: 9186
    launcher-type: yarn
    jwt-secret: pai-secret
    jwt-expire-time: '7d'
    default-pai-admin-username: pai-admin
    default-pai-admin-password: pai-admin-password
    github-owner: Microsoft
    github-repository: pai
    github-path: marketplace
    debugging-reservation-seconds: 604800

Table

Data in Configuration File Data in Cluster Object Model Data in Jinja2 Template Data type
rest-server.uri com["rest-server"]["uri"] cluster_cfg["rest-server"]["uri"] URL
rest-server.server-port com["rest-server"]["server-port"] cluster_cfg["rest-server"]["server-port"] Int
rest-server.launcher-type com["rest-server"]["launcher-type"] cluster_cfg["rest-server"]["launcher-type"] String
rest-server.jwt-secret com["rest-server"]["jwt-secret"] cluster_cfg["rest-server"]["jwt-secret"] String
rest-server.jwt-expire-time com["rest-server"]["jwt-expire-time"] cluster_cfg["rest-server"]["jwt-expire-time"] String
rest-server.default-pai-admin-username com["rest-server"]["default-pai-admin-username"] cluster_cfg["rest-server"]["default-pai-admin-username"] String
rest-server.default-pai-admin-password com["rest-server"]["default-pai-admin-password"] cluster_cfg["rest-server"]["default-pai-admin-password"] String
rest-server.github-owner com["rest-server"]["github-owner"] cluster_cfg["rest-server"]["github-owner"] String
rest-server.github-repository com["rest-server"]["github-repository"] cluster_cfg["rest-server"]["github-repository"] String
rest-server.github-path com["rest-server"]["github-path"] cluster_cfg["rest-server"]["github-path"] String
rest-server.etcd-uris com["rest-server"]["etcd-uris"] cluster_cfg["rest-server"]["etcd-uris"] String
rest-server.debugging-reservation-seconds com["rest-server"]["debugging-reservation-seconds"] cluster_cfg["rest-server"]["debugging-reservation-seconds"] String