ACS Fleet Manager

Dinosaur counter

Build Status

ACS fleet-manager repository for the ACS managed service.

Quickstart

Overview

├── bin                 -- binary output directory  
├── cmd                 -- cmd entry points
├── config              -- various fleet-manager configurations
├── dashboards          -- grafana dashboards
├── docs                -- documentation
├── docker              -- docker images
├── dp-terraform        -- terraforming scripts for data-plane clusters
├── e2e                 -- e2e tests
├── fleetshard          -- source code for fleetshard-synchronizer
├── internal            -- internal source code
├── openapi             -- openapi specification
├── pkg                 -- pkg code
├── scripts             -- development and test scripts
├── secrets             -- secrets which are mounted to the fleet-manager
├── templates           -- fleet-manager openshift deployment templates
└── test                -- test mock servers

Getting started

Prerequisites

Supported cluster types:

  • Local: Minikube, Colima, Rancher Desktop, CRC
  • Remote: Infra OpenShift 4.x, OpenShift CI

Getting started

To run fleet-manager in different ways (i.e. on a test cluster) please refer to running-fleet-manager.md.

# Export the kubeconfig path the central instance should be deployed to
$ export KUBECONFIG=/your/kubeconfig

# Bootstrap the environment
$ make deploy/bootstrap

# Sets up database, starts fleet-manager
$ make deploy/dev

# Start fleetshard-sync
$ OCM_TOKEN=$(ocm token --refresh) AUTH_TYPE=OCM CLUSTER_ID=1234567890abcdef1234567890abcdef ./fleetshard-sync

# To create a central instance
$ ./scripts/create-central.sh

# To interact with the API use
$ ./scripts/fmcurl

# To build and re-deploy the fleet-manager and fleetshard-sync locally run:
$ make deploy/dev-fast

Common make targets

# Install git-hooks, for more information see git-hooks.md [1]
$ make setup/git/hooks

# To generate code and compile binaries run
$ make all

# To only compile fleet-manager and fleetshard-synchronizer run
$ make binary

# Run API docs server
$ make run/docs

# Generate code such as openapi
$ make generate

# Prepare dev environment for deployment
$ make deploy/bootstrap
# Deploy changes to the test cluster [2]
$ make deploy/dev

# Testing related targets
$ make test
$ make test/e2e
$ make test/integration

# Fleet-manager database related make targets
$ make db/teardown
$ make db/setup
$ make db/migrate

Background

This project was started from a fleet-manager template with an example "Dinosaur" application as a managed service. Implementations which reference "Dinosaur" are replaced iteratively.

For a real service written using the same fleet management pattern see the kas-fleet-manager. Original fleet-manager template.

To contact the people that created this template go to zulip.

Additional documentation

Contributing

See the contributing guide for general guidelines on how to contribute back to the template.