Class HostingLoader
Cluster hosting utilities.
Implements
Namespace: Neon.Kube.Hosting
Assembly: Neon.Kube.Hosting.dll
Syntax
public class HostingLoader : IHostingLoader
Properties
IsIntialized
Returns true
when the loader has already been initialized.
Declaration
public static bool IsIntialized { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
GetManager(HostingEnvironment)
Returns the HostingManager for an environment that can be used for validating the hosting related options.
Declaration
public HostingManager GetManager(HostingEnvironment environment)
Parameters
Type | Name | Description |
---|---|---|
HostingEnvironment | environment | The target hosting environment. |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
GetManager(ClusterProxy, bool, string)
Returns the HostingManager for provisioning a cluster using the default node image for the cluster environment.
Declaration
public HostingManager GetManager(ClusterProxy cluster, bool cloudMarketplace, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
string | logFolder |
The folder where log files are to be written, otherwise or noteSpecific hosting managers may choose to ignore this when it doesn't make sense. |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
GetManagerWithNodeImageFile(ClusterProxy, string, string)
Returns the HostingManager for provisioning a cluster from an already downloaded image file already downloaded. This cannot be used for cloud environments.
Declaration
public HostingManager GetManagerWithNodeImageFile(ClusterProxy cluster, string nodeImagePath, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
string | nodeImagePath | Specifies the path to the local node image file. |
string | logFolder | The folder where log files are to be written, otherwise or |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
GetManagerWithNodeImageUri(ClusterProxy, bool, string, string)
Returns the HostingManager for provisioning a cluster by downloading a node image from a URI that references a single image file or a multi-part DownloadManifest image.
Declaration
public HostingManager GetManagerWithNodeImageUri(ClusterProxy cluster, bool cloudMarketplace, string nodeImageUri, string logFolder = null)
Parameters
Type | Name | Description |
---|---|---|
ClusterProxy | cluster | The cluster being managed. |
bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
string | nodeImageUri | For on-premise hosting environments, this specifies the node image URI that
references a single image file or a multi-part DownloadManifest image.
This is ignored for cloud environments and must be passed as |
string | logFolder | The folder where log files are to be written, otherwise or |
Returns
Type | Description |
---|---|
HostingManager | The HostingManager or |
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if the multiple managers implement support for the same hosting environment. |
Initialize()
Loads the known cluster hosting manager assemblies so they'll be available to GetManagerWithNodeImageUri(ClusterProxy, bool, string, string), and Validate(ClusterDefinition) when they are called.
note
It is safe to call this multiple times because any calls after the first will be ignored.
Declaration
public static void Initialize()
Exceptions
Type | Condition |
---|---|
NeonKubeException | Thrown if multiple managers implement support for the same hosting environment. |
IsCloudEnvironment(HostingEnvironment)
Determines whether a hosting environment is hosted in the cloud.
Declaration
public bool IsCloudEnvironment(HostingEnvironment environment)
Parameters
Type | Name | Description |
---|---|---|
HostingEnvironment | environment | The target hosting environment. |
Returns
Type | Description |
---|---|
bool |
|