Preconfiguring the Traffic Manager at Launch Time
EC2 allows you to create new instances quickly, for example, to respond to a sudden increase in website traffic. To take advantage of this ability, you can preconfigure all the settings requested by the Initial Configuration Wizard when you launch the instance, avoiding the need to go through the wizard manually. You can also instruct the new instance to join an existing Traffic Manager cluster automatically after it starts up.
Specify your configuration settings as parameter=value pairs in the user data field. Enter each configuration pair, separated by whitespace, to correspond to the different questions in the wizard.
The following table lists the basic wizard parameters:
Parameter |
Value or Description |
password |
The admin user password |
accept_license |
Accept the Traffic Manager End User License Agreement? (y/n) |
timezone |
The Traffic Manager instance timezone (for example, Europe/London) Defaults to America/Los Angeles |
If you do not provide values for at least the password and accept_license parameters, the Initial Configuration Wizard prompts you to set the missing parameters manually.
The following table lists parameters used for cluster joining:
Parameter |
Value or Description |
cluster_host |
The private DNS name of a member of an existing cluster that the new Traffic Manager should join. |
user |
The admin username for the cluster (defaults to admin). |
password |
The admin password for the cluster. |
join_tips |
Should the new Traffic Manager host Traffic IP addresses when it joins the cluster? (y/n, default n) For clusters with only one Traffic IP group configured in the cluster, enter Y. For clusters with multiple Traffic IP groups configured in the cluster, enter N and manually configure the Traffic IP group(s) that this new instance should join. For Amazon VPC instances, setting join_tips=y is ignored if the instance does not have a secondary IP address assigned while launching. |
cluster_fingerprint |
Specifies the SHA-1 fingerprint of the machine you entered for the cluster_host parameter. You can accept any fingerprint by entering unsafe as this key’s value. It is required if using cluster_host. |
cluster_location |
Specifies the configuration location this instance should join when clustering. If the location does not exist, it is created. For more details on configuration locations, see the Pulse Secure Virtual Traffic Manager: User’s Guide. |
The following table lists parameters used for Pulse Secure Services Director self-registration:
Parameter |
Value or Description |
sd_address |
The address to which this Traffic Manager instance sends a Services Director self-registration request at startup. Use the format <IP address/FQDN>:<REST API port> |
sd_cert |
The PEM-encoded certificate of the Services Director’s REST API server, with begin/end comment lines removed, and newlines removed. |
registration_policy |
The identifier of an auto-registration policy resource in the Services Director that can be used to automatically accept a registration request from this Traffic Manager instance. |
owner |
The identifier of an Owner resource to associate with the registration request from this Traffic Manager instance. |
owner_secret |
The secret token associated with the Owner, if one is provided. If an owner is specified then, by default, the Services Director requires that the matching secret is also included for a registration request to be auto-accepted. This behavior can be globally toggled on or off in the Services Director. |
The Traffic Manager additionally supports the use of CloudFormation reference templates in Amazon EC2. To use reference templates, specify your CloudFormation stack, resource, and region in the user data field using the parameter names listed in the following table:
Parameter |
Value or Description |
cfn_stack |
The CloudFormation stack name. |
cfn_resource |
A CloudFormation logical resource ID. |
cfn_region |
The CloudFormation region. |
The Cloud Formation cfn-init script runs when the Traffic Manager instance boots up for the first time. The parameters you specify form the arguments provided to the script: “-s <cfn_stack>”, “-r <cfn_resource>”, and “--region <cfn_region>”.
To set user-data with the ec2-run-instances command line tool, use one of the following methods:
•as a string on the command line, using the --user-data argument
•in a file, passed using the --user-data-file argument
Graphical tools, such as ElasticFox, typically provide a text box in the new instance launch window, into which you can paste the configuration data. For more details, see your management tool's documentation.