server

package
v0.0.0-...-8d377ce Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

README

BMaaS Server

Background

This server provides an interface to the BMaaS database/state over a gRPC API. Most components of the BMaaS system talk to the database directly whenever possible. Everything else communicates through this server.

Currently this is:

  1. Agents running on machines, as they should only be allowed to access/update information about the machine they're running on, and they're generally considered untrusted since they run on end-user available machines.

In the future this server will likely also take care of:

  1. A debug web API for developers/administrators to inspect database/BMDB state.
  2. Periodic batch jobs across the entire BMDB, like consistency checks.
  3. Exporting BMDB state into monitoring systems.
  4. Coordinating access to the BMDB systems if the current direct-access-to-database architecture stops scaling.

Running

bazel run //cloud/bmaas/server/cmd -- -srv_dev_certs -bmdb_eat_my_data

Although that's not very useful in itself currently. Instead, most functionality is currently exercised through automated tests.

TODO(q3k): document complete BMaaS dev deployment (multi-component, single BMDB).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Component component.ComponentConfig
	BMDB      bmdb.BMDB
	Webug     webug.Config

	// PublicListenAddress is the address at which the 'public' (agent-facing) gRPC
	// server listener will run.
	PublicListenAddress string
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags()

type Server

type Server struct {
	Config Config

	// ListenGRPC will contain the address at which the internal gRPC server is
	// listening after .Start() has been called. This can differ from the configured
	// value if the configuration requests any port (via :0).
	ListenGRPC string
	// ListenPublic will contain the address at which the 'public' (agent-facing)
	// gRPC server is lsitening after .Start() has been called.
	ListenPublic string
	// contains filtered or unexported fields
}

func (*Server) Start

func (s *Server) Start(ctx context.Context)

Start the BMaaS Server in background goroutines. This should only be called once. The process will exit with debug logs if starting the server failed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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