Follow these steps to download and deploy the Horizon Cloud Connector appliance for a pod deployment that uses the federated architecture with VMC on AWS. In the federated architecture, you must deploy Horizon Cloud Connector into the native Amazon Elastic Computer Cloud (EC2) infrastructure within your pod's environment.
Important: Use this page solely when you have access to a first-gen tenant environment in the first-gen control plane. As described in KB-92424, the first-gen control plane has reached end of availability (EOA). See that article for details.
For background information on Horizon pod deployment architectures, see First-Gen Tenants - Horizon Pod Deployment Architectures with First-Gen Horizon Cloud.
The following is a high-level overview of the steps required to deploy Horizon Cloud Connector into the native Amazon EC2 infrastructure within your pod's environment.
- Download the Horizon Cloud Connector file in VMDK format.
- Create an Amazon Simple Storage Service (S3) bucket on Amazon EC2 and upload the appliance VMDK file to that bucket.
- Create a custom image from the uploaded VMDK file.
- Create the Horizon Cloud Connector virtual machine (VM) instance from the custom image.
Important: When deploying the Horizon Cloud Connector into the native Amazon EC2 infrastructure, the following Horizon Cloud services are deactivated by default. After deploying the appliance, you can optionally manually activate one of more of these services.
- Cloud Monitoring Service
- Cloud Broker Client Service
- Image Locality Service
Prerequisites
- Verify that you have met the connector-related prerequisites described in First-Gen Tenants - Horizon Pod and Horizon Cloud Connector - Preparing to Onboard to First-Gen Control Plane Services.
- Verify that you have met the DNS, ports, and protocols requirements for using Horizon Cloud Connector to pair a Horizon pod with Horizon Cloud.
- The Horizon Cloud Connector virtual appliance must reach the Internet to talk to the Horizon Cloud control plane. If your environment requires use of a proxy server and proxy configuration for deployed appliances to reach the Internet, verify that you have reviewed the proxy-related information, known limitations, and known issues when using proxy settings with the Horizon Cloud Connector appliance. See the proxy-related information in First-Gen Tenants - Horizon Pod and Horizon Cloud Connector - Preparing to Onboard to First-Gen Control Plane Services, Horizon Cloud Connector Known Considerations, and Modifying Proxy Settings for Horizon Cloud Connector 1.6.
- You must use the AWS command-line for many of the steps. However, you can perform some of the deployment steps using either the AWS Management Console or the AWS Command Line Interface (CLI). For detailed information about working with an Amazon EC2 environment, see the Amazon Elastic Compute Cloud documentation at https://docs.aws.amazon.com/ec2/index.html. The steps that follow often suggest the specific type of Amazon Elastic Compute Cloud documentation to reference.
Procedure
-
Download the Horizon Cloud Connector disk image using the link provided in your subscription email.
Note: To support deployment of the appliance into an Amazon EC2 environment, you must download version 2.0 or later of the Horizon Cloud Connector disk image.
The Horizon Cloud Connector disk image is available as a VMDK file after you log in to Customer Connect using your Customer Connect account credentials. Download the VMDK file to your local system.
Before uploading the disk image file to your Amazon EC2 environment, you must first create an Amazon S3 bucket.
-
Create an Amazon S3 bucket in your Amazon EC2 environment. For detailed instructions, refer to the Amazon Elastic Compute Cloud documentation.
-
Upload the downloaded VMDK file to your Amazon S3 bucket. You can perform this step using either the AWS Management Console or the AWS command-line interface (CLI).
-
(AWS Management Console) Log in to the AWS Management Console for your Amazon EC2 environment. Go to the S3 service, select the bucket that you created earlier, and upload the VMDK file to that bucket.
-
(AWS CLI) Access the AWS CLI and run the following command.
aws s3 cp <file-path-to-VMDK-file> <S3URI>See the Amazon Elastic Compute Cloud documentation for details about running the
cpcommand.
In the AWS Management Console, the VMDK file is listed in the Objects tab.
-
-
Create a service role and a policy and attach the policy to the role.
-
Create the first of three new JSON files required for this procedure.
The purpose of this particular JSON file is to store the service-role information. Name the file as you wish. In this procedure, the example filename for this file is
trust-policy.json. -
Create a service role with a name of your choice and store the role information in the new JSON file.
For example, using the CLI, run a command such as the following.
The following command is a generic example.
aws iam create-role --role-name <role-name> --assume-role-policy-document <file-path>The following example command replaces the placeholder
with the specific example vmimportand the placeholderwith the specific example trust-policy.json.aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.jsonSee the Amazon Elastic Compute Cloud documentation for details about running the
create-rolecommand.The following text is as an example of the contents of the JSON file after you run the preceding command.
{ "Version":"2012-10-17", "Statement":[ { "Sid":"", "Effect":"Allow", "Principal":{ "Service":"vmie.amazonaws.com" }, "Action":"sts:AssumeRole", "Condition":{ "StringEquals":{ "sts:ExternalId":"vmimport" } } } ] } -
Create the second of three new JSON files required for this procedure.
Provide the name of bucket name in which you will upload the VMDK file, such as
, the name used in the example that follows. The purpose of this particular JSON file is to attach a new policy with the new role. Name the file as you wish. In this procedure, the example filename for this file is
role-policy.json.The following text is as an example of the contents of the example
role-policy.jsonfile.{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource":[ "arn:aws:s3:::<bucket-name>" ] }, { "Effect":"Allow", "Action":[ "s3:GetObject" ], "Resource":[ "arn:aws:s3:::<bucket-name>/*" ] }, { "Effect":"Allow", "Action":[ "ec2:ModifySnapshotAttribute", "ec2:CopySnapshot", "ec2:RegisterImage", "ec2:Describe*" ], "Resource":"*" } ] } -
Create a policy, attach it to the new role, and store them in the newly created JSON file.
For example, using the CLI, run a command such as the following.
The following command is a generic example.
aws iam put-role-policy --role-name <role-name> --policy-name <policy-name> --policy-document <file-path>The following specific example replaces the placeholder
with a specific example of a policy named vmimport, the placeholderwith the specific example of the previously named role, also named vmimport, and the placeholderwith the specific example of the previously named JSON file, role-policy.json.aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.jsonSee the Amazon Elastic Compute Cloud documentation for details about running the
put-role-policycommand.
-
-
Import a snapshot from the imported VMDK file.
-
Create the third of three new JSON files required for this procedure.
Include the following information in the file.
- The bucket name, such as
, which is used in the example that follows. - The filename of the VMDK file that you uploaded to your Amazon S3 bucket, such as
, which is used in the example that follows. The purpose of this particular JSON file is to store the snapshot of the imported VMDK file. Name the file as you wish. In this procedure, the example filename for this file is container.json.
The following text is an example of the contents of the
container.jsonfile.{ "Description": "Adapter-VM", "Format": "vmdk", "UserBucket": { "S3Bucket": "<bucket-name>", "S3Key": "<vmdk-file-name-uploaded-to-S3>" } } - The bucket name, such as
-
Run the command to import the snapshot from the imported VMDK file to the newly created JSON file.
Using the CLI, run the following type of command.
aws ec2 import-snapshot --role-name <role-name> --description <description> --disk-container <file-path>See the Amazon Elastic Compute Cloud documentation for details about running the
import-snapshotcommand.The following command is a specific example of the
import-snapshotcommand, where therole-nameparameter is optional and not used, the description is"Adapter-VM", and the container filename iscontainer.json.aws ec2 import-snapshot --description "Adapter-VM" --disk-container file://container.jsonThe
import-snapshotcommand can take several minutes to complete. However, after you run the command, the command creates output, which includes anImportTaskIdline that you can use to track the progress of the task. The following output is an example.{ "ImportTaskId": "import-snap-05b4c84af4xxxxxxx", "Description": "Adapter-VM", "SnapshotTaskDetail": { "StatusMessage": "pending", "UserBucket": { "S3Bucket": "awsbucket", "S3Key": "horizon-cloud-connector-2.0.0.0-18191154_OVF10-disk1.vmdk" }, "Progress": "0", "Status": "active", "Description": "Adapter-VM", "DiskImageSize": 0.0 } } -
Take note of the
ImportTaskIdvalue in theimport-snapshotcommand output.
-
-
To track the progress of the
import-snapshottask and obtain the snapshot ID, run the following command.aws ec2 describe-import-snapshot-tasks --import-task-ids <import-task-id>Replace the
placeholder with the value listed in the import-snapshotcommand output. The example value listed in the preceding example output isimport-snap-05b4c84af4xxxxxxx. See the Amazon Elastic Compute Cloud documentation for details about running thedescribe-import-snapshot-taskscommand.The
describe-import-snapshot-taskscommand provides output that indicates the progress of theimport-snapshottask and, when the task is complete, provides the snapshot ID, which is required to register the image. For example."Progress": "43". A line in the output such as this line indicates the percentage of progress for theimport-snapshottask. In this example, the task is 43% complete."Status": "completed". A line in the output such as this line indicates that theimport-snapshottask is complete."SnapshotId": "snap-06d42e043bxxxxxxx". A line in the output such as this line is included when the task is complete. For this example, the snapshot ID issnap-06d42e043bxxxxxxx.
-
Take note of the snapshot ID from the
describe-import-snapshot-taskscommand output. -
To register the snapshot image, run the
register-imagecommand.aws ec2 register-image --region us-west-2 --name <image-name> --architecture x86_64 --root-device-name '/dev/sda1' --virtualization-type hvm --ena-support --block-device-mappings DeviceName=/dev/sda1,Ebs={SnapshotId=<SnapshotId>}Where you must provide responses specific to your deployment for each option, such as the
--region,--architecture, and others. See the Amazon Elastic Compute Cloud documentation for details about running theregister-imagecommand.The following information is specific to the
--nameoption and theSnapshotIdparameter.--name- provide a name for the image according to the constraints for the string.SnapshotId- provide the snapshot ID from thedescribe-import-snapshot-taskscommand output. Theregister-imagecommand provides output that includes the ID of the Amazon Machine Image (AMI). The following example is a typicalregister-imageoutput.
{ "ImageId": "ami-0721ee000321c4685" }The AMI indicated in the
register-imagecommand output also appears in the AWS Management Console among the list of AMIs. -
To support the creation and configuration of the Horizon Cloud Connector AMI instance, prepare a startup script similar to the following example.
Note: For Horizon Cloud Connector version 2.4.1 and earlier 2.x versions, the
configure-adapter.pyfile is located in the deployed Horizon Cloud Connector appliance in abindirectory within the/opt/directory structure. In the sample below, substitute the actual directory path you see in your deployment for the directory-path in the following example.#! /bin/bash /usr/bin/python3 /directory-path/configure-adapter.py --sshEnable sudo useradd ccadmin echo -e 'password\npassword' | passwd ccadmin echo 'cs_ip cs_fqdn' >> /etc/hostsIn the example, the script supports the following configurations:
- Enablement of SSH access to the Horizon Cloud Connector appliance.
- Creation of a
ccadminuser account on the appliance with the defined password (password). Ensure that you define a strong password. Strong passwords are at least 8 characters and must include one or more numbers, upper and lower case letters, and special characters. - Resolution of the Connection Server host name (cs_fqdn) to the Connection Server IP address (cs_ip). You must add this script to the user-data in the next step where you launch the Horizon Cloud Connector AMI instance.
-
Launch the AMI instance for Horizon Cloud Connector.
Important: To ensure that the instance provides sufficient capabilities, use model c5.2xlarge or greater.
You can launch an instance using the AWS Management Console or the CLI. In either case, use the ID of the Amazon Machine Image (AMI) provided in the
register-imagecommand output and add the startup script that you prepared in the previous step to the user-data.Important: You must add the startup script at this time because the user-data is only executed at the first boot sequence of the AMI instance.
To use the CLI, see the Amazon Elastic Compute Cloud documentation for details about running the
run-instancescommand.To use the AWS Management Console, see the Amazon Elastic Compute Cloud documentation for details, such as for launching an instance using the launch instance wizard.
If you choose to launch the instance using the AWS Management Console, locate the new AMI by the Image ID, select the AMI, and click Launch. You can then continue through the wizard providing the specifics for your deployment.
-
After the Horizon Cloud Connector AMI starts up, edit the configuration of the AMI instance and remove the startup script.
What to do next
Continue with the pod onboarding workflow by following the steps in First-Gen Tenants - Verify the Horizon Pod and Virtual Appliance Are Ready to Be Paired with First-Gen Horizon Control Plane. Then proceed to First-Gen Tenants - Complete Pairing the Horizon Pod with First-Gen Horizon Cloud Using the Horizon Cloud Connector Configuration Portal.
Note: When you want to activate one or more of the cloud-plane services that are deactivated by default, you should activate them prior to completing the pairing of the pod with the cloud plane. See First-Gen Tenants - Manually Activate First-Gen Horizon Cloud Control Plane Services for Horizon Cloud Connector on Native Amazon EC2.
Was this page helpful?