[Notes] [Git][BuildGrid/buildgrid][finn/80-remote-parser] 2 commits: Added new config files and a missing `__init__.py`



Title: GitLab

finn pushed to branch finn/80-remote-parser at BuildGrid / buildgrid

Commits:

5 changed files:

Changes:

  • buildgrid/_app/commands/cmd_server.py
    ... ... @@ -53,10 +53,16 @@ def start(context, config):
    53 53
         insecure_mode = server_settings['insecure-mode']
    
    54 54
     
    
    55 55
         credentials = None
    
    56
    +    credentials_settings = server_settings.get('credentials')
    
    56 57
         if not insecure_mode:
    
    57
    -        server_key = server_settings['tls-server-key']
    
    58
    -        server_cert = server_settings['tls-server-cert']
    
    59
    -        client_certs = server_settings['tls-client-certs']
    
    58
    +        if not credentials_settings:
    
    59
    +            click.echo("ERROR: no TLS keys were specified and no defaults could be found.\n" +
    
    60
    +                       "Set `insecure-mode: false` in order to deactivate TLS encryption.\n", err=True)
    
    61
    +            sys.exit(-1)
    
    62
    +
    
    63
    +        server_key = credentials_settings['tls-server-key']
    
    64
    +        server_cert = credentials_settings['tls-server-cert']
    
    65
    +        client_certs = credentials_settings['tls-client-certs']
    
    60 66
             credentials = context.load_server_credentials(server_key, server_cert, client_certs)
    
    61 67
     
    
    62 68
             if not credentials:
    

  • buildgrid/_app/settings/__init__.py

  • buildgrid/_app/settings/cas.yml
    1
    +server:
    
    2
    +  port: 50052
    
    3
    +  insecure-mode: true
    
    4
    +  tls-server-key: null
    
    5
    +  tls-server-cert: null
    
    6
    +  tls-client-certs: null
    
    7
    +
    
    8
    +description: |
    
    9
    +  Just a CAS.
    
    10
    +
    
    11
    +instances:
    
    12
    +  - name: main
    
    13
    +    description: |
    
    14
    +      The main server
    
    15
    +
    
    16
    +    storages:
    
    17
    +        - !disk-storage &main-storage
    
    18
    +          path: ~/cas/
    
    19
    +
    
    20
    +    services:
    
    21
    +      - !cas
    
    22
    +        storage: *main-storage

  • buildgrid/_app/settings/default.yml
    1 1
     server:
    
    2 2
       port: 50051
    
    3
    +  insecure-mode: true
    
    3 4
       tls-server-key: null
    
    4 5
       tls-server-cert: null
    
    5 6
       tls-client-certs: null
    
    6
    -  insecure-mode: true
    
    7 7
     
    
    8 8
     description: |
    
    9 9
       A single default instance
    

  • buildgrid/_app/settings/remote-storage.yml
    1
    +server:
    
    2
    +  port: 50051
    
    3
    +  insecure-mode: true
    
    4
    +  tls-server-key: null
    
    5
    +  tls-server-cert: null
    
    6
    +  tls-client-certs: null
    
    7
    +
    
    8
    +
    
    9
    +description: |
    
    10
    +  A single default instance with remote storage.
    
    11
    +
    
    12
    +instances:
    
    13
    +  - name: main
    
    14
    +    description: |
    
    15
    +      The main server
    
    16
    +
    
    17
    +    storages:
    
    18
    +        - !remote-storage &main-storage
    
    19
    +          url: "http://localhost:50052"
    
    20
    +          credentials:
    
    21
    +            tls-client-key: null
    
    22
    +            tls-client-cert: null
    
    23
    +            tls-server-cert: null
    
    24
    +
    
    25
    +    services:
    
    26
    +      - !action-cache &main-action
    
    27
    +        storage: *main-storage
    
    28
    +        max_cached_refs: 256
    
    29
    +        allow_updates: true
    
    30
    +
    
    31
    +      - !execution
    
    32
    +        storage: *main-storage
    
    33
    +        action_cache: *main-action
    
    34
    +
    
    35
    +      - !cas
    
    36
    +        storage: *main-storage
    
    37
    +
    
    38
    +      - !bytestream
    
    39
    +        storage: *main-storage



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]