fleetdb

command module
v1.20.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

FleetDB

FleetDB is responsible for providing a store for physical server and component information.

Quickstart to running locally

Running FleetDB

To run the service locally you can bring it up with docker-compose. This will run with a localy built fleetdb.

make dev-env
Adding/Changing database schema

Add a new migration file under db/migrations/ with the schema change

make test-database
make gen-db-models
Run individual integration tests

Export the DB URI required for integration tests.

export FLEETDB_PGDB_URI="host=localhost port=5432 user=root sslmode=disable dbname=fleetdb_test"

Run test.

go test -timeout 30s -tags testtools -run ^TestIntegrationServerListComponents$ github.com/metal-automata/fleetdb/pkg/api/v1 -v
Dump requests and responses in the client for debugging

Setting DEBUG_CLIENT to a value will cause the client to write requests and responses to stdout.

export DEBUG_CLIENT=1 /usr/local/bin/go test -timeout 10s -tags testtools -run ^TestIntegrationServerComponentFirmwareUpdate$ github.com/metal-automata/fleetdb/pkg/api/v1  -v

Documentation

Overview

package main is the entry point

Directories

Path Synopsis
Package cmd provides our CLI interface for the hollow binary
Package cmd provides our CLI interface for the hollow binary
Package db provides an embedded filesystem containing all the database migrations
Package db provides an embedded filesystem containing all the database migrations
internal
config
Package config provides a struct to store the applications config
Package config provides a struct to store the applications config
dbtools
Package dbtools provides tools to help with interacting with the database, including all of our utilities for database integration testing
Package dbtools provides tools to help with interacting with the database, including all of our utilities for database integration testing
httpsrv
Package httpsrv provides the HTTP server to handle all requests for the fleetdb.
Package httpsrv provides the HTTP server to handle all requests for the fleetdb.
pkg
api/v1
Package fleetdbapi provides the v1 api for the fleetdb service
Package fleetdbapi provides the v1 api for the fleetdb service
nolint

Jump to

Keyboard shortcuts

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