No description
Find a file
2023-08-24 08:10:08 +02:00
.buildr fix: include go:build directives in generation task 2023-08-17 17:01:50 +02:00
generated/rpc/v1 feat: add release category 2023-08-24 08:10:08 +02:00
rpc/v1 feat: add release category 2023-08-24 08:10:08 +02:00
.editorconfig feat: include default spec in plugin inventory 2023-08-23 18:58:33 +02:00
.gitignore fix: include go:build directives in generation task 2023-08-17 17:01:50 +02:00
buf.gen.yaml fix: include go:build directives in generation task 2023-08-17 17:01:50 +02:00
buf.work.yaml feat: move gRPC code to extra repo 2023-08-16 17:55:29 +02:00
buf.yaml feat: move gRPC code to extra repo 2023-08-16 17:55:29 +02:00
go.mod feat: include default spec in plugin inventory 2023-08-23 18:58:33 +02:00
go.sum feat: include default spec in plugin inventory 2023-08-23 18:58:33 +02:00
LICENSE Initial commit 2023-08-16 15:51:45 +00:00
README.md feat: move gRPC code to extra repo 2023-08-16 17:55:29 +02:00
renovate.json feat: include default spec in plugin inventory 2023-08-23 18:58:33 +02:00

Remote execution

Currently remote execution only applies to execution of modules in container. Theoretically it could also be used e.g. to execute modules on other machines via SCP/SSH.

Sequence diagram overview

The following sequence diagram illustrates the remote protocol:

sequenceDiagram
    client ->>+ executor: StartTaskRequest
    client ->> client: listen for executor events
    executor ->> executor: Start FS watcher
    executor ->> executor: Unmarshal task and execute
    
    loop stream task output & logs
        executor -->> client: TaskLog
        executor -->> client: TaskOutput
    end

    executor -->>- client: TaskResult - as soon as execution completes

Execution steps for container tasks

The overall execution looks like this:

  1. create container network
  2. create container
  3. copy buildr binary, tools and content into container
    • if input mapping is configured, content is copied as it would be mapped
    • if no input mapping is configured complete repository is copied
  4. start container with buildr as entrypoint (gRPC server)
  5. connect to gRPC server
  6. send StartTaskRequest specifying what to do - although it's called TaskRequest it could be any module
  7. server starts a FS watcher to monitor modified files
  8. buildr CLI listens for logs and output from executed task
  9. as soon as the execution completes, modified files are collected into a .tar.s2 file and error message + location of the archive are sent as result to buildr CLI
  10. CLI copies archive back and extracts modified files to output directory