mage

package
v0.0.0-...-0d26408 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2025 Intel Corporation

SPDX-License-Identifier: Apache-2.0

SPDX-FileCopyrightText: 2025 Intel Corporation

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	AWSRegion                 = "us-west-2"
	InternalRegistryRepoURL   = "080137407410.dkr.ecr.us-west-2.amazonaws.com"
	PublicRegistryRepoURL     = "registry-rs.edgeorchestration.intel.com"
	RepositoryName            = "edge-orch"
	RegistryRepoSubProj       = "common"
	InternalContainerRegistry = InternalRegistryRepoURL + "/" + RepositoryName + "/" + RegistryRepoSubProj
	PublicContainerRegistry   = PublicRegistryRepoURL + "/" + RepositoryName + "/" + RegistryRepoSubProj
	InternalChartRegistry     = InternalRegistryRepoURL + "/" + RepositoryName + "/" + RegistryRepoSubProj + "/charts" //nolint: lll
	InternalFilesRegistry     = InternalRegistryRepoURL + "/" + RepositoryName + "/" + RegistryRepoSubProj + "/files"  //nolint: lll
	PublicFilesRegistry       = PublicRegistryRepoURL + "/" + RepositoryName + "/" + RegistryRepoSubProj + "/files"    //nolint: lll
)
View Source
const (
	TestOrg        = "e2eTestOrg"
	TestProject    = "e2eTestProj"
	TestUser       = "e2eTestUser"
	TenancyOrg     = "tenancyOrg"
	TenancyProject = "tenancyProject"
)
View Source
const (
	KeycloakRealm = "master"
)

Variables

View Source
var EMFRepos = []string{
	"https://github.com/open-edge-platform/edge-manageability-framework",
}

Functions

func AsdfPlugins

func AsdfPlugins() error

Install ASDF plugins.

func Clean

func Clean(ctx context.Context) error

Cleans up the local environment by removing all generated files and directories 🧹

func CreateDefaultKeyCloakUser

func CreateDefaultKeyCloakUser(ctx context.Context, client *gocloak.GoCloak, token *gocloak.JWT, user *gocloak.User, orgName string) (string, error)

func GetApiToken

func GetApiToken(client *http.Client, username string, password string) (*string, error)

func GetBranchName

func GetBranchName() (string, error)

func GetClient

func GetClient() (*http.Client, error)

func GetDebVersion

func GetDebVersion() (string, error)

func GetDefaultOrchPassword

func GetDefaultOrchPassword() (string, error)

func GetKeycloakSecret

func GetKeycloakSecret() (string, error)

func GetProjectId

func GetProjectId(ctx context.Context, orgName, projectName string) (string, error)

func GetRepoVersion

func GetRepoVersion() (string, error)

func GetRoleFromKeycloak

func GetRoleFromKeycloak(ctx context.Context, cli *http.Client, token, roleName string) (string, error)

func GetUserID

func GetUserID(cli *http.Client, username, token string) (string, error)

func KeycloakLogin

func KeycloakLogin(ctx context.Context) (*gocloak.GoCloak, *gocloak.JWT, error)

func LookupOrchestratorDomain

func LookupOrchestratorDomain() (string, error)

LookupOrchestratorDomain returns the domain for the orchestrator By default it will look for the domain in the configmap orchestrator-domain

func LookupOrchestratorIP

func LookupOrchestratorIP() (string, error)

LookupOrchestratorIP returns the ip for the orchestrator

func ManageRoles

func ManageRoles(cli *http.Client, token, action, username, orgUUID, projUUID string) error

ManageRoles Assigns roles to a user. Requires an admin token to make the changes in Keycloak. Deprecated: assign Groups instead of roles, see tenantUtils.addUserToGroups

func ManageTenancyUserAndRoles

func ManageTenancyUserAndRoles(ctx context.Context, cli *http.Client, orgId, projId, action, tenancyUser string, removeUser bool) error

func OrchPassword

func OrchPassword() error

Prints the default Orchestrator password.

func RuntimeProjUid deprecated

func RuntimeProjUid(projName string) (string, error)

Deprecated: use tenantUtils.GetProjectID

func TryToCreateECRRepository

func TryToCreateECRRepository(ctx context.Context, repositoryName string) error

func UploadFiles

func UploadFiles(paths []string, domain string, projectName string, edgeInfraUser string, orchPass string) error

Types

type App

type App mg.Namespace

Namespace contains App targets.

func (App) Upload

func (a App) Upload() error

Upload sample applications to Catalog.

type Argo

type Argo mg.Namespace

func (Argo) AddGithubRepos

func (a Argo) AddGithubRepos() error

Add public GitHub Orchestrator platform source repos to ArgoCD.

func (Argo) AddLocalRepos

func (a Argo) AddLocalRepos() error

Add repositories to ArgoCD from .mage-local.yaml configuration.

func (Argo) AppSeq

func (a Argo) AppSeq() error

Lists all ArgoCD Applications, sorted by syncWave.

func (Argo) InitSecret

func (a Argo) InitSecret() error

Gets initial Argo login credential.

func (Argo) Login

func (a Argo) Login() error

Login ArgoCD CLI.

type ClusterConfig

type ClusterConfig struct {
	Name     string            `json:"name"`
	Template string            `json:"template"`
	Nodes    []Node            `json:"nodes"`
	Labels   map[string]string `json:"labels"`
}

type CoUtils

type CoUtils mg.Namespace

func (CoUtils) CreateCluster

func (CoUtils) CreateCluster(clusterName, nodeGUID string) error

func (CoUtils) CreateDefaultClusterTemplate

func (cu CoUtils) CreateDefaultClusterTemplate() error

func (CoUtils) DeleteCluster

func (CoUtils) DeleteCluster(clusterName string) error

func (CoUtils) SetDefaultTemplate

func (CoUtils) SetDefaultTemplate(templateName, templateVersion string) error

type ComponentDetails

type ComponentDetails struct {
	AppName     string `yaml:"deployment_name"`
	Chart       string `yaml:"chart"`
	Namespace   string `yaml:"namespace"`
	Order       string `yaml:"order"`
	ReleaseName string `yaml:"release_name"`
	Repo        string `yaml:"repo"`
	Version     string `yaml:"version"`
}

type Config

type Config mg.Namespace

func (Config) Clean

func (c Config) Clean() error

Clean out generated cluster configuration files.

func (Config) CreatePreset

func (c Config) CreatePreset() error

Create a cluster values file using the cluster configuration interface.

func (Config) Debug

func (c Config) Debug(targetEnv string) error

Render a Cluster configuration.

func (Config) UsePreset

func (c Config) UsePreset(clusterPresetFile string) error

Create a cluster deployment configuration from a cluster values file.

type Database

type Database mg.Namespace

func (Database) GetPassword

func (d Database) GetPassword() error

Retrieves the admin password for local postgres database.

func (Database) PSQL

func (d Database) PSQL() error

Starts an interactive psql client and connects to local postgres database.

type Deploy

type Deploy mg.Namespace

func (Deploy) AddKyvernoPolicy

func (d Deploy) AddKyvernoPolicy() error

func (Deploy) Argocd

func (d Deploy) Argocd(targetEnv string) error

Deploy Argo CD in kind cluster.

func (Deploy) EdgeCluster

func (d Deploy) EdgeCluster(targetEnv string) error

Deploys ENiC Edge cluster with sample-project project, input required: mage deploy:edgeCluster <targetEnv>

func (Deploy) EdgeClusterWithLabels

func (d Deploy) EdgeClusterWithLabels(targetEnv string, labels string) error

Deploys ENiC Edge cluster with sample-project project: mage deploy:edgeClusterWithLabels <targetEnv> <labels, color=blue,city=hillsboro>

func (Deploy) EdgeClusterWithProject

func (d Deploy) EdgeClusterWithProject(targetEnv string, orgName string, projectName string) error

Deploys ENiC Edge cluster, input required: mage deploy:edgeClusterWithProject <targetEnv> <org-name> <project-name>

func (Deploy) EdgeNetwork

func (d Deploy) EdgeNetwork(ctx context.Context) error

Deploy the edge network locally.

func (Deploy) EdgeNetworkDNS

func (d Deploy) EdgeNetworkDNS(ctx context.Context) error

Sets the edge network DNS resolver as the default resolver on the host machine.

func (Deploy) EdgeStoragePool

func (Deploy) EdgeStoragePool(ctx context.Context) error

func (Deploy) Gitea

func (d Deploy) Gitea(targetEnv string) error

func (Deploy) Kind

func (d Deploy) Kind(targetEnv string) error

Deploy kind cluster and Argo CD.

func (Deploy) KindAll

func (d Deploy) KindAll() error

Deploy kind cluster, Argo CD, and all Orchestrator services.

func (Deploy) KindCustom

func (d Deploy) KindCustom() error

Deploy kind cluster, Argo CD, and Orchestrator services with customized settings.

func (Deploy) KindMinimal

func (d Deploy) KindMinimal() error

Deploy kind cluster, Argo CD, and all Orchestrator services except o11y and kyverno.

func (Deploy) KindPreset

func (d Deploy) KindPreset(clusterPreset string) error

Deploy kind cluster, Argo CD, and Orchestrator services with preset settings.

func (Deploy) LEOrchestratorCABundle

func (Deploy) LEOrchestratorCABundle() error

func (Deploy) OnPrem

func (d Deploy) OnPrem(ctx context.Context) error

Deploy orchestrator locally using edge-manageability-framework revision defined by local git HEAD.

func (Deploy) Orch

func (d Deploy) Orch(targetEnv string) error

Deploy the Orchestrator using edge-manageability-framework revision defined by the targetEnv config. Should be used for environments based on merged edge-manageability-framework version, e.g. integration, validation, demo, prod.

func (Deploy) OrchCA

func (d Deploy) OrchCA() error

OrchCA Saves Orchestrators's CA certificate to `orch-ca.crt` so it can be imported to trust store for web access.

func (Deploy) OrchLocal

func (d Deploy) OrchLocal(targetEnv string) error

Deploy Orchestrator using edge-manageability-framework revision defined by local git HEAD. Should be used for environments based on local edge-manageability-framework version, e.g. dev, coder, fast-pipeline.

func (Deploy) StartGiteaProxy

func (d Deploy) StartGiteaProxy() error

func (Deploy) StopAllKubectlProxies

func (d Deploy) StopAllKubectlProxies() error

func (Deploy) StopGiteaProxy

func (d Deploy) StopGiteaProxy() error

func (Deploy) VEN

func (d Deploy) VEN(ctx context.Context, flow string, serialNumber string) error

Deploy a local Virtual Edge Node using libvirt. An Orchestrator must be running locally.

func (Deploy) VENWithFlow

func (d Deploy) VENWithFlow(ctx context.Context, flow string, serialNumber string) error

VENWithFlow deploys a local Virtual Edge Node using libvirt and returns the serial number of the deployed node.

func (Deploy) VictoriaMetrics

func (d Deploy) VictoriaMetrics(cmd string) error

Deploying VictoriaMetrics, <usage with argument "apply" when deploying, "delete" when deleting>

func (Deploy) WaitUntilComplete

func (Deploy) WaitUntilComplete(ctx context.Context) error

Blocks until the applications in the Orchestrator deployment are synced and healthy. If a particular application deployment does not enter the synced and healthy state after the appDeployDefaultMaxDuration, the overall deployment would be considered a failure and this method will return an error.

type Deps

type Deps mg.Namespace

func (Deps) EnsureUbuntu

func (Deps) EnsureUbuntu() error

Checks if running on Ubuntu Linux.

func (Deps) FPM

func (d Deps) FPM(ctx context.Context) error

Installs FPM (Effing Package Management) for creating OS packages.

func (Deps) Libvirt

func (d Deps) Libvirt(ctx context.Context) error

Installs libvirt dependencies. This is required for running an Orchestrator and Edge Node using KVM. Only Ubuntu 22.04 is supported.

func (Deps) Terraform

func (Deps) Terraform() error

type DevUtils

type DevUtils mg.Namespace

func (DevUtils) CreateDefaultUser

func (DevUtils) CreateDefaultUser(ctx context.Context) error

func (DevUtils) DeployEnic

func (DevUtils) DeployEnic(replicas int, targetEnv string) error

Deploys the ENiC (indicates the number of instances, optionally set env variables: ORCH_FQDN, ORCH_IP, ORCH_USER, ORCH_PASS, ORCH_ORG, ORCH_PROJECT).

func (DevUtils) GetEnicSerialNumber

func (DevUtils) GetEnicSerialNumber() error

GetEnicSerialNumber retrieves the ENiC serial number.

func (DevUtils) GetEnicUUID

func (DevUtils) GetEnicUUID() error

GetEnicUUID retrieves the ENiC UUID.

func (DevUtils) ProvisionEnic

func (DevUtils) ProvisionEnic(podName string) error

ProvisionEnic Provisions ENiC with orchestrator, usage: mage devUtils:provisionEnic enic-0

func (DevUtils) RegisterEnic

func (DevUtils) RegisterEnic(podName string) error

RegisterEnic Registers ENiC with orchestrator, usage: mage devUtils:registerEnic enic-0

func (DevUtils) WaitForEnic

func (DevUtils) WaitForEnic() error

WaitForEnic waits for the ENiC pod to be in a running state.

func (DevUtils) WaitForEnicNodeAgent

func (DevUtils) WaitForEnicNodeAgent() error

WaitForEnicNodeAgent waits until node agent in ENiC reports INSTANCE_STATUS_RUNNING.

type Gen

type Gen mg.Namespace

Namespace contains Gen targets.

func (Gen) BiosTraefikhostfile

func (Gen) BiosTraefikhostfile(ip string, addComment bool) error

BiosTraefikhostfile Generates the tinkerbell-haproxy hostfile entry

func (Gen) DockerImageManifest

func (g Gen) DockerImageManifest() error

DockerImageManifest Generates Manifest of Docker Images after deploying Orchestrator to kind cluster.

func (Gen) DumpReleaseImageManifest

func (g Gen) DumpReleaseImageManifest() error

Print Release image manifest details to stdout.

func (Gen) DumpReleaseManifest

func (g Gen) DumpReleaseManifest() error

Print the Release manifest details to stdout.

func (Gen) FirewallDoc

func (g Gen) FirewallDoc() error

Create a document showing firewall configurationt.

func (Gen) GenericHostfile

func (Gen) GenericHostfile(ip string, host string, addComment bool) error

func (Gen) GetHostSNICollection

func (g Gen) GetHostSNICollection() error

GetHostSNICollection Generates rules to be added/modified to traefik.yml.

func (Gen) GethostSNICollection

func (Gen) GethostSNICollection() (string, error)

func (Gen) Hostfile

func (g Gen) Hostfile(ip string) error

Hostfile Generates entries to be added/modified in a REMOTE hostfile via IP specified by the user.

func (Gen) HostfileTraefik

func (g Gen) HostfileTraefik() error

Hostfile Generates entries to be added/modified in a local hostfile (using Traefik svc ExternalIP).

func (Gen) LEOrchestratorCABundle

func (g Gen) LEOrchestratorCABundle() error

Creates fullchain CA bundle for Orchestrator. Used for integration testing with autocert deployment

func (Gen) LocalReleaseImageManifest

func (g Gen) LocalReleaseImageManifest(manifestFilename string) error

Create a Release image manifest with local charts

func (Gen) OrchCA

func (g Gen) OrchCA() error

OrchCA Saves Orchestrator's CA certificate to `orch-ca.crt` so it can be imported to trust store for web access.

func (Gen) OrchestratorDomain

func (g Gen) OrchestratorDomain() error

Returns domain assigned to orchestrator if using auto cert management

func (Gen) RegistryCacheCert

func (Gen) RegistryCacheCert(targetEnv string) error

RegistryCacheCert generates the Registry cache x509 certificate file for a specified target environment.

func (Gen) ReleaseImageManifest

func (g Gen) ReleaseImageManifest(manifestFilename string) error

Create a Release image manifest file.

func (Gen) ReleaseManifest

func (g Gen) ReleaseManifest(manifestFilename string) error

Create a Release manifest file.

type Keycloak

type Keycloak mg.Namespace

func (Keycloak) GetPassword

func (k Keycloak) GetPassword()

GetPassword retrieves the admin keycloak password

func (Keycloak) ResetPassword

func (k Keycloak) ResetPassword()

Resets the admin keycloak password and restarts keycloak

func (Keycloak) SetPassword

func (k Keycloak) SetPassword(password string)

SetPassword '<password>' sets the admin keycloak password, make sure you use quotes around the password

type Lint

type Lint mg.Namespace

func (Lint) All

func (l Lint) All() error

Lint everything.

func (Lint) Golang

func (l Lint) Golang() error

Lint golang files.

func (Lint) Helm

func (l Lint) Helm() error

Lint helm templates.

func (Lint) Markdown

func (Lint) Markdown() error

Lint markdown files using markdownlint-cli2 tool.

func (Lint) Terraform

func (Lint) Terraform() error

Lint Terraform source files.

func (Lint) Yaml

func (l Lint) Yaml() error

Lint helm values.

type LogUtils

type LogUtils mg.Namespace

func (LogUtils) CollectArgoDiags

func (LogUtils) CollectArgoDiags() error

Collect Argo CD diagnosis information

func (LogUtils) CollectLogsForDebug

func (LogUtils) CollectLogsForDebug()

Collect logs for debug

type Manifest

type Manifest struct {
	Components        map[string]ComponentDetails `yaml:"components"`
	Date              string                      `yaml:"date"`
	EdgeNodeGitHash   string                      `yaml:"edgeNodeGitHash"`
	EdgeNodeGitOrigin string                      `yaml:"edgeNodeGitOrigin"`
	GitHash           string                      `yaml:"gitHash"`
	GitOrigin         string                      `yaml:"gitOrigin"`
	Tag               string                      `yaml:"tag"`
	Time              string                      `yaml:"time"`
	Type              string                      `yaml:"type"`
}

type Node

type Node struct {
	ID   string `json:"id"`
	Role string `json:"role"`
}

TODO replace with open-edge-platform/cluster-manager types

type OnboardingFlow

type OnboardingFlow string

OnboardingFlow defines the onboarding flow type for the edge node.

var (
	InteractiveOnboardingFlow    OnboardingFlow = "io"
	NonInteractiveOnboardingFlow OnboardingFlow = "nio"
)

func (OnboardingFlow) IsValid

func (flow OnboardingFlow) IsValid() bool

type Publish

type Publish mg.Namespace

Publish is a namespace for publishing artifacts.

func (Publish) ReleaseManifest

func (Publish) ReleaseManifest(ctx context.Context) error

Publish release manifest files. Valid authentication with push access to the registry is required for this target. Once published, the files will be available via the Release service with `oras pull $ARTIFACT_NAME e.g., oras pull registry-rs.edgeorchestration.intel.com/edge-orch/common/files/release-manifest:3.0.0-dev-d5ed6ff

func (Publish) SourceTarballs

func (Publish) SourceTarballs(ctx context.Context) error

Builds and publishes Orchestrator application source tarballs to the registry.

type Registry

type Registry mg.Namespace

Namespace contains registry targets.

func (Registry) GetRegistryURL

func (Registry) GetRegistryURL() string

func (Registry) StartLocalRegistry

func (Registry) StartLocalRegistry() error

Start a local docker container registry.

type Router

type Router mg.Namespace

func (Router) Restart

func (r Router) Restart() error

Restarts router to pass through external TLS connections to Argo service in k8s.

func (Router) Start

func (r Router) Start() error

Starts router to pass through external TLS connections to Argo service in k8s.

func (Router) StartSandbox

func (r Router) StartSandbox(externalDomain string, sandboxKeyFile string, sandboxCertFile string) error

StartSandbox Start router for external domain to kind.internal for orchestrator-sandbox. 3 arguments are required: * externalDomain - the name of the external domain e.g. sandbox-1.orchestrator-sandbox.one-edge.intel.com. * sandboxKeyFile An "rsa" Private Key (unencrypted) * sandboxCertFile An x509 Certificate that matches the Private Key and the external Domain and has not expired.

func (Router) Stop

func (r Router) Stop() error

Stops router for external connections to Argo service in k8s.

type Tarball

type Tarball mg.Namespace

func (Tarball) CloudFull

func (t Tarball) CloudFull() error

CloudFull Creates a Tarball of artifacts for Cloud deployment of Full orchestrator

func (Tarball) OnpremFull

func (t Tarball) OnpremFull() error

OnpremFull Creates a Tarball of artifacts for OnPrem deployment of Full orchestrator

func (Tarball) OnpremFullIntel

func (t Tarball) OnpremFullIntel() error

OnpremFullIntel Creates a Tarball of artifacts for OnPrem deployment of orchestrator inside Intel

type TarballManifest

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

func NewTarballManifest

func NewTarballManifest(variant, repoName, actualName string, clusterNames []string) *TarballManifest

type TenantUtils

type TenantUtils mg.Namespace

func (TenantUtils) CreateClusterOrchUsers

func (TenantUtils) CreateClusterOrchUsers(ctx context.Context, orgName, projectName, coUserPrefix string) error

CreateClusterOrchUsers creates Cluster Orch users in a given Project: mage tenantUtils:createClusterOrchUsers <org-name> <project-name> <co-user-prefix>

func (TenantUtils) CreateDefaultMtSetup

func (TenantUtils) CreateDefaultMtSetup(ctx context.Context) error

CreateDefaultMtSetup creates one Org, one Project, one Project admin, CO and Edge Infrastructure Manager users in the Project.

func (TenantUtils) CreateEdgeInfraUsers

func (TenantUtils) CreateEdgeInfraUsers(ctx context.Context, orgName, projectName, edgeInfraUserPrefix string) error

CreateEdgeInfraUsers creates Edge Infra Manager users in a given Project: mage tenantUtils:createEdgeInfraUser <org-name> <project-name> <edge-infra-user-prefix>

func (TenantUtils) CreateOrg

func (TenantUtils) CreateOrg(ctx context.Context, org string) error

CreateOrg creates an Org in the system: mage tenantUtils:createOrg <org-name>

func (TenantUtils) CreateProjectAdminInOrg

func (TenantUtils) CreateProjectAdminInOrg(ctx context.Context, orgName string, projectAdminUser string) error

CreateProjectAdminInOrg creates a Project Admin in a given Org: mage tenantUtils:createProjectAdminInOrg <org-name> <project-admin-user>

func (TenantUtils) CreateProjectInOrg

func (TenantUtils) CreateProjectInOrg(ctx context.Context, orgName string, projectName string) error

CreateProjectInOrg creates a Project in a given Org: mage tenantUtils:createProjectInOrg <org-name> <project-name>

func (TenantUtils) DeleteOrg

func (TenantUtils) DeleteOrg(ctx context.Context, org string) error

DeleteOrg deletes an Org in the system

func (TenantUtils) DeleteProject

func (TenantUtils) DeleteProject(ctx context.Context, org, project string) error

DeleteProject deletes an Org in the system

func (TenantUtils) GetOrg

func (TenantUtils) GetOrg(ctx context.Context, orgName string) error

GetOrg gets the Org in the system: mage tenantUtils:getOrg <org-name>

func (TenantUtils) GetProject

func (TenantUtils) GetProject(ctx context.Context, orgName, projectName string) error

GetProject gets the Project in the system: mage tenantUtils:getProject <org-name> <project-name>

func (TenantUtils) WaitUntilProjectReady

func (TenantUtils) WaitUntilProjectReady(ctx context.Context, orgName, projectName string) (string, error)

func (TenantUtils) WaitUntilProjectWatchersReady

func (TenantUtils) WaitUntilProjectWatchersReady(ctx context.Context, orgName, projectName string) (string, error)

type Test

type Test mg.Namespace

Namespace contains test targets.

func (Test) ChartsAvailableOnReleaseService

func (Test) ChartsAvailableOnReleaseService(ctx context.Context) error

Return nil if all charts necessary to deploy Orchestrator are available in the Release service. TODO: Only cloud orch is tested right now. Update for on-prem or check whether this is good enough for on-prem.

func (Test) ClusterOrchSmokeTest

func (t Test) ClusterOrchSmokeTest(ctx context.Context) error

ClusterOrchSmokeTest Run cluster orch smoke test.

func (Test) ContainersAvailableOnReleaseService

func (Test) ContainersAvailableOnReleaseService(ctx context.Context, firstPartyOnly bool) error

Return nil if all containers necessary to deploy Orchestrator are available in the Release service. TODO: Only cloud orch is tested right now. Update for on-prem or check whether this is good enough for on-prem.

func (Test) CreateTestProject

func (t Test) CreateTestProject(ctx context.Context) error

func (Test) Deployment

func (t Test) Deployment() error

Test to make sure all k8s Deployments are Ready.

func (Test) E2e

func (t Test) E2e(ctx context.Context) error

Test end-to-end functionality of full Orchestrator.

func (Test) E2eAlertsObservability

func (t Test) E2eAlertsObservability(ctx context.Context) error

Test end-to-end functionality of observability alerts.

func (Test) E2eAlertsObservabilityExtended

func (t Test) E2eAlertsObservabilityExtended(ctx context.Context) error

Test end-to-end functionality of observability alerts (extended, includes long-duration tests).

func (Test) E2eAutocert

func (t Test) E2eAutocert(ctx context.Context) error

Test end-to-end functionality of Autocert deployment.

func (Test) E2eByLabel

func (t Test) E2eByLabel(label string) error

Test by label.

func (Test) E2eEnObservability

func (t Test) E2eEnObservability(ctx context.Context) error

Test end-to-end functionality of Edgenode observability.

func (Test) E2eObservability

func (t Test) E2eObservability(ctx context.Context) error

Test end-to-end functionality of Observability.

func (Test) E2eOnPrem

func (t Test) E2eOnPrem(ctx context.Context) error

Test end-to-end functionality of full Orchestrator.

func (Test) E2eOrchObservability

func (t Test) E2eOrchObservability(ctx context.Context) error

Test end-to-end functionality of Orchestrator observability.

func (Test) E2eSreObservability

func (t Test) E2eSreObservability(ctx context.Context) error

Test end-to-end functionality of SRE Exporter.

func (Test) E2eSreObservabilityNoEnic

func (t Test) E2eSreObservabilityNoEnic(ctx context.Context) error

Test end-to-end functionality of SRE Exporter with No Enic deployed.

func (Test) E2eTenancy

func (t Test) E2eTenancy(ctx context.Context) error

Test end-to-end functionality of Tenancy Services via Nexus Client.

func (Test) E2eTenancyApiGw

func (t Test) E2eTenancyApiGw(ctx context.Context) error

Test end-to-end functionality of Tenancy Services via Api-Gw.

func (Test) FlexCore

func (t Test) FlexCore() error

Test FlexCore deployment using gnodeb_proxy.

func (Test) Go

func (t Test) Go() error

Test Go source files.

func (Test) ImagePullPolicyCompliance

func (Test) ImagePullPolicyCompliance(ctx context.Context) error

Tests if any Kubernetes pod violates image pull policy.

func (Test) Onboarding

func (Test) Onboarding() error

Test end-to-end functionality of onboarding an Edge Node. These tests cannot be executed concurrently due to issues with the underlying virtual Edge Node provisioning logic.

func (Test) Pods

func (t Test) Pods() error

Test to make sure all k8s Pods are Ready.

func (Test) PolicyCompliance

func (Test) PolicyCompliance(ctx context.Context) error

Tests if any Kubernetes cluster resources are in violation of a cluster policy. If a resource is in violation, the resource metadata and specific policy violations are printed to stdout. If there are no policy violations, this target returns nil.

func (Test) Stress

func (t Test) Stress(ctx context.Context) error

Perform stress test of Traefik endpoint in Orchestrator.

type Undeploy

type Undeploy mg.Namespace

Namespace contains Undeploy targets.

func (Undeploy) EdgeCluster

func (Undeploy) EdgeCluster(orgName, projectName string) error

Deletes ENiC and cluster, input required: mage undeploy:edgeCluster <org-name> <project-name>

func (Undeploy) EdgeNetwork

func (u Undeploy) EdgeNetwork(ctx context.Context) error

Destroys the edge network deployed locally.

func (Undeploy) EdgeNetworkDNS

func (Undeploy) EdgeNetworkDNS(ctx context.Context) error

Removes the edge network DNS resolver as the default resolver on the host machine.

func (Undeploy) EdgeStoragePool

func (Undeploy) EdgeStoragePool(ctx context.Context) error

Destroys the edge storage pool deployed locally.

func (Undeploy) Kind

func (Undeploy) Kind() error

Undeploy Deletes all local KinD clusters.

func (Undeploy) OnPrem

func (u Undeploy) OnPrem(ctx context.Context) error

Destroys the on-premise Orchestrator, edge network, and edge storage pool deployed locally.

func (Undeploy) VEN

func (Undeploy) VEN(ctx context.Context, serialNumber string) error

Destroys any local Virtual Edge Nodes.

type Use

type Use mg.Namespace

Namespace contains Use targets.

func (Use) Current

func (Use) Current() error

Current Show current kubectl context.

func (Use) EdgeCluster

func (Use) EdgeCluster() error

EdgeCluster Switch kubectl context to ENiC Edge Cluster.

func (Use) EdgeClusterGetNames

func (Use) EdgeClusterGetNames() error

EdgeClusterGetNames Show all kubectl contexts.

func (Use) EdgeClusterWithName

func (Use) EdgeClusterWithName(edgeName string) error

EdgeClusterWithName Switch kubectl context to named Edge Cluster (for multiple edges).

func (Use) Orch

func (Use) Orch() error

Switch kubectl context to Orchestrator.

type Vault

type Vault mg.Namespace

Namespace contains Vault targets.

func (Vault) Keys

func (v Vault) Keys() error

Retrieves vault keys and root token after deployment and writes vault keys to a local file.

func (Vault) Unseal

func (v Vault) Unseal() error

Unseals vault with the keys provided in a k8s secret.

type Version

type Version mg.Namespace

func (Version) CheckVersion

func (v Version) CheckVersion() error

Checks that the Version in the VERSION file and in the Argo Charts is in syn

func (Version) GetVersionTag

func (Version) GetVersionTag() error

Get the Release Tag for the current source version

func (Version) SetVersion

func (v Version) SetVersion() error

Reads the Version from the Version file and updates the Argo Charts

Jump to

Keyboard shortcuts

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