manifest

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: UPL-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupManifests

func CleanupManifests()

CleanupManifests deletes the manifests that were copied to a temp dir

func InitGlobalManifests

func InitGlobalManifests() error

InitGlobalManifests extracts the manifests in the binary and writes them to a temp file. The package level Manifests var is set if this function succeeds. The caller is expected to call CleanupManifests when they are no longer needed

func ResetManifests

func ResetManifests()

Types

type ManifestManager

type ManifestManager struct {
	Log                 vzlog.VerrazzanoLogger
	Manifest            PsrManifests
	ExternalScenarioDir string
}

ManifestManager contains the information needed to manage a Scenario

func NewManager

func NewManager(externalScenarioDir string, helmOverrides ...helm.HelmOverrides) (ManifestManager, error)

NewManager returns a manifest ManifestManager

func (ManifestManager) FindScenarioManifestByID

func (m ManifestManager) FindScenarioManifestByID(ID string) (*ScenarioManifest, error)

FindScenarioManifestByID finds a ScenarioManifest by ID

func (ManifestManager) FindScenarioManifestByName

func (m ManifestManager) FindScenarioManifestByName(name string) (*ScenarioManifest, error)

FindScenarioManifestByName finds a ScenarioManifest by mame

func (ManifestManager) ListScenarioManifests

func (m ManifestManager) ListScenarioManifests() ([]ScenarioManifest, error)

ListScenarioManifests returns the list of ScenarioManifests. Scenario manifests are located in psr/manifests/scenarios. By convention, a scenario directory must have a scenario.yaml file which describes the scenario. It must also have a subdirectory named usecase-overrides containing the override parameters for each use case. The name of the parent directory, for example s1, is irrelevant.

type PsrManifests

type PsrManifests struct {
	RootTmpDir        string
	WorkerChartAbsDir string
	UseCasesAbsDir    string
	ScenarioAbsDir    string
}

PsrManifests contains information related to the manifests, along with the temp directory path.

var Manifests *PsrManifests

type ScenarioManifest

type ScenarioManifest struct {
	// Name is the scenario name
	Name string

	// ID is the scenario ID
	ID string

	// Description is the scenario description
	Description string

	// Usecases are the scenario use cases
	Usecases []Usecase

	// This is the absolute directory that contains scenario.yaml and scenario usecase-overrides.  It is not specified by the user,
	// but built at runtime
	ScenarioUsecaseOverridesAbsDir string
}

ScenarioManifest specifies a PSR scenario manifest which consists of multiple use cases. The manifest represents files on disk, not a runtime scenario.

type Usecase

type Usecase struct {
	// UsecasePath specifies the manifest relative path of the use case, e.g. opensearch/writelogs.yaml
	UsecasePath string

	// OverrideFile is the use case override file in the scenario usecase-overrides directory, e.g. writelogs-fast.yaml
	OverrideFile string

	// Description is a description of the use case in the context of the scenario
	Description string
}

Usecase specifies a PSR usecase that does a single worker task running in a pod

Jump to

Keyboard shortcuts

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