Skip to content
Neil Prosser edited this page Apr 7, 2016 · 1 revision

Tyrant provides you with three files for your application.

deployment-params.json

This file contains parameters that are used to control the deployment of your application. It should contain a valid JSON object.

Property name Default value Description
alarms nil An array of CloudWatch alarm definitions (a description is provided below).
autoScalingGroupDeletionAttempts 100 The number of times to check when determining whether an auto scaling group has been deleted.
defaultCooldown 10 The number of seconds after a scaling activity before another can start.
desiredCapacity 1 The desired number of instances to run in your Auto Scaling group.
ebsOptimized false Whether the instances launched should be EBS optimized.
healthCheckGracePeriod 600 The number of seconds after an instance launches during which it isn't considered for health checking by the Auto Scaling group.
healthCheckType EC2 The type of healthcheck to use for the Auto Scaling group. If you use an EC2 healthcheck your instances will be kept in the Auto Scaling group if its status checks come back green. If those checks fail the instance will be terminated and another launched in its place. Using an ELB healthcheck will terminate the instance if it becomes unhealthy based on the healthcheck defined on the Load Balancer.
healthy nil An object describing the parameters to use with Healthy (a description is provided below). If this object is present we will assume that you want to use the Healthy service to check the healthy of the instances, which is handy if you don't have a load balancer but still want instances to go out of rotation in ZooKeeper.
instanceHealthyAttempts 50 The number of times to check when determining whether the launched instances are healthy.
instanceType t1.micro The Instance Type to launch. A complete listing of Instance Types can be found in Amazon's documentation.
loadBalancerHealthyAttempts 50 The number of times to check when determining whether the launched instances are healthy according to any load balancers they have been added to.
max 1 The minimum number of instances to run in your Auto Scaling group.
min 1 The maximum number of instances to run in your Auto Scaling group.
pauseAfterDeregisterOldInstances false Whether the deployment should pause after any old instances have been removed from the load balancer.
pauseAfterInstancesHealthy false Whether the deployment should pause after any instances are considered healthy.
pauseAfterLoadBalancersHealthy false Whether the deployment should pause after any load balancers are considered healthy.
policies nil An array of scaling policy definitions (a description is provided below).
scaleDownAfterDeployment false Whether, after deployment, your application should be scaled down to zero instances. Useful if you plan on adding scheduledActions.
scheduledActions nil A map of scheduled action name to the description of the scheduled action itself (a description is provided below).
selectedLoadBalancers nil An array containing the names of the Elastic Load Balancers you want to add your instances to. These Load Balancers will need to be running in the VPC.
selectedSecurityGroups nil An array containing the names (or IDs) of Security Groups to use for your instances. These need to have been created in the VPC.
selectedZones nil An array containing the suffix of the availability zones you want to run your instances in (e.g. ["a" "b"]). These will be appended to the name of the region. During deployment, if not provided, Exploud will use all zones available for the chosen subnetPurpose.
skipInstanceHealthcheck false Whether, during deployment, instance healthchecks should be skipped.
subnetPurpose internal A string representing the purpose of the subnet(s) the application should be deployed to.
subscriptions nil An array of strings listing the Sensu subscriptions which the instance should have.
terminationPolicy Default The policy for determining which instance should be terminated when scaling the Auto Scaling group down. Other values are ClosestToNextInstanceHour, NewestInstance, OldestInstance and OldestLaunchConfiguration. See Amazon's documentation for more details.
volumes nil An object which allows control over the volumes which will be added to each instance (a description is provided below).
Healthy

Additional descriptions are provided in the Healthy README.

Property name Description
path The relative path (from the root resource) which should be used for health checking.
port The port Healthy should use to find the healthcheck resource. If provided, this will override any value provided in the application-properties.json service.port field.
scheme The scheme to use for healthchecking (http or https).
timeout An integer time (in seconds) to wait before deciding that something is unhealthy.
CloudWatch alarms

More detailed descriptions of these properties can be found in the PutMetricAlarmRequest documentation.

A note on alarm actions: these can either be the ARN of an SNS topic or a map which references a scaling policy (for example {"policy":"some-policy-name"}. The policy name referenced must be present in the policies array at the top level of the deployment-params. During deployment the policy will be created and its ARN will be switched into the array in place of the map.

Property name Description
alarmActions An array of actions to take when the alarm transitions into an ALARM state.
alarmDescription A description of the alarm.
alarmName The name of the alarm (must be unique for an auto-scaling group). Will have the name of the auto-scaling group prepended to it.
comparisonOperator One of the comparison operators which determine how to compare the metric value to the threshold.
evaluationPeriods The number of periods (as specified below) over which the metric should be evaluated.
insufficientDataActions An array of actions to take when the alarm transitions into an INSUFFICIENT_DATA state.
metricName The name of the metric to base this alarm on.
namespace The namespace in which to find the metric.
okActions An array of actions to take when the alarm transitions into an OK state.
period The period (in seconds) over which the statistic is applied.
statistic The statistic to apply to the metric value.
threshold The threshold at which to take action (based on the comparison operator).
unit The unit for alarm's associated metric.
Scaling policies

More detailed descriptions of these properties can be found in the PutScalingPolicyRequest documentation.

Property name Description
adjustmentType The type of adjustment this policy will be making.
cooldown The number of seconds to allow between scaling activities.
estimatedInstanceWarmup The number of seconds until a newly-launched instance can contribute to the metrics.
metricAggregationType How to aggregate the metrics (not allowed with SimpleScaling policy type).
minAdjustmentMagnitude The minimum number of instances to scale by (only used with PercentChangeInCapacity
policyName The name of the policy, must be unique to each auto scaling group.
policyType Either SimpleScaling (the default if not present) or StepScaling).
scalingAdjustment The amount to scale by (only used with SimpleScaling policy type).
adjustmentType).
stepAdjustments An array of step adjustment maps (described below) which govern how to scale (required with StepScaling policy type).
Step adjustments

These are probably described in much better detail in the AWS documentation.

Property name Description
metricIntervalLowerBound The lower bound between the alarm threshold and the current metric value for this step (a null value indicates negative infinity).
metricIntervalUpperBound The upper bound between the alarm threshold and the current metric value for this step (a null value indicates positive infinity).
scalingAdjustment How many instances to add.
Scheduled actions
Property name Description
cron A cron schedule indicating when to perform the scaling action.
desiredCapacity Same as desiredCapacity for top-level deployment params.
max Same as max for top-level deployment params.
min Same as min for top-level deployment params.
Volumes
Property name Description
root An EBS description for the root disk (will be mounted as /dev/xvda on HVM instances and /dev/sda1 on paravirtual instances).
instanceStores The number of ephemeral instance-storage devices to add (will default to the number available to the instance type chosen.
blockDevices An array containing EBS descriptions for an EBS devices to be added.
EBS description
Property name Description
deleteOnTermination Whether the device should be deleted when the instance is terminated.
iops The number of IOPS to be assigned to the device (used with io1 type).
size The size (in GB) of the device.
snapshotId The ID of a snapshot to base this device on.
type The type of device to use (gp2 for general purpose SSD, io1 for provisioned IOPS SSD, standard for magnetic disk).

Sample

{
  "healthCheckType" : "ELB",
  "scaleDownAfterDeployment" : true,
  "scheduledActions" : {
    "scale-down" : {
      "cron" : "30 12 * * *",
      "desiredCapacity" : 0,
      "max" : 0,
      "min" : 0
    },
    "scale-up" : {
      "cron" : "30 4 * * *",
      "desiredCapacity" : 1,
      "max" : 1,
      "min" : 1
    }
  },
  "selectedLoadBalancers" : [
    "recommendations"
  ],
  "selectedZones" : [
    "a"
  ],
  "selectedSecurityGroups" : [
    "Brislabs-8080",
    "Brislabs-SSH"
  ],
  "subscriptions" : [
    "healthcheck-8080",
    "java"
  ],
  "volumes" : {
    "root" : {
      "size" : 20
    },
    "instanceStores" : 0,
    "blockDevices" : [
      {
        "size" : 500,
        "type" : "gp2"
      }
    ]
  }
}

application-properties.json

This file contains the properties required for your application to run. It should contain a valid JSON object. There is no special place for the old environment properties in the new deployment tools, they should be specified like any other.

Sample

{
  "logging.level" : "WARN",
  "mongo.host" : "localhost"
}

launch-data.json

This file allows you to specify commands which will be executed (as root) after your properties have been written to /etc/{application}.properties. Tyrant will pre-populate this file with a single command which will create a Beaver configuration file which will ship your application logs via Logstash.

Sample

[
  "first command",
  "second command"
]