How to configure bld

You can edit the config.yaml file inside a .bld directory in order to configure both local options and add new target bld servers.

Local configuration

The local section of the configuration has the below options available ability mode.

  • docker_url: The url with which a connection will be established to the docker engine API. This can be either a single url or multiple urls, defined with a name and the ability to set a default.

  • server: The start of the server section with the below options

    • host: The host that the server will be exposed to.
    • port: The port that the server will be exposed to.
    • tls: The start of the tls section with the below options
      • cert_chain: The path to a certificate file.
      • private_key: The path to the private key for the above certificate.
    • pipelines: A path to a directory in which the server will store registered pipelines.
    • auth: The authentication section for the server.
      • method: A text option that for the current release only accepts the value oidc.
      • issuer_url: The issuer url for the authorization provider.
      • redirect_url: The redirect url of the bld server.
      • client_id: The client id configured in the oidc provider for the bld server.
      • client_secret: The client secret for the bld server.
      • scopes: An array of scopes provided when logging in.
      • user_property: The property that a user will be associated with. Accepts the values name or email.
    • logs: A path to a directory where the logs for each server run will be stored.
    • db: The database connection url for postgres, mysql or sqlite.
  • supervisor: The start of the supervisor section

    • host: The host that the supervisor will be exposed to.
    • port: The port that the supervisor will be exposed to.
    • tls: The start of the tls section with the below options
      • cert_chain: The path to a certificate file.
      • private_key: The path to the private key of the above certificate.
    • workers: A number that indicates how many worker processes can the supervisor spawn. This will be the maximum number of active pipeline runs on a server, with all other being queued.
  • editor: The name or path to your editor of choice for editing a pipeline through the bld cli.

  • ssh: The ssh global configuration that pipelines can use to establish an ssh connection.

  • registries new to v0.4.x: A section to define properties about available registries and credentials to access them if they are private.

    • url: The url of the registry.
    • username optional: The username to access the registry.
    • password optional: The password to access the registry.

Remote configuration

The remote section of the config file is an array of servers that can be targeted. The available options are below.

  • server: The name used to target this entry.
  • host: The host address of the server.
  • port: The port of the server.
  • tls: A boolean indicating to use secure protocols when connecting to the server.

Putting it all together

Below is an example configuration with all of the above options

local:
  server:
     host: localhost
     port: 6080
     tls:
        cert_chain: path/to/server_certificate.crt
        private_key: path/to/server_private.key
     auth:
        method: oidc
        issuer_url: https://some_issuer_url
        redirect_url: https://localhost:6080/authRedirect
        client_id: some_client_id
        client_secret: some_client_secret
        scopes: ["scope1", "scope2"]
        user_property: email
     pipelines: .bld/server_pipelines
     logs: .bld/logs
     db: sqlite:///path/to/project/.bld/db/bld-server.db
  supervisor:
     host: localhost
     port: 7080
     tls:
        cert_chain: path/to/supervisor_certificate.crt
        private_key: path/to/supervisor_private.key
     workers: 50
  # Using a single docker url
  # docker_url: unix:///var/run/docker.sock
  # Multiple docker urls
  docker_url:
    unix:
        url: unix:///var/run/docker.sock
        default: true
    tcp: tcp://127.0.0.1:2376
  editor: vim
  ssh:
     test_server_1:
         host: 192.168.122.3
         user: test_user
         userauth:
             type: keys
             public_key: /path/to/public_key
             private_key: /path/to/private_key
     test_server_2:
         host: 192.168.122.4
         user: test_user_2
         userauth:
             type: password
             password: some_password
     test_server_3:
         host: 192.168.122.5
         user: test_user_3
         userauth:
             type: agent
  registries:
    docker_io:
        url: https://docker.io
    ghcr:
        url: https://ghcr.io
        username: some_username
        password: some_password

remote:
- server: local_1
  host: 127.0.0.1
  port: 6080
  tls: true
- server: local_2
  host: 127.0.0.1
  port: 8080