• NeonSDK
  • NeonKUBE
Search Results for

    Show / Hide Table of Contents
    • Neon.Kube
      • ClusterContainerImage
      • ClusterDefinitionException
      • ClusterDeploymentStatus
      • ClusterDetails
      • ClusterHealth
      • ClusterHost
      • ClusterInfo
      • ClusterLock
      • ClusterManifest
      • ClusterNodeState
      • ClusterNodeTelemetry
      • ClusterSetupFailureMetadata
      • ClusterState
      • ClusterTelemetry
      • GrpcLogExporter
      • GrpcTraceExporter
      • HostingReadinessException
      • KubeClientConfig
      • KubeClientPlatform
      • KubeClusterAdvice
      • KubeConfigMapName
      • KubeConst
      • KubeDiagnostics
      • KubeDownloads
      • KubeEnv
      • KubeHelper
      • KubeImageType
      • KubeMinioBucket
      • KubeNamespace
      • KubeNodeFolder
      • KubeNodePort
      • KubePort
      • KubeSecretName
      • KubeService
      • KubeServiceAdvice
      • KubeSetupProperty
      • KubeSetupState
      • KubeVersions
      • NeonAnnotation
      • NeonKubeException
      • NeonLabel
      • NeonNodeTaskType
      • NodeImageInfo
      • PriorityClass
      • PriorityClass.PriorityDef
      • PrometheusClient
      • PrometheusMatrixResult
      • PrometheusMatrixValue
      • PrometheusResponseData<T>
      • PrometheusResponseStatus
      • PrometheusResponse<T>
      • PrometheusResult
      • PrometheusResultType
      • PrometheusTimeSeriesValue
      • PrometheusTimeSeriesValueConverter
      • PrometheusVectorResult
      • PrometheusVectorValue
      • TypedConfigMap<TConfigMapData>
      • TypedSecret<TSecretData>
      • VersionException
    • Neon.Kube.BuildInfo
      • ThisAssembly
      • ThisAssembly.Git
      • ThisAssembly.Git.BaseVersion
      • ThisAssembly.Git.SemVer
    • Neon.Kube.Clients
      • AzureComputePlan
      • AzureImageDetails
      • AzureImageReference
      • HeadendClient
      • HeadendClient.__Cluster
      • HeadendClient.__ClusterSetup
      • HeadendClient.__NeonDesktop
    • Neon.Kube.ClusterDef
      • AcmeOptions
      • AddressRule
      • AddressRuleAction
      • ApiServerOptions
      • AwsHelper
      • AwsHostingOptions
      • AwsNetworkOptions
      • AwsNodeOptions
      • AwsVolumeType
      • AzureCloudEnvironment
      • AzureCloudEnvironments
      • AzureHelper
      • AzureHostingOptions
      • AzureNetworkOptions
      • AzureNodeOptions
      • AzureStorageType
      • BareMetalHostingOptions
      • CloudOptions
      • ClusterDefinition
      • ClusterPurpose
      • ContainerOptions
      • DeploymentOptions
      • FeatureOptions
      • FeatureOptions.HarborOptions
      • GoogleHostingOptions
      • HealthCheckOptions
      • HostingEnvironment
      • HostingOptions
      • HyperVHostingOptions
      • HypervisorHost
      • HypervisorHostingOptions
      • HypervisorNodeOptions
      • IngressProtocol
      • IngressRule
      • JobOptions
      • JobSchedule
      • KubernetesOptions
      • LogOptions
      • MetricsOptions
      • MetricsStorageOptions
      • MinioOptions
      • MonitorOptions
      • NetworkCni
      • NetworkOptions
      • NodeDefinition
      • NodeLabels
      • NodeOptions
      • NodeRole
      • OpenEbsEngine
      • OpenEbsOptions
      • Registry
      • ResourceTag
      • SecurityOptions
      • StorageOptions
      • TraceOptions
      • XenServerHostingOptions
    • Neon.Kube.ClusterMetadata
      • ClusterLockState
      • ClusterLockStatus
    • Neon.Kube.Config
      • ClusterLoginExport
      • KubeClusterInfo
      • KubeConfig
      • KubeConfigAuthProvider
      • KubeConfigCluster
      • KubeConfigClusterConfig
      • KubeConfigContext
      • KubeConfigContextConfig
      • KubeConfigEnvironmentVariable
      • KubeConfigExecConfig
      • KubeConfigExecInteractiveMode
      • KubeConfigPreferences
      • KubeConfigUser
      • KubeConfigUserConfig
      • KubeContextName
      • KubeFileDetails
      • KubeSshKey
      • NeonKubeExtensions
    • Neon.Kube.Deployment
      • ClusterDeployment
      • NodeDeployment
    • Neon.Kube.DesktopService
      • DesktopService
      • GrpcDesktopService
    • Neon.Kube.Glauth
      • GlauthGroup
      • GlauthUser
      • GlauthUserCapability
    • Neon.Kube.GrpcProto
      • GrpcError
      • GrpcErrorExtensions
      • GrpcServiceException
      • NeonGrpcServices
    • Neon.Kube.GrpcProto.Desktop
      • DesktopConverters
      • GrpGetVmDrivesReply
      • GrpcAddVmDriveRequest
      • GrpcAddVmRequest
      • GrpcBaseReply
      • GrpcCompactDriveRequest
      • GrpcEjectVmDvdRequest
      • GrpcFindIPAddressReply
      • GrpcFindIPAddressRequest
      • GrpcFindNatByNameRequest
      • GrpcFindNatBySubnetRequest
      • GrpcFindNatReply
      • GrpcGetSwitchReply
      • GrpcGetSwitchRequest
      • GrpcGetVmDrivesRequest
      • GrpcGetVmNetworkAdaptersReply
      • GrpcGetVmNetworkAdaptersRequest
      • GrpcGetVmReply
      • GrpcGetVmRequest
      • GrpcGetWindowsOptionalFeaturesReply
      • GrpcGetWindowsOptionalFeaturesRequest
      • GrpcInsertVmDvdRequest
      • GrpcIsNestedVirtualizationReply
      • GrpcIsNestedVirtualizationRequest
      • GrpcListLocalHostsSectionsReply
      • GrpcListLocalHostsSectionsRequest
      • GrpcListNatsReply
      • GrpcListNatsRequest
      • GrpcListSwitchesReply
      • GrpcListSwitchesRequest
      • GrpcListVmsReply
      • GrpcListVmsRequest
      • GrpcLocalHostSection
      • GrpcNewExternalSwitchRequest
      • GrpcNewInternalSwitchRequest
      • GrpcRelayLogBatchReply
      • GrpcRelayLogBatchRequest
      • GrpcRelayTraceBatchReply
      • GrpcRelayTraceBatchRequest
      • GrpcRemoveSwitchRequest
      • GrpcRemoveVmRequest
      • GrpcSaveVmRequest
      • GrpcStartVmRequest
      • GrpcStopVmRequest
      • GrpcVirtualDrive
      • GrpcVirtualIPAddress
      • GrpcVirtualMachine
      • GrpcVirtualMachineNetworkAdapter
      • GrpcVirtualNat
      • GrpcVirtualSwitch
      • GrpcVmExistsReply
      • GrpcVmExistsRequest
      • IGrpcDesktopService
    • Neon.Kube.Hosting
      • HostedNodeInfo
      • HostingCapabilities
      • HostingConstrainedResourceType
      • HostingLoader
      • HostingManager
      • HostingManagerFactory
      • HostingProviderAttribute
      • HostingReadiness
      • HostingReadinessProblem
      • HostingResourceAvailability
      • HostingResourceConstraint
      • IHostingLoader
      • IHostingManager
      • IHostingManagerFactory
      • StopMode
    • Neon.Kube.Hosting.Aws
      • AwsHostingManager
    • Neon.Kube.Hosting.Azure
      • AzureHostingManager
    • Neon.Kube.Hosting.BareMetal
      • BareMetalHostingManager
    • Neon.Kube.Hosting.Google
      • GoogleHostingManager
    • Neon.Kube.Hosting.HyperV
      • HyperVHostingManager
    • Neon.Kube.Hosting.XenServer
      • XenServerHostingManager
      • XenServerHostingManager.DiskTemplateInfo
    • Neon.Kube.K8s
      • KubernetesExtensions
      • KubernetesObjectMetadata
      • KubernetesRetryHandler
      • LeaderElectionConfig
      • LeaderElector
      • V1CustomObjectList<T>
      • WatchEvent<T>
      • Watcher<T>
    • Neon.Kube.Models
      • AzureComputePlan
      • AzureImageDetails
      • AzureImageReference
    • Neon.Kube.Models.Headend
      • IClusterApi
      • IClusterSetupApi
      • INeonDesktopApi
      • Stub
    • Neon.Kube.Oauth2Proxy
      • Oauth2ProxyConfig
      • Oauth2ProxyHeader
      • Oauth2ProxyHeaderValue
      • Oauth2ProxyLoginUrlParameterRule
      • Oauth2ProxyLoginUrlParameters
      • Oauth2ProxyOidcOptions
      • Oauth2ProxyProvider
      • Oauth2ProxyProviderType
      • Oauth2ProxySecretSource
      • Oauth2ProxyServer
      • Oauth2ProxyTls
      • Oauth2ProxyUpstream
      • Oauth2ProxyUpstreamConfig
    • Neon.Kube.PortForward
      • IPortForwardManager
      • PortForwardManager
    • Neon.Kube.Proxy
      • ClusterProxy
      • ClusterProxy.Operation
      • ClusterResetOptions
      • NodeProxyCreator
    • Neon.Kube.Resources
      • CustomResourceException
      • ResourceHelper
    • Neon.Kube.Resources.Calico
      • V1FelixConfiguration
    • Neon.Kube.Resources.CertManager
      • AcmeChallengeSolver
      • AcmeChallengeSolverDns01
      • AcmeExternalAccountBinding
      • AcmeIssuer
      • AcmeIssuerDns01ProviderRoute53
      • AcmeIssuerDns01ProviderWebhook
      • AcmeSecretKeySelector
      • CertificateDnsNameSelector
      • ChallengeAction
      • ChallengePayload
      • ChallengeRequest
      • ChallengeResponse
      • ClusterIssuer
      • IssuerRef
      • JKS
      • KeyAlgorithm
      • KeyEncoding
      • Keystores
      • PKCS12
      • PasswordSecretRef
      • PrivateKey
      • RotationPolicy
      • Subject
      • V1Certificate
      • V1CertificateRequest
      • V1CertificateSpec
      • V1CertificateStatus
      • V1IssuerSpec
      • X509Usages
    • Neon.Kube.Resources.Cluster
      • TestStatus
      • V1CrioConfiguration
      • V1CrioConfiguration.CrioConfigurationSpec
      • V1NeonClusterJobs
      • V1NeonClusterJobs.JobSchedule
      • V1NeonClusterJobs.JobStatus
      • V1NeonClusterJobs.NeonClusterJobsSpec
      • V1NeonClusterJobs.NeonClusterJobsStatus
      • V1NeonContainerRegistry
      • V1NeonContainerRegistry.RegistrySpec
      • V1NeonDashboard
      • V1NeonDashboard.NeonDashboardSpec
      • V1NeonNodeTask
      • V1NeonNodeTask.Phase
      • V1NeonNodeTask.TaskSpec
      • V1NeonNodeTask.TaskStatus
      • V1NeonSsoCallbackUrl
      • V1NeonSsoClient
      • V1NeonSsoConnector
      • V1NeonTestObject
      • V1SsoCallbackUrlSpec
      • V1SsoCallbackUrlStatus
      • V1SsoClientSpec
      • V1SsoClientStatus
      • V1TestSpec
    • Neon.Kube.Resources.Dex
      • DexConfig
      • DexConnector
      • DexConnectorConverter
      • DexConnectorType
      • DexConnector<T>
      • DexExpiryConfig
      • DexFrontendConfig
      • DexGrpcConfig
      • DexLdapConfig
      • DexLdapSearch
      • DexLogConfig
      • DexOauth2Config
      • DexOidcClaimMapping
      • DexOidcConfig
      • DexRefreshTokenConfig
      • DexStaticUser
      • DexStorage
      • DexStorageType
      • DexTelemetryConfig
      • DexUserMatcher
      • DexWebConfig
      • IDexConnectorConfig
      • IDexConnector<T>
      • IV1DexConnector
      • Oauth2ResponseType
    • Neon.Kube.Resources.ExternalDns
      • DnsEndpoint
      • DnsRecordType
      • ExternalDnsEndpoint
      • V1DnsEndpointSpec
    • Neon.Kube.Resources.Grafana
      • V1Grafana
      • V1GrafanaDashboard
      • V1GrafanaDashboardSpec
      • V1GrafanaDatasource
    • Neon.Kube.Resources.Harbor
      • V1HarborCluster
      • V1HarborConfiguration
      • V1HarborNotaryServer
      • V1HarborNotarySigner
    • Neon.Kube.Resources.Istio
      • Abort
      • AuthorizationPolicyAction
      • AuthorizationPolicyOperation
      • AuthorizationPolicyRule
      • AuthorizationPolicyRule.From
      • AuthorizationPolicyRule.To
      • AuthorizationPolicySource
      • ClientTLSSettings
      • CorsPolicy
      • Delay
      • Delegate
      • Destination
      • ExtensionProvider
      • HTTPFaultInjection
      • HTTPMatchRequest
      • HTTPMethod
      • HTTPRedirect
      • HTTPRetry
      • HTTPRewrite
      • HTTPRoute
      • HTTPRouteDestination
      • HeaderOperations
      • Headers
      • L4MatchAttributes
      • Location
      • Percent
      • Port
      • PortProtocol
      • PortSelector
      • Resolution
      • RouteDestination
      • Server
      • ServerTLSSettings
      • ServiceEntry
      • StringMatch
      • TCPRoute
      • TLSMatchAttributes
      • TLSMode
      • TLSProtocol
      • TLSRoute
      • Tracing
      • TracingProvider
      • TrafficPolicy
      • UInt32Value
      • V1AuthorizationPolicy
      • V1AuthorizationPolicySpec
      • V1DestinationRule
      • V1DestinationRuleSpec
      • V1Gateway
      • V1GatewaySpec
      • V1ServiceEntrySpec
      • V1Telemetry
      • V1TelemetrySpec
      • V1VirtualService
      • V1VirtualServiceSpec
      • WorkloadEntry
      • WorkloadSelector
    • Neon.Kube.Resources.JsonConverters
      • DexConnectorJsonConverter
      • JsonCollectionItemConverter<TDatatype, TConverterType>
      • JsonV1ResourceConverter
    • Neon.Kube.Resources.Kiali
      • V1Kiali
    • Neon.Kube.Resources.Minio
      • BucketQuota
      • RetentionMode
      • RetentionSpec
      • V1MinioBucket
      • V1MinioBucket.V1MinioBucketSpec
      • V1MinioBucket.V1MinioBucketStatus
      • V1MinioTenant
      • VersioningMode
    • Neon.Kube.Resources.OpenEBS
      • BlockDeviceCapacity
      • BlockDeviceDetails
      • BlockDeviceDevLink
      • BlockDeviceType
      • DataRaidGroupTypes
      • DevLinkType
      • DriveType
      • FileSystemInfo
      • V1CStorBlockDevice
      • V1CStorBlockDeviceList
      • V1CStorBlockDeviceRef
      • V1CStorBlockDeviceSpec
      • V1CStorDataRaidGroup
      • V1CStorPoolCluster
      • V1CStorPoolClusterList
      • V1CStorPoolClusterSpec
      • V1CStorPoolConfig
      • V1CStorPoolSpec
    • Neon.Kube.Resources.Prometheus
      • Endpoint
      • NamespaceSelector
      • V1ServiceMonitor
      • V1ServiceMonitorSpec
    • Neon.Kube.SSH
      • INodeSshProxy
      • NodeSshProxyExtensions
      • NodeSshProxy<TMetadata>
    • Neon.Kube.Setup
      • DesktopServiceProxy
      • ISetupController
      • ISetupControllerStep
      • KubeSetup
      • NodeLog
      • PrepareClusterOptions
      • SetupClusterOptions
      • SetupClusterStatus
      • SetupConsoleWriter
      • SetupController<NodeMetadata>
      • SetupDisposition
      • SetupNodeStatus
      • SetupProgressDelegate
      • SetupProgressMessage
      • SetupStatusChangedDelegate
      • SetupStepDetails
      • SetupStepState
      • SetupStepStatus
    • Neon.Kube.Xunit
      • AwsClusterDefinitions
      • AzureClusterDefinitions
      • ClusterFactAttribute
      • ClusterFixture
      • ClusterFixtureOptions
      • ClusterTheoryAttribute
      • HyperVClusterDefinitions
      • KubeTestHelper
      • KubeTestManager
      • XenServerClustersDefinitions

    Class NodeSshProxy<TMetadata>

    Uses a SSH/SCP connection to provide access to Linux machines to access files, run commands, etc.

    note

    This is class is not intended to be a general purpose SSH wrapper at this time. It currently assumes that the remote side is running some variant of Linux and it makes some global changes including disabling SUDO password prompts for all users as well as creating some global directories.

    Inheritance
    object
    LinuxSshProxy
    LinuxSshProxy<TMetadata>
    NodeSshProxy<TMetadata>
    Implements
    INodeSshProxy
    Namespace: Neon.Kube.SSH
    Assembly: Neon.Kube.dll
    Syntax
    public class NodeSshProxy<TMetadata> : LinuxSshProxy<TMetadata>, INodeSshProxy where TMetadata : class
    Type Parameters
    Name Description
    TMetadata

    Defines the metadata type the application wishes to associate with the server. You may specify object when no additional metadata is required.

    Remarks

    Construct an instance to connect to a specific cluster node. You may specify TMetadata to associate application specific information or state with the instance.

    This class includes methods to invoke Linux commands on the node,

    Call Dispose() or Disconnect() to close the connection.

    note

    You can use Clone() to make a copy of a proxy that can be used to perform parallel operations against the same machine.

    Constructors

    NodeSshProxy(string, IPAddress, SshCredentials, string, int, TextWriter)

    Constructs a LinuxSshProxy<TMetadata>.

    Declaration
    public NodeSshProxy(string name, IPAddress address, SshCredentials credentials, string role = null, int port = 22, TextWriter logWriter = null)
    Parameters
    Type Name Description
    string name

    The display name for the server.

    IPAddress address

    The private cluster IP address for the server.

    SshCredentials credentials

    The credentials to be used for establishing SSH connections.

    string role

    Optionally specifies one of the NodeRole values identifying what the node does.

    int port

    Optionally overrides the standard SSH port (22).

    TextWriter logWriter

    The optional TextWriter where operation logs will be written.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if name or if credentials is null.

    Properties

    Cluster

    Returns the associated ClusterProxy when there is one.

    Declaration
    public ClusterProxy Cluster { get; set; }
    Property Value
    Type Description
    ClusterProxy
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when there is no associated cluster proxy.

    ImageType

    Indicates the type of node image type. This is stored in the /etc/neonkube/image-type file.

    Declaration
    public KubeImageType ImageType { get; set; }
    Property Value
    Type Description
    KubeImageType

    ImageVersion

    Indicates the NEONKUBE node image version. This is stored in the /etc/neonkube/image-version file. This can be used to ensure that the node image is compatible with the code configuring the cluster.

    This returns null when the /etc/neonkube/image-version file doesn't exist.
    Declaration
    public SemanticVersion ImageVersion { get; set; }
    Property Value
    Type Description
    SemanticVersion
    Exceptions
    Type Condition
    FormatException

    Thrown when the version file could not be parsed.

    NodeDefinition

    Returns the associated NodeDefinition metadata when present.

    Declaration
    public NodeDefinition NodeDefinition { get; }
    Property Value
    Type Description
    NodeDefinition
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when there is no associated node definition.

    Role

    Returns the node role, one of the NodeRole identifying what the node does. This may also return null.

    Declaration
    public string Role { get; set; }
    Property Value
    Type Description
    string

    Methods

    AllowSshPasswordLogin(bool)

    Controls whether SSH login using password authentication is enabled for the node.

    Declaration
    public void AllowSshPasswordLogin(bool enabled)
    Parameters
    Type Name Description
    bool enabled

    Pass true to enable login using a password, or false to disable.

    BaseBlacklistFloppy(ISetupController)

    Blacklists the Kernel floppy module so it will be disabled when the machine is rebooted.

    Declaration
    public void BaseBlacklistFloppy(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseConfigureApt(ISetupController, int, bool)

    Configures the APT package manager.

    Declaration
    public void BaseConfigureApt(ISetupController controller, int packageManagerRetries = 5, bool allowPackageManagerIPv6 = false)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    int packageManagerRetries

    Optionally specifies the packager manager retries (defaults to 5).

    bool allowPackageManagerIPv6

    Optionally prevent the package manager from using IPv6 (defaults to false.

    BaseConfigureBashEnvironment(ISetupController)

    Configures the Debian frontend terminal to non-interactive.

    Declaration
    public void BaseConfigureBashEnvironment(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseConfigureDebianFrontend(ISetupController)

    Configures the Debian frontend terminal to non-interactive.

    Declaration
    public void BaseConfigureDebianFrontend(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseConfigureDnsIPv4Preference(ISetupController)

    Ubuntu defaults DNS to prefer IPv6 lookups over IPv4 which can cause performance problems. This method reconfigures DNS to favor IPv4.

    Declaration
    public void BaseConfigureDnsIPv4Preference(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseConfigureOpenSsh(ISetupController)

    Customizes the OpenSSH configuration on a

    Declaration
    public void BaseConfigureOpenSsh(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseCreateKubeFolders(ISetupController)

    Create the node folders required by neoneKUBE.

    Declaration
    public void BaseCreateKubeFolders(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseDisableCloudInit(ISetupController)

    Disables cloud-init.

    Declaration
    public void BaseDisableCloudInit(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseDisableDhcp(ISetupController)

    Disables DHCP.

    Declaration
    public void BaseDisableDhcp(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseDisableSwap(ISetupController)

    Disables the Linux memory swap file.

    Declaration
    public void BaseDisableSwap(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseInitialize(ISetupController, bool, bool)

    Performs low-level initialization of a cluster node.

    Declaration
    public void BaseInitialize(ISetupController controller, bool upgradeLinux = false, bool patchLinux = true)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    bool upgradeLinux

    Optionally upgrade the node's Linux distribution (defaults to false).

    bool patchLinux

    Optionally apply any available Linux security patches (defaults to true).

    BaseInstallNeonInit(ISetupController)

    Installs the neon-init service which is a poor man's cloud-init like service we use to configure the network and credentials for VMs hosted in non-cloud hypervisors.

    Declaration
    public void BaseInstallNeonInit(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    Remarks

    Install and configure the [neon-init] service. This is a simple script that is configured to run as a oneshot systemd service before networking is started. This is currently used to configure the node's static IP address configuration on first boot, so we don't need to rely on DHCP (which may not be available in some environments).

    [neon-init] is intended to run the first time a node is booted after being created from a template. It checks to see if a special ISO with a configuration script named [neon-init.sh] is inserted into the VMs DVD drive and when present, the script will be executed and the [/etc/neon-init/ready] file will be created to indicate that the service no longer needs to do this for subsequent reboots.

    note

    The script won't create the [/etc/neon-init] when the script ISO doesn't exist for debugging purposes.

    BaseInstallPackages(ISetupController)

    Installs the required base image packages.

    Declaration
    public void BaseInstallPackages(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseInstallToolScripts(ISetupController)

    Installs the tool scripts, making them executable.

    note

    Any ".sh" file extensions will be removed for ease-of-use.

    Declaration
    public void BaseInstallToolScripts(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BasePatchLinux(ISetupController)

    Updates Linux by applying just the outstanding security updates.

    Declaration
    public void BasePatchLinux(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseRemovePackages(ISetupController)

    Removes unneeded packages.

    Declaration
    public void BaseRemovePackages(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseRemoveSnap(ISetupController)

    Removes any installed snaps as well as the entire snap infrastructure.

    Declaration
    public void BaseRemoveSnap(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    BaseUpgradeLinuxDistribution(ISetupController)

    Upgrades the Linux distribution on the node.

    Declaration
    public void BaseUpgradeLinuxDistribution(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    Clean(ISetupController)

    Cleans a node by removing unnecessary package manager metadata, cached DHCP information, journald logs... and then fills unreferenced file system blocks with zeros so the disk image will or trims the file system (when possible) so the image will compress better.

    Declaration
    public void Clean(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    Clone()

    Returns a clone of the SSH proxy. This can be useful for situations where you need to be able to perform multiple SSH/SCP operations against the same machine in parallel.

    note

    This does not clone any attached log writer.

    Declaration
    public NodeSshProxy<TMetadata> Clone()
    Returns
    Type Description
    NodeSshProxy<TMetadata>

    The cloned NodeSshProxy<TMetadata>.

    ConfigureEnvironmentVariables(ISetupController)

    Configures the global environment variables that describe the configuration of the server within the cluster.

    Declaration
    public void ConfigureEnvironmentVariables(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    ConfigureJournald(ISetupController)

    Configures journald.

    Declaration
    public void ConfigureJournald(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    ConfigureSshKey(ISetupController)

    Configures a node's host public SSH key during node provisioning.

    Declaration
    public void ConfigureSshKey(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    DisableSnap(ISetupController)

    Disables the snapd service.

    Declaration
    public void DisableSnap(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    GetControlPlaneFiles()

    Returns a dictionary of KubeFileDetails holding the control plane files required to provision a new control plane node in the cluster. This dictionary is keyed by the target file name node the node.

    Declaration
    public Dictionary<string, KubeFileDetails> GetControlPlaneFiles()
    Returns
    Type Description
    Dictionary<string, KubeFileDetails>

    The file dictionary.

    GetIdempotentState(string)

    Indicates whether an idempotent action has been completed.

    Declaration
    public bool GetIdempotentState(string actionId)
    Parameters
    Type Name Description
    string actionId

    The action ID.

    Returns
    Type Description
    bool

    true when the action has already been completed.

    GetLog()

    Returns the current log for the node.

    Declaration
    public NodeLog GetLog()
    Returns
    Type Description
    NodeLog

    A NodeLog.

    GetNtpSources()

    Returns the NTP time sources to be used by the node.

    Declaration
    public string GetNtpSources()
    Returns
    Type Description
    string

    The quoted and space separated list of IP address or DNS hostnames for the node's NTP time sources in priority order.

    Remarks

    The cluster will be configured such that the first control-plane node (by sorted name) will be the primary timesource for the cluster. All other control-plane and worker nodes will be configured to use the first control-plane node by default. Secondary control-plane nodes will be configured to use the external timesource next so any control-plane can automatically assume these duities.

    Worker nodes will be configured to use control-plane node in sorted order but will not be configured to use the external time sources to avoid having large clusters spam the sources.

    The nice thing about this is that the cluster will almost always be closely synchronized with the first control-plane with graceful fallback on node failures.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when there is no associated cluster proxy.

    InstallHelmChartAsync(ISetupController, string, string, string, string, Dictionary<string, object>, string, TimeSpan)

    Installs a prepositioned Helm chart from a control-plane node.

    Declaration
    public Task InstallHelmChartAsync(ISetupController controller, string chartName, string releaseName = null, string @namespace = "default", string prioritySpec = null, Dictionary<string, object> values = null, string progressMessage = null, TimeSpan timeout = default)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    string chartName

    The name of the Helm chart.

    note

    Helm does not allow dashes (-) in chart names but to avoid problems with copy/pasting, we will automatically convert any dashes to underscores before installing the chart. This is also nice because this means that the chart name passed can be the same as the release name in the calling code.

    string releaseName

    Optionally specifies the component release name.

    string namespace

    Optionally specifies the namespace where Kubernetes namespace where the Helm chart should be installed. This defaults to default.

    string prioritySpec

    Optionally specifies the Helm variable and priority class for any pods deployed by the chart. This needs to be specified as: PRIORITYCLASSNAME or VALUENAME=PRIORITYCLASSNAME, where VALUENAME optionally specifies the name of the Helm value and PRIORITYCLASSNAME is one of the priority class names defined by PriorityClass.

    note

    The priority class will saved as the priorityClassName Helm value when no value name is specified.

    Dictionary<string, object> values

    Optionally specifies Helm chart values.

    string progressMessage

    Optionally specifies progress message. This defaults to releaseName.

    TimeSpan timeout

    Optionally specifies the timeout. This defaults to 300 seconds.

    Returns
    Type Description
    Task

    The tracking Task.

    Remarks

    NEONKUBE images prepositions the Helm chart files embedded as resources in the Resources/Helm project folder to cluster node images as the /lib/neonkube/helm/charts.zip archive. This method unzips that file to the same folder (if it hasn't been unzipped already) and then installs the helm chart (if it hasn't already been installed).

    Exceptions
    Type Condition
    KeyNotFoundException

    Thrown if the priority class specified by prioritySpec is not defined by PriorityClass.

    InstallNFS(ISetupController)

    Installs NFS.

    Declaration
    public void InstallNFS(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    InstallProvisionedHelmChart(string, string, string, TimeSpan, List<KeyValuePair<string, object>>)

    Installs one of the Helm charts that was pre-positioned on the node VM image. These can be fond in the Helm with a folder for each chart.

    note

    This command DOES NOT WAIT for the Helm chart to be completely installed and any target services or assets to be running because that does not appear to be reliable. You'll need to explicitly verify that deployment has completed when necessary.

    Declaration
    public void InstallProvisionedHelmChart(string chartName, string releaseName = null, string @namespace = "default", TimeSpan timeout = default, List<KeyValuePair<string, object>> values = null)
    Parameters
    Type Name Description
    string chartName

    The Helm chart folder name.

    string releaseName

    Optional component release name. This defaults to chartName.

    string namespace

    Optional namespace where Kubernetes namespace where the Helm chart should be installed. This defaults to "default".

    TimeSpan timeout

    Optional timeout. This defaults to unlimited.

    List<KeyValuePair<string, object>> values

    Optional Helm chart value overrides.

    InvokeIdempotent(string, Action)

    Invokes a named action on the node if it has never been been performed on the node before.

    Declaration
    public bool InvokeIdempotent(string actionId, Action action)
    Parameters
    Type Name Description
    string actionId

    The node-unique action ID.

    Action action

    The action to be performed.

    Returns
    Type Description
    bool

    true if the action was invoked.

    Remarks

    actionId must uniquely identify the action on the node. This may include letters, digits, dashes and periods as well as one or more forward slashes that can be used to organize idempotent status files into folders.

    This method tracks successful action completion by creating a file on the node at State/ACTION-ID. To ensure idempotency, this method first checks for the existence of this file and returns immediately without invoking the action if it is present.

    InvokeIdempotentAsync(string, Func<Task>)

    Invokes a named action asynchronously on the node if it has never been been performed on the node before.

    Declaration
    public Task<bool> InvokeIdempotentAsync(string actionId, Func<Task> action)
    Parameters
    Type Name Description
    string actionId

    The node-unique action ID.

    Func<Task> action

    The asynchronous action to be performed.

    Returns
    Type Description
    Task<bool>

    true if the action was invoked.

    Remarks

    actionId must uniquely identify the action on the node. This may include letters, digits, dashes and periods as well as one or more forward slashes that can be used to organize idempotent status files into folders.

    This method tracks successful action completion by creating a file on the node at State/ACTION-ID. To ensure idempotency, this method first checks for the existence of this file and returns immediately without invoking the action if it is present.

    LoadImageAsync(NodeImageInfo)

    Method to load specific container image onto the the node.

    Declaration
    public Task LoadImageAsync(NodeImageInfo image)
    Parameters
    Type Name Description
    NodeImageInfo image

    The image.

    Returns
    Type Description
    Task

    The tracking Task.

    Log(string)

    Declaration
    public override void Log(string text)
    Parameters
    Type Name Description
    string text
    Overrides
    LinuxSshProxy.Log(string)

    LogFlush()

    Declaration
    public override void LogFlush()
    Overrides
    LinuxSshProxy.LogFlush()

    LogLine(string)

    Declaration
    public override void LogLine(string text)
    Parameters
    Type Name Description
    string text
    Overrides
    LinuxSshProxy.LogLine(string)

    NodeDisableNeonInit(ISetupController)

    Disables the neon-init service during cluster setup because it is no longer necessary after the node first boots and its credentials and network settings have been configured.

    Declaration
    public void NodeDisableNeonInit(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInitialize(ISetupController)

    Performs low-level node initialization during cluster setup.

    Declaration
    public void NodeInitialize(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInstallCriO(ISetupController, ClusterManifest)

    Installs the CRI-O container runtime.

    Declaration
    public void NodeInstallCriO(ISetupController controller, ClusterManifest clusterManifest)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    ClusterManifest clusterManifest

    The cluster manifest.

    NodeInstallHelm(ISetupController)

    Installs the Helm client.

    Declaration
    public void NodeInstallHelm(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInstallIPVS(ISetupController)

    Installs the necessary packages and configures setup for IPVS.

    Declaration
    public void NodeInstallIPVS(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInstallKubernetes(ISetupController)

    Installs the Kubernetes components: kubeadm, kubectl, and kubelet.

    Declaration
    public void NodeInstallKubernetes(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInstallPodman(ISetupController)

    Installs the podman CLI for managing CRI-O.

    Declaration
    public void NodeInstallPodman(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeInstallTools(ISetupController)

    Installs the NEONKUBE related tools to the Bin folder.

    Declaration
    public void NodeInstallTools(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    NodeLoadImagesAsync(ISetupController, int, int)

    Loads the docker images onto the node. This is used for debug mode only.

    Declaration
    public Task NodeLoadImagesAsync(ISetupController controller, int downloadParallel = 5, int loadParallel = 2)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    int downloadParallel

    The optional limit for parallelism when downloading images from GitHub registry.

    int loadParallel

    The optional limit for parallelism when loading images into the cluster.

    Returns
    Type Description
    Task

    PrepareNode(ISetupController)

    Initializes a near virgin server with the basic capabilities required for a cluster node.

    Declaration
    public void PrepareNode(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    RemoveSwapFile(ISetupController)

    Removes the Linux swap file if present.

    Declaration
    public void RemoveSwapFile(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    SetIdempotentState(string)

    Explicitly indicates that an idempotent action has been completed on the node.

    Declaration
    public void SetIdempotentState(string actionId)
    Parameters
    Type Name Description
    string actionId

    The action ID.

    SetupConfigureNtp(ISetupController)

    Configures NTP and also installs some tool scripts for managing this.

    Declaration
    public void SetupConfigureNtp(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    SetupKubelet(ISetupController)

    Configures the kubelet service.

    Declaration
    public void SetupKubelet(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    Remarks
    note

    Kubelet is installed in NodeInstallKubernetes(ISetupController) when configuring the node image and is then configured for the cluster here.

    SetupNode(ISetupController, ClusterManifest)

    Performs common node configuration.

    Declaration
    public void SetupNode(ISetupController controller, ClusterManifest clusterManifest)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    ClusterManifest clusterManifest

    The cluster manifest.

    SetupPackageProxy(ISetupController)

    Configures cluster package manager caching.

    Declaration
    public void SetupPackageProxy(ISetupController controller)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    UpdateLinux(ISetupController, bool)

    Upgrades the base Linux distribtion, rebooting the node when required.

    Declaration
    public void UpdateLinux(ISetupController controller, bool fullUpgrade)
    Parameters
    Type Name Description
    ISetupController controller

    The setup controller.

    bool fullUpgrade

    Pass true to perform a full distribution upgrade or false to just apply security patches.

    VerifyNodeOS(ISetupController)

    Ensures that the node operating system and version is supported for a NEONKUBE cluster. This faults the node proxy on failure.

    Declaration
    public bool VerifyNodeOS(ISetupController controller = null)
    Parameters
    Type Name Description
    ISetupController controller

    Optional setup controller.

    Returns
    Type Description
    bool

    true if the operation system is supported.

    Implements

    INodeSshProxy

    Extension Methods

    NodeSshProxyExtensions.NodeInstallHelmArchive(ILinuxSshProxy, ISetupController)
    In this article
    Back to top © Copyright 2005-2023 by NEONFORGE LLC