Citrix Virtual Apps and Desktops

Connection to Red Hat OpenShift (Preview)

Create and manage connections and resources describes the wizards that create a connection. The following information covers details specific to Red Hat OpenShift.

Note:

Before creating a connection to Red Hat OpenShift, you need to first finish setting up your Red Hat OpenShift. See Red Hat OpenShift virtualization environments

Create a connection

You can create a connection to the Red Hat OpenShift cluster using:

Create a connection using Web Studio

  1. In Web Studio, open Hosting > Add Connection and Resources.
  2. On the Connection page, follow these steps to configure the connection:
    1. Select Create a new connection.
    2. Select Red Hat OpenShift as the Connection type.
    3. In the Connection address field, enter the IP address, hostname, or FQDN of the OpenShift Server.
    4. Enter your service account token and a friendly connection name.
    5. Leave the Zone setting as the default.
  3. Click Next. The connection setup starts.

    If a self-signed certificate is detected, a warning page appears with the certificate thumbprint. To proceed:

    1. Compare the thumbprint with the server’s to verify the certificate’s validity.
    2. If valid, select Trust certificate and click OK to complete the connection setup.

      The certificate is marked as trusted, and the thumbprint is saved for future validation.

Create a connection using PowerShell commands

When you create a connection using PowerShell command, provide the following information:

  • Hosting connection name
  • Cluster API address
  • User name
  • Password (Service account token)
  • SSLThumbprint: This is a CA Cert thumbprint and not the API server thumbprint. The server provides the CA Cert thumbprint if you try to create a hosting connection without specifying the thumbprint.
  • ZoneUid
  1. Open the PowerShell window.
  2. Run add-pssnapin citrix*.
  3. Run the following command to create the hosting connection.

    If you try to create a hosting connection without specifying the thumbprint, then the server provides the CA Cert thumbprint. For example:

    $newItemParameters = @{
    ConnectionType= "Custom"
    PluginId= "OpenShiftPluginFactory"
    HypervisorAddress = "https://api.myopenshiftclusteraddress.mydomain.local:6443"
    Path= "XDHyp:\Connections\OpenShiftConnectionName"
    Persist= $true
    UserName= "__ServiceAccount__"
    Password= "<service account token>"
    ErrorVariable= "connectionError"
     }
     
    & New-Item @newItemParameters
    
    
    $newItemParameters["SSLThumbprint"] = $connectionError[0].ErrorData.Thumbprint
    $connection = & New-Item @newItemParameters
    $brokerConnection = New-BrokerHypervisorConnection -HypHypervisorConnectionUid $connection.HypervisorConnectionUid
    <!--NeedCopy-->
    

Create a hosting unit

A hosting unit represents an environment where VMs are created. To create the hosting unit, you need the following inputs from OpenShift:

  • Namespace
  • StorageClasses
  • Network Attachment Definition

A hosting unit is a namespace-bound. This means that one hosting unit can access only one namespace and manages the VMs under the namespace.

You can create a hosting unit using only PowerShell currently:

When you create a hosting unit using PowerShell command, provide the following information:

  • A hosting connection name
  • A hosting unit name
  • The target namespace name
  • A StorageClasses name
  • A NetworkAttachmentDefinition name
  1. Open the PowerShell window.
  2. Run add-pssnapin citrix*.
  3. Run PowerShell commands to create the hosting unit. For example:

    $HostingConnectionName = "OpenShiftConnectionName"
    $HostingUnitName = "HostingUnitName"
    $TargetNamespace = "TargetNamespaceName"
    $StorageClassToUse = "YourStorageClassesName"
    $NetworkAttachmentDefinition = "YourNetworkAttachmentDefinitionName"
    New-HypStorage `
    -StoragePath @("XDHyp:\Connections\$HostingConnectionName\$TargetNamespace.namespace\$StorageClassToUse.storage") `
    -StorageType "TemporaryStorage"
    New-Item `
    -CustomProperties "" `
    -HypervisorConnectionName $HostingConnectionName `
    -NetworkPath @("XDHyp:\Connections\$HostingConnectionName\$TargetNamespace.namespace\$NetworkAttachmentDefinition.network") `
    -Path @("XDHyp:\HostingUnits\$HostingUnitName") -RootPath "XDHyp:\Connections\$HostingConnectionName\$TargetNamespace.namespace" `
    -StoragePath @("XDHyp:\Connections\$HostingConnectionName\$TargetNamespace.namespace\$StorageClassToUse.storage")
    <!--NeedCopy-->
    

Where to go next

More information

Connection to Red Hat OpenShift (Preview)