1.6 Deploying SGD as a VM Template

An SGD deployment can be provisioned as a virtual machine (VM) template, enabling integration with hypervisor hosts and cloud services.

The process of deploying SGD as a VM template involves the following steps:

  1. Create a VM template for your SGD deployment.

  2. Integrate the VM template with one of the following:

1.6.1 Creating a VM Template for a Basic SGD Server Deployment

Use the following steps to create a VM template for a basic SGD server deployment.

  1. Install the SGD software in a VM.

    For the basic SGD server deployment, install the main SGD component.

    This is described in Section 1.2, “Installing the Main SGD Component”.

    Run the tarantella start command, as instructed by the SGD installation program.

  2. Configure the SGD server.

    Use the Administration Console to create user profile objects, application objects, and application server objects.

    This is described in Chapter 3, Getting Started With SGD.

  3. Stop the SGD server, as follows:

    # tarantella stop
  4. Prepare a VM image for your SGD deployment.

    On the SGD server, run the following command:

    # tarantella prepare image

    Additional options may be required in some cases. See Section 1.6.3, “Examples of Preparing a VM Template Image” for examples of using other command options.

  5. Perform any required modifications to the VM's operating system, to make it ready for use as a template.

  6. Generate the VM template image file.

    See your hypervisor documentation for the steps required to generate a VM template image file.

1.6.2 Creating a VM Template for a Single Host Gateway Deployment

Use the following steps to create a VM template for a single host Gateway deployment.

  1. Install the SGD software in a VM.

    For the single host Gateway deployment, do the following:

    • Install the main SGD component.

      This is described in Section 1.2, “Installing the Main SGD Component”.

      Run the tarantella start command, as instructed by the SGD installation program.

    • Install the SGD Gateway software.

      This is described in Installing the SGD Gateway in the Oracle Secure Global Desktop Gateway Administration Guide.

      Run the /opt/SUNWsgdg/bin/gateway setup command, as instructed by the Gateway installation program.

  2. Configure the SGD server.

    Use the Administration Console to create user profile objects, application objects, and application server objects.

    This is described in Chapter 3, Getting Started With SGD.

  3. Stop all running SGD components.

    • Stop the SGD server:

      # tarantella stop
    • Stop the SGD Gateway:

      # /opt/SUNWsgdg/bin/gateway stop
  4. Configure the SGD Gateway.

    On the SGD server, use the tarantella discover gateway command to discover and configure an SGD Gateway that is installed on the same host as an SGD server.

    # tarantella discover gateway --local
  5. Prepare the VM image for your SGD deployment.

    On the SGD server, run the following command:

    # tarantella prepare image

    Additional options may be required in some cases. See Section 1.6.3, “Examples of Preparing a VM Template Image” for examples of using other command options.

  6. Perform any required modifications to the VM's operating system, to make it ready for use as a template.

  7. Generate the VM template image file.

    See your hypervisor documentation for the steps required to generate a VM template image file.

1.6.3 Examples of Preparing a VM Template Image

To enable SGD to reconfigure automatically following start up of an instance, you must prepare the VM template image. This process involves configuring the parameters that must be provided when the instance is started. Required parameters might include the external DNS hostname of the new instance, for example.

The following examples show how to prepare a VM template image using the tarantella prepare command.

  • To prepare a template image for a basic SGD server deployment:

    # tarantella prepare image
  • To prepare a template image for a single host Gateway deployment:

    # tarantella discover gateway --local
    # tarantella prepare image
  • To prepare an Oracle Compute Cloud Service template image:

    # tarantella prepare image --deployment-script oracle-compute.sh \
      --require-password --require-externalname

    where oracle-compute.sh is the deployment script used for Oracle Compute Cloud Service.

    In this example, the password of the sgdadmin user and the public IP address must be configured for the VM instance.

  • To prepare an Amazon EC2 template image:

    # tarantella prepare image --deployment-script amazon-ec2.sh \
      --require-password

    where amazon-ec2.sh is the deployment script used for Amazon EC2 cloud services.

    In this example, the password of the sgdadmin user must be configured for the VM instance.

1.6.4 Configuring Support for Cloud Services

By default, SGD includes support for the Oracle Compute Cloud Service and the Amazon EC2 service. SGD provides support for these cloud services by using a deployment script.

A deployment script queries the cloud service for the information needed to start an SGD instance. For example, the IP address or hostname of the instance.

The following deployment scripts are provided with SGD:

Deployment scripts are located in the /opt/tarantella/var/deploymentscripts directory on an SGD server.

You specify the required deployment script when you use the tarantella prepare image command to prepare a VM template image. For example:

# tarantella prepare image --deployment-script script-name

where script-name is the name of the deployment script.

1.6.4.1 Creating an SGD Instance in Oracle Compute Cloud Service

Use the following steps to create a VM instance in Oracle Compute Cloud Service.

  1. (Optional) Create a VM template image for your SGD deployment.

    Specify the following options when you prepare the VM image.

    # tarantella prepare image --deployment-script oracle-compute.sh \
    --require-password --require-externalname
  2. (Optional) Upload the VM template image to Oracle Cloud Compute Service.

    In Oracle Compute Cloud Service, this is called a machine image.

  3. Create and configure a new VM instance.

    Note

    For more detailed information on creating and configuring an instance in Oracle Cloud Compute Service, see the Oracle Cloud Compute Service documentation.

    1. Log in to your Oracle Cloud Dashboard and locate the SGD machine image in the image list.

    2. Create a new instance from the SGD machine image.

    3. Configure the instance, as follows:

      • Set the instance sizing, as appropriate for your deployment.

      • Use a pre-defined public IP address for the instance.

      • Set the following Custom Attributes for the instance:

                     {
                
                "public-ip-address": "instance-ip-address",
                  
                "sgdadmin-pwd": "sgdadmin-password"
                    
                    }

        where instance-ip-address is the public IP address you configured for the instance and sgdadmin-password is the password for the sgdadmin user on the SGD server.

        Note

        If you know the hostname for the instance, you can use the "public-hostname" attribute instead of the "public-ip-address" attribute.

    4. Complete the process of creating the instance.

    5. Enable access to the instance on TCP port 443.

  4. Log in to the instance.

    Go to https://public-ip-address/sgd, where public-ip-address is the public IP address of the instance. Log in as the sgdadmin user, using the password specified in the custom attributes for the instance.

    When prompted, change the sgdadmin user password.

1.6.4.2 Creating an SGD Instance in Amazon EC2 Service

Use the following steps to create a VM instance in Amazon EC2 service.

  1. (Optional) Create a VM template image for your SGD deployment.

    Specify the following options when you prepare the VM image.

    # tarantella prepare image --deployment-script amazon-ec2.sh --require-password
  2. (Optional) Upload the VM template image to Amazon Web Services (AWS).

    In AWS, this is called an Amazon machine image (AMI).

  3. Create and configure a VM instance.

    Note

    For more detailed information on creating and configuring an instance in Amazon EC2, see the Amazon EC2 documentation.

    1. Log in to AWS and find the SGD AMI in the AWS Marketplace.

    2. Create a new instance from the SGD AMI.

    3. Configure the instance, as follows:

      • Select an Instance Type, as appropriate for your deployment.

      • Set the following User Data for the instance:

        sgdadmin-pwd=sgdadmin-password

        where sgdadmin-password is the password for the sgdadmin user on the SGD server.

    4. Complete the process of creating the instance.

    5. Enable access to the instance on TCP port 443.

  4. Log in to the instance.

    Go to https://public-hostname/sgd, where public-hostname is the external DNS hostname of the instance. Log in as the sgdadmin user, using the password specified in the user data for the instance.

    When prompted, change the sgdadmin user password.

1.6.5 Troubleshooting Topics for SGD VM Templates

This section includes some basic troubleshooting topics for creating and using SGD VM templates.

Using the SGD Hostname String in an Application Object Name

If you specify the SGD hostname as part of the name of an object, the object name is not updated automatically when a new VM instance is created. The default Tarantella Server application server object which represents the SGD host is updated automatically.

For best results, avoid using the hostname string when naming an SGD object.