worker

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

README

worker

worker - container orchestrator/ worker artifact management/ build executor

from the United States Library of Congress's Prints and Photographs division

about

worker is the workhorse of Concourse. It's responsible for the creation and deletion of the containers in which the pipeline operations (get, check, put, task) are executed.

A worker node registers with the web node(s) and is then used for executing builds and performing resource checks.

The ATC component in the web node(s) decides how to allocate containers to workers that have been registered in the pool, using the configured container-placement-strategy. It also manages the container deletion on the workers via database calls and the Garden API on the workers.

A worker node runs the following 2 GO API's

  • Garden is a generic interface for orchestrating containers remotely on a worker

  • Baggageclaim is a server for managing caches and artifacts on the workers

It can be scaled horizontally in order to scale the system.

More Info

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBeaconRunner

func NewBeaconRunner(
	logger lager.Logger,
	tsaClient *tsa.Client,
	rebalanceInterval time.Duration,
	connectionDrainTimeout time.Duration,
	gardenAddr string,
	baggageclaimAddr string,
) ifrit.Runner

func NewHealthChecker

func NewHealthChecker(logger lager.Logger, baggageclaimAddr, gardenAddr string, checkTimeout time.Duration) healthChecker

func NewVolumeSweeper

func NewVolumeSweeper(
	logger lager.Logger,
	sweepInterval time.Duration,
	tsaClient TSAClient,
	bcClient baggageclaim.Client,
	maxInFlight uint16,
) *volumeSweeper

Types

type Beacon

type Beacon struct {
	Logger lager.Logger

	Client TSAClient

	DrainSignals <-chan os.Signal

	RebalanceInterval      time.Duration
	ConnectionDrainTimeout time.Duration

	LocalGardenNetwork string
	LocalGardenAddr    string

	LocalBaggageclaimNetwork string
	LocalBaggageclaimAddr    string
	// contains filtered or unexported fields
}

func (*Beacon) Drained

func (beacon *Beacon) Drained() bool

func (*Beacon) Run

func (beacon *Beacon) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type ContainerSweeper

type ContainerSweeper struct {
	// contains filtered or unexported fields
}

ContainerSweeper is an ifrit.Runner that periodically reports and garbage-collects a worker's containers

func NewContainerSweeper

func NewContainerSweeper(
	logger lager.Logger,
	sweepInterval time.Duration,
	tsaClient TSAClient,
	gardenClient gclient.Client,
	maxInFlight uint16,
) *ContainerSweeper

func (*ContainerSweeper) Run

func (sweeper *ContainerSweeper) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type TSAClient

type TSAClient interface {
	Register(context.Context, tsa.RegisterOptions) error

	Land(context.Context) error
	Retire(context.Context) error
	Delete(context.Context) error

	ReportContainers(context.Context, []string) error
	ContainersToDestroy(context.Context) ([]string, error)

	ReportVolumes(context.Context, []string) error
	VolumesToDestroy(context.Context) ([]string, error)
}

type TSAConfig

type TSAConfig struct {
	Hosts            []string            `long:"host" default:"127.0.0.1:2222" description:"TSA host to forward the worker through. Can be specified multiple times."`
	PublicKey        flag.AuthorizedKeys `long:"public-key" description:"File containing a public key to expect from the TSA."`
	WorkerPrivateKey *flag.PrivateKey    `` /* 126-byte string literal not displayed */
}

func (TSAConfig) Client

func (config TSAConfig) Client(worker atc.Worker) *tsa.Client

Directories

Path Synopsis
Package backend provides the implementation of a Garden server backed by containerd.
Package backend provides the implementation of a Garden server backed by containerd.
iptables/iptablesfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
libcontainerd/libcontainerdfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
runtimefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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