Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMyIP ¶
GetMyIP returns the IP address string of the user by talking to https://checkip.azurewebsites.net/
Types ¶
type AzureProvider ¶
type AzureProvider struct { // IPName is the resource name provided by the user if the installer doesn't want to create one. IpName string // NicName is the resource name provided by the user if the installer doesn't want to create one. NicName string // NsgName is the resource name provided by the user if the installer doesn't want to create one. NsgName string // contains filtered or unexported fields }
AzureProvider holds azure platform specific information required for creating/deleting the windows node.
func New ¶
func New(openShiftClient *client.OpenShift, credentialPath, resourceTrackerDir, imageID, instanceType string) (*AzureProvider, error)
New returns azure interface for performing necessary functions related to creating or destroying an instance. It takes in kubeconfig of an existing OpenShift cluster and an azure specific credential file. The resourceTrackerDir is where the `windows-node-installer.json` file which contains IDs of created instance and security group will be created.
func (*AzureProvider) CreateWindowsVM ¶
func (az *AzureProvider) CreateWindowsVM() (types.WindowsVM, error)
CreateWindowsVM takes in imageId, instanceType and sshKey name to create Windows instance under the same resourceGroupName as the existing OpenShift. The returned Windows VM object from this method will provide access to the instance via Winrm, SSH TODO: If it fails during the instance creation process it has to delete the resources created untill that step.
func (*AzureProvider) CreateWindowsVMWithPrivateSubnet ¶
func (az *AzureProvider) CreateWindowsVMWithPrivateSubnet() (windowsVM types.WindowsVM, err error)
CreateWindowsVMWithPrivateSubnet creates a WindowsVM within private subnet. TODO: As of now, this is a dummy implementation. If we don't move to the machine-api quickly come back and implement this
func (*AzureProvider) DestroyWindowsVM ¶
func (az *AzureProvider) DestroyWindowsVM(vmName string) error
DestroyWindowsVMWithResources destroys the Windows VMs along with all the errors associated with it.
func (*AzureProvider) DestroyWindowsVMs ¶
func (az *AzureProvider) DestroyWindowsVMs() error
DestroyWindowsVMs destroys all the resources created by the CreateWindows method.