api

package module
v0.0.0-...-4b705a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 0 Imported by: 2

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtoMessage

type ProtoMessage interface {
	UnmarshalVT(dAtA []byte) error
	MarshalVT() (dAtA []byte, err error)
}

Directories

Path Synopsis
generated

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL