installer

package
v0.0.0-...-3f1f3ec Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version tag for the latest manifests
	VersionMaster = "master"
	// Version tag for Rook v1.0
	Version1_0 = "v1.0.6"
	// test suite names
	CassandraTestSuite   = "cassandra"
	CephTestSuite        = "ceph"
	CockroachDBTestSuite = "cockroachdb"
	EdgeFSTestSuite      = "edgefs"
	NFSTestSuite         = "nfs"
	YugabyteDBTestSuite  = "yugabytedb"
)
View Source
const (
	CRDFullyQualifiedName         = "ybclusters.yugabytedb.rook.io"
	CRDFullyQualifiedNameSingular = "ybcluster.yugabytedb.rook.io"
)

Variables

View Source
var (
	MimicVersion    = cephv1.CephVersionSpec{Image: mimicTestImage}
	NautilusVersion = cephv1.CephVersionSpec{Image: nautilusTestImage}
)

Functions

func InstallHostPathProvisioner

func InstallHostPathProvisioner(k8shelper *utils.K8sHelper) error

************************************************************************************************ HostPath provisioner functions ************************************************************************************************

func IsAdditionalDeviceAvailableOnCluster

func IsAdditionalDeviceAvailableOnCluster() bool

func SkipTestSuite

func SkipTestSuite(name string) bool

func SystemNamespace

func SystemNamespace(namespace string) string

func UninstallHostPathProvisioner

func UninstallHostPathProvisioner(k8shelper *utils.K8sHelper) error

Types

type CassandraInstaller

type CassandraInstaller struct {
	T func() *testing.T
	// contains filtered or unexported fields
}

func NewCassandraInstaller

func NewCassandraInstaller(k8sHelper *utils.K8sHelper, t func() *testing.T) *CassandraInstaller

func (*CassandraInstaller) CreateCassandraCluster

func (ci *CassandraInstaller) CreateCassandraCluster(namespace string, count int, mode cassandrav1alpha1.ClusterMode) error

func (*CassandraInstaller) CreateCassandraOperator

func (ci *CassandraInstaller) CreateCassandraOperator(namespace string) error

func (*CassandraInstaller) DeleteCassandraCluster

func (ci *CassandraInstaller) DeleteCassandraCluster(namespace string)

func (*CassandraInstaller) GatherAllCassandraLogs

func (ci *CassandraInstaller) GatherAllCassandraLogs(systemNamespace, namespace, testName string)

func (*CassandraInstaller) InstallCassandra

func (ci *CassandraInstaller) InstallCassandra(systemNamespace, namespace string, count int, mode cassandrav1alpha1.ClusterMode) error

func (*CassandraInstaller) UninstallCassandra

func (ci *CassandraInstaller) UninstallCassandra(systemNamespace string, namespace string)

type CassandraManifests

type CassandraManifests struct{}

func (*CassandraManifests) GetCassandraCRDs

func (i *CassandraManifests) GetCassandraCRDs() string

func (*CassandraManifests) GetCassandraCluster

func (i *CassandraManifests) GetCassandraCluster(namespace string, count int, mode cassandrav1alpha1.ClusterMode) string

func (*CassandraManifests) GetCassandraOperator

func (i *CassandraManifests) GetCassandraOperator(namespace string) string

type CephInstaller

type CephInstaller struct {
	Manifests CephManifests

	CephVersion cephv1.CephVersionSpec
	T           func() *testing.T
	// contains filtered or unexported fields
}

CephInstaller wraps installing and uninstalling rook on a platform

func NewCephInstaller

func NewCephInstaller(t func() *testing.T, clientset *kubernetes.Clientset, useHelm bool, rookVersion string, cephVersion cephv1.CephVersionSpec) *CephInstaller

NewCephInstaller creates new instance of CephInstaller

func (*CephInstaller) CollectOperatorLog

func (h *CephInstaller) CollectOperatorLog(suiteName, testName, namespace string)

func (*CephInstaller) CreateCephCRDs

func (h *CephInstaller) CreateCephCRDs() error

func (*CephInstaller) CreateCephOperator

func (h *CephInstaller) CreateCephOperator(namespace string) (err error)

CreateCephOperator creates rook-operator via kubectl

func (*CephInstaller) CreateK8sRookClusterWithHostPathAndDevices

func (h *CephInstaller) CreateK8sRookClusterWithHostPathAndDevices(namespace, systemNamespace, storeType string,
	useAllDevices bool, mon cephv1.MonSpec, startWithAllNodes bool, rbdMirrorWorkers int, cephVersion cephv1.CephVersionSpec) error

CreateK8sRookClusterWithHostPathAndDevices creates rook cluster via kubectl

func (*CephInstaller) CreateK8sRookOperatorViaHelm

func (h *CephInstaller) CreateK8sRookOperatorViaHelm(namespace, chartSettings string) error

CreateK8sRookOperatorViaHelm creates rook operator via Helm chart named local/rook present in local repo

func (*CephInstaller) CreateK8sRookToolbox

func (h *CephInstaller) CreateK8sRookToolbox(namespace string) (err error)

CreateK8sRookToolbox creates rook-ceph-tools via kubectl

func (*CephInstaller) GatherAllRookLogs

func (h *CephInstaller) GatherAllRookLogs(testName string, namespaces ...string)

func (*CephInstaller) GetDiskWipeJob

func (h *CephInstaller) GetDiskWipeJob(nodeName, jobName, namespace string) string

GetDiskWipeJob returns a YAML manifest string for a job which will wipe clean the extra (non-boot) disks on a node, allowing Ceph to use the disk(s) during its testing.

func (*CephInstaller) GetNodeHostnames

func (h *CephInstaller) GetNodeHostnames() ([]string, error)

GetNodeHostnames returns the list of nodes in the k8s cluster

func (*CephInstaller) InstallRookOnK8sWithHostPathAndDevices

func (h *CephInstaller) InstallRookOnK8sWithHostPathAndDevices(namespace, storeType string,
	useDevices bool, mon cephv1.MonSpec, startWithAllNodes bool, rbdMirrorWorkers int) (bool, error)

InstallRookOnK8sWithHostPathAndDevices installs rook on k8s

func (*CephInstaller) UninstallRook

func (h *CephInstaller) UninstallRook(namespace string, gatherLogs bool)

UninstallRook uninstalls rook from k8s

func (*CephInstaller) UninstallRookFromMultipleNS

func (h *CephInstaller) UninstallRookFromMultipleNS(gatherLogs bool, systemNamespace string, namespaces ...string)

UninstallRookFromMultipleNS uninstalls rook from multiple namespaces in k8s

func (*CephInstaller) WipeClusterDisks

func (h *CephInstaller) WipeClusterDisks(namespace string) error

WipeClusterDisks runs a disk wipe job on all nodes in the k8s cluster.

type CephManifests

type CephManifests interface {
	GetRookCRDs() string
	GetRookOperator(namespace string) string
	GetClusterRoles(namespace, systemNamespace string) string
	GetRookCluster(settings *ClusterSettings) string
	GetRookToolBox(namespace string) string
	GetCleanupPod(node, removalDir string) string
	GetBlockPoolDef(poolName string, namespace string, replicaSize string) string
	GetBlockStorageClassDef(poolName string, storageClassName string, reclaimPolicy string, namespace string, varClusterName bool) string
	GetBlockPvcDef(claimName string, storageClassName string, accessModes string, size string) string
	GetBlockPoolStorageClassAndPvcDef(namespace string, poolName string, storageClassName string, reclaimPolicy string, blockName string, accessMode string) string
	GetBlockPoolStorageClass(namespace string, poolName string, storageClassName string, reclaimPolicy string) string
	GetFilesystem(namepace, name string, activeCount int) string
	GetNFS(namepace, name, pool string, daemonCount int) string
	GetObjectStore(namespace, name string, replicaCount, port int) string
	GetObjectStoreUser(namespace, name string, displayName string, store string) string
	GetBucketStorageClass(namespace string, storeName string, storageClassName string, reclaimPolicy string, region string) string
	GetObc(obcName string, storageClassName string, bucketName string, createBucket bool) string
	GetClient(namespace string, name string, caps map[string]string) string
}

func NewCephManifests

func NewCephManifests(version string) CephManifests

NewCephManifests gets the manifest type depending on the Rook version desired

type CephManifestsMaster

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

CephManifestsMaster wraps rook yaml definitions

func (*CephManifestsMaster) GetBlockPoolDef

func (m *CephManifestsMaster) GetBlockPoolDef(poolName string, namespace string, replicaSize string) string

func (*CephManifestsMaster) GetBlockPoolStorageClass

func (m *CephManifestsMaster) GetBlockPoolStorageClass(namespace string, poolName string, storageClassName string, reclaimPolicy string) string

func (*CephManifestsMaster) GetBlockPoolStorageClassAndPvcDef

func (m *CephManifestsMaster) GetBlockPoolStorageClassAndPvcDef(namespace string, poolName string, storageClassName string, reclaimPolicy string, blockName string, accessMode string) string

func (*CephManifestsMaster) GetBlockPvcDef

func (m *CephManifestsMaster) GetBlockPvcDef(claimName, storageClassName, accessModes, size string) string

func (*CephManifestsMaster) GetBlockStorageClassDef

func (m *CephManifestsMaster) GetBlockStorageClassDef(poolName string, storageClassName string, reclaimPolicy string, namespace string, varClusterName bool) string

func (*CephManifestsMaster) GetBucketStorageClass

func (m *CephManifestsMaster) GetBucketStorageClass(storeNameSpace string, storeName string, storageClassName string, reclaimPolicy string, region string) string

GetBucketStorageClass returns the manifest to create object bucket

func (*CephManifestsMaster) GetCleanupPod

func (m *CephManifestsMaster) GetCleanupPod(node, removalDir string) string

GetCleanupPod gets a cleanup Pod manifest

func (*CephManifestsMaster) GetClient

func (m *CephManifestsMaster) GetClient(namespace string, claimName string, caps map[string]string) string

GetClient returns the manifest to create client CRD

func (*CephManifestsMaster) GetClusterRoles

func (m *CephManifestsMaster) GetClusterRoles(namespace, systemNamespace string) string

GetClusterRoles returns rook-cluster manifest

func (*CephManifestsMaster) GetFilesystem

func (m *CephManifestsMaster) GetFilesystem(namespace, name string, activeCount int) string

GetFilesystem returns the manifest to create a Rook filesystem resource with the given config.

func (*CephManifestsMaster) GetNFS

func (m *CephManifestsMaster) GetNFS(namespace, name, pool string, count int) string

GetFilesystem returns the manifest to create a Rook Ceph NFS resource with the given config.

func (*CephManifestsMaster) GetObc

func (m *CephManifestsMaster) GetObc(claimName string, storageClassName string, objectBucketName string, varBucketName bool) string

GetObc returns the manifest to create object bucket claim

func (*CephManifestsMaster) GetObjectStore

func (m *CephManifestsMaster) GetObjectStore(namespace, name string, replicaCount, port int) string

func (*CephManifestsMaster) GetObjectStoreUser

func (m *CephManifestsMaster) GetObjectStoreUser(namespace, name string, displayName string, store string) string

func (*CephManifestsMaster) GetRookCRDs

func (m *CephManifestsMaster) GetRookCRDs() string

func (*CephManifestsMaster) GetRookCluster

func (m *CephManifestsMaster) GetRookCluster(settings *ClusterSettings) string

GetRookCluster returns rook-cluster manifest

func (*CephManifestsMaster) GetRookOperator

func (m *CephManifestsMaster) GetRookOperator(namespace string) string

GetRookOperator returns rook Operator manifest

func (*CephManifestsMaster) GetRookToolBox

func (m *CephManifestsMaster) GetRookToolBox(namespace string) string

GetRookToolBox returns rook-toolbox manifest

type CephManifestsV1_0

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

CephManifestsV1_0 wraps rook yaml definitions

func (*CephManifestsV1_0) GetBlockPoolDef

func (m *CephManifestsV1_0) GetBlockPoolDef(poolName string, namespace string, replicaSize string) string

func (*CephManifestsV1_0) GetBlockPoolStorageClass

func (m *CephManifestsV1_0) GetBlockPoolStorageClass(namespace string, poolName string, storageClassName string, reclaimPolicy string) string

func (*CephManifestsV1_0) GetBlockPoolStorageClassAndPvcDef

func (m *CephManifestsV1_0) GetBlockPoolStorageClassAndPvcDef(namespace string, poolName string, storageClassName string, reclaimPolicy string, blockName string, accessMode string) string

func (*CephManifestsV1_0) GetBlockPvcDef

func (m *CephManifestsV1_0) GetBlockPvcDef(claimName, storageClassName, accessModes, size string) string

func (*CephManifestsV1_0) GetBlockStorageClassDef

func (m *CephManifestsV1_0) GetBlockStorageClassDef(poolName string, storageClassName string, reclaimPolicy string, namespace string, varClusterName bool) string

func (*CephManifestsV1_0) GetBucketStorageClass

func (m *CephManifestsV1_0) GetBucketStorageClass(namespace string, storeName string, storageClassName string, reclaimPolicy string, region string) string

func (*CephManifestsV1_0) GetCleanupPod

func (m *CephManifestsV1_0) GetCleanupPod(node, removalDir string) string

GetCleanupPod gets a cleanup Pod manifest

func (*CephManifestsV1_0) GetClient

func (m *CephManifestsV1_0) GetClient(claimName string, namespace string, caps map[string]string) string

func (*CephManifestsV1_0) GetClusterRoles

func (m *CephManifestsV1_0) GetClusterRoles(namespace, systemNamespace string) string

GetClusterRoles returns rook-cluster manifest

func (*CephManifestsV1_0) GetFilesystem

func (m *CephManifestsV1_0) GetFilesystem(namespace, name string, activeCount int) string

GetFilesystem returns the manifest to create a Rook filesystem resource with the given config.

func (*CephManifestsV1_0) GetNFS

func (m *CephManifestsV1_0) GetNFS(namespace, name, pool string, count int) string

GetFilesystem returns the manifest to create a Rook Ceph NFS resource with the given config.

func (*CephManifestsV1_0) GetObc

func (m *CephManifestsV1_0) GetObc(claimName string, storageClassName string, objectBucketName string, varBucketName bool) string

func (*CephManifestsV1_0) GetObjectStore

func (m *CephManifestsV1_0) GetObjectStore(namespace, name string, replicaCount, port int) string

func (*CephManifestsV1_0) GetObjectStoreUser

func (m *CephManifestsV1_0) GetObjectStoreUser(namespace, name string, displayName string, store string) string

func (*CephManifestsV1_0) GetRookCRDs

func (m *CephManifestsV1_0) GetRookCRDs() string

func (*CephManifestsV1_0) GetRookCluster

func (m *CephManifestsV1_0) GetRookCluster(settings *ClusterSettings) string

GetRookCluster returns rook-cluster manifest

func (*CephManifestsV1_0) GetRookOperator

func (m *CephManifestsV1_0) GetRookOperator(namespace string) string

GetRookOperator returns rook Operator manifest

func (*CephManifestsV1_0) GetRookToolBox

func (m *CephManifestsV1_0) GetRookToolBox(namespace string) string

GetRookToolBox returns rook-toolbox manifest

type ClusterSettings

type ClusterSettings struct {
	Namespace        string
	StoreType        string
	DataDirHostPath  string
	UseAllDevices    bool
	Mons             int
	RBDMirrorWorkers int
	CephVersion      cephv1.CephVersionSpec
}

type CockroachDBInstaller

type CockroachDBInstaller struct {
	T func() *testing.T
	// contains filtered or unexported fields
}

func NewCockroachDBInstaller

func NewCockroachDBInstaller(k8shelper *utils.K8sHelper, t func() *testing.T) *CockroachDBInstaller

func (*CockroachDBInstaller) CreateCockroachDBCluster

func (h *CockroachDBInstaller) CreateCockroachDBCluster(namespace string, count int) error

func (*CockroachDBInstaller) CreateCockroachDBOperator

func (h *CockroachDBInstaller) CreateCockroachDBOperator(namespace string) error

func (*CockroachDBInstaller) GatherAllCockroachDBLogs

func (h *CockroachDBInstaller) GatherAllCockroachDBLogs(systemNamespace, namespace, testName string)

func (*CockroachDBInstaller) InstallCockroachDB

func (h *CockroachDBInstaller) InstallCockroachDB(systemNamespace, namespace string, count int) error

func (*CockroachDBInstaller) UninstallCockroachDB

func (h *CockroachDBInstaller) UninstallCockroachDB(systemNamespace, namespace string)

type CockroachDBManifests

type CockroachDBManifests struct {
}

CockroachDBManifests holds the funcs which return the CockroachDB manifests

func (*CockroachDBManifests) GetCockroachDBCRDs

func (i *CockroachDBManifests) GetCockroachDBCRDs() string

GetCockroachDBCRDs return the CockroachDB Cluster CRD

func (*CockroachDBManifests) GetCockroachDBCluster

func (i *CockroachDBManifests) GetCockroachDBCluster(namespace string, count int) string

GetCockroachDBCluster return a CockroacDB Cluster object

func (*CockroachDBManifests) GetCockroachDBOperator

func (i *CockroachDBManifests) GetCockroachDBOperator(namespace string) string

GetCockroachDBOperator return the CockroachDB operator manifest

type EdgefsInstaller

type EdgefsInstaller struct {
	T func() *testing.T
	// contains filtered or unexported fields
}

func NewEdgefsInstaller

func NewEdgefsInstaller(k8shelper *utils.K8sHelper, t func() *testing.T) *EdgefsInstaller

func (*EdgefsInstaller) CreateEdgefsCluster

func (h *EdgefsInstaller) CreateEdgefsCluster(namespace string) error

func (*EdgefsInstaller) CreateEdgefsOperator

func (h *EdgefsInstaller) CreateEdgefsOperator(systemNamespace string) error

func (*EdgefsInstaller) GatherAllEdgefsLogs

func (h *EdgefsInstaller) GatherAllEdgefsLogs(systemNamespace, namespace, testName string)

func (*EdgefsInstaller) InstallEdgefs

func (h *EdgefsInstaller) InstallEdgefs(systemNamespace, namespace string) error

func (*EdgefsInstaller) UninstallEdgefs

func (h *EdgefsInstaller) UninstallEdgefs(systemNamespace, namespace string)

type EdgefsManifests

type EdgefsManifests struct{}

func (*EdgefsManifests) GetEdgefsCRDs

func (i *EdgefsManifests) GetEdgefsCRDs() string

func (*EdgefsManifests) GetEdgefsCluster

func (i *EdgefsManifests) GetEdgefsCluster(namespace string) string

func (*EdgefsManifests) GetEdgefsOperator

func (i *EdgefsManifests) GetEdgefsOperator(namespace string) string

type EnvironmentManifest

type EnvironmentManifest struct {
	HostType           string
	Helm               string
	RookImageName      string
	ToolboxImageName   string
	BaseTestDir        string
	SkipInstallRook    bool
	LoadVolumeNumber   int
	LoadConcurrentRuns int
	LoadTime           int
	LoadSize           string
	EnableChaos        bool
	Logs               string
}

EnvironmentManifest contains information about system under test

type NFSInstaller

type NFSInstaller struct {
	T func() *testing.T
	// contains filtered or unexported fields
}

func NewNFSInstaller

func NewNFSInstaller(k8shelper *utils.K8sHelper, t func() *testing.T) *NFSInstaller

func (*NFSInstaller) CreateNFSServer

func (h *NFSInstaller) CreateNFSServer(namespace string, count int, storageClassName string) error

CreateNFSServer creates the NFS Server CRD instance

func (*NFSInstaller) CreateNFSServerOperator

func (h *NFSInstaller) CreateNFSServerOperator(namespace string) error

CreateNFSServerOperator creates nfs server in the provided namespace

func (*NFSInstaller) CreateNFSServerVolume

func (h *NFSInstaller) CreateNFSServerVolume(namespace string) error

CreateNFSServerVolume creates NFS export PV and PVC

func (*NFSInstaller) GatherAllNFSServerLogs

func (h *NFSInstaller) GatherAllNFSServerLogs(systemNamespace, namespace, testName string)

GatherAllNFSServerLogs gathers all NFS Server logs

func (*NFSInstaller) InstallNFSServer

func (h *NFSInstaller) InstallNFSServer(systemNamespace, namespace string, count int) error

InstallNFSServer installs NFS operator, NFS CRD instance and NFS volume

func (*NFSInstaller) UninstallNFSServer

func (h *NFSInstaller) UninstallNFSServer(systemNamespace, namespace string)

UninstallNFSServer uninstalls the NFS Server from the given namespace

type NFSManifests

type NFSManifests struct {
}

func (*NFSManifests) GetNFSServer

func (i *NFSManifests) GetNFSServer(namespace string, count int, storageClassName string) string

GetNFSServer returns NFSServer CRD instance definition

func (*NFSManifests) GetNFSServerCRDs

func (i *NFSManifests) GetNFSServerCRDs() string

GetNFSServerCRDs returns NFSServer CRD definition

func (*NFSManifests) GetNFSServerOperator

func (i *NFSManifests) GetNFSServerOperator(namespace string) string

GetNFSServerOperator returns the NFSServer operator definition

func (*NFSManifests) GetNFSServerPV

func (i *NFSManifests) GetNFSServerPV(namespace string, clusterIP string) string

GetNFSServerPV returns NFSServer PV definition

func (*NFSManifests) GetNFSServerPVC

func (i *NFSManifests) GetNFSServerPVC(namespace string) string

GetNFSServerPVC returns NFSServer PVC definition

type TestSuite

type TestSuite interface {
	Setup()
	Teardown()
}

type YugabyteDBInstaller

type YugabyteDBInstaller struct {
	T func() *testing.T
	// contains filtered or unexported fields
}

func NewYugabyteDBInstaller

func NewYugabyteDBInstaller(t func() *testing.T, k8shelper *utils.K8sHelper) *YugabyteDBInstaller

func (*YugabyteDBInstaller) CreateOperator

func (y *YugabyteDBInstaller) CreateOperator(SystemNamespace string) error

func (*YugabyteDBInstaller) CreateYugabyteDBCluster

func (y *YugabyteDBInstaller) CreateYugabyteDBCluster(namespace string, replicaCount int) error

func (*YugabyteDBInstaller) GatherAllLogs

func (y *YugabyteDBInstaller) GatherAllLogs(systemNS, namespace, testName string)

func (*YugabyteDBInstaller) InstallYugabyteDB

func (y *YugabyteDBInstaller) InstallYugabyteDB(systemNS, ns string, count int) error

func (*YugabyteDBInstaller) RemoveAllYugabyteDBResources

func (y *YugabyteDBInstaller) RemoveAllYugabyteDBResources(systemNS, namespace string) error

type YugabyteDBManifests

type YugabyteDBManifests struct {
}

func (*YugabyteDBManifests) GetYugabyteDBCRDSpecs

func (_ *YugabyteDBManifests) GetYugabyteDBCRDSpecs() string

func (*YugabyteDBManifests) GetYugabyteDBClusterSpecs

func (_ *YugabyteDBManifests) GetYugabyteDBClusterSpecs(namespace string, replicaCount int) string

func (*YugabyteDBManifests) GetYugabyteDBOperatorSpecs

func (_ *YugabyteDBManifests) GetYugabyteDBOperatorSpecs(namespace string) string

Jump to

Keyboard shortcuts

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