cityindex/logsearch — pull request #311 by dpb587 (2014-01-20 21:45:02+00:00)
Title: Naming and EBS Volumes

A large step in our naming and EBS volumes discussions. Here's the summary:

* redis is getting a new ebs volume (to prevent any data loss between deploys)
* services are getting their own directory in `/app/data`
* elasticsearch: `/app/data/{cluster-name}` becomes `/app/data/elasticsearch/{cluster-name}`
* redis: `/app/data/redis-appendonly.aof` becomes `/app/data/redis/appendonly.aof`
* ebs volumes are persistent across stacks and are tag-based (`EnvironmentName`, `ServiceName`, `Name`)
* it's currently reusing stuff I started over the holiday due to very similar logic ([`fs-mount-aws-ebs`](https://raw2.github.com/dpb587/scs-docker-utils/5829bfd507bfd549cf89b82ba87e36dfcbdab817/bin/fs-mount-aws-ebs))
* metric names are changing
* aws cloudwatch - namespace - `logsearch/{cluster-name}` becomes `{environment-name}/{service-name}`
* librato - `$APP_CLUSTER_NAME.$APP_NODE_NAME.$APP_DEPLOY_NAME.$(hostname)` becomes `$APP_ENVIRONMENT_NAME.$APP_SERVICE_NAME.$APP_ROLE_NAME.$(hostname)`
* there's a change in `example/collectd/elasticsearch_logstash.py` which conceptually should have been made on `master`
* a couple environment variables have been superseded:
* dropping `$APP_NODE_NAME` (e.g. `LogstashGroup`, `Redis`)
* dropping `$APP_DEPLOY_NAME` (e.g. `{ "Ref" : "AWS::StackName" }`)
* the `deploy_aws_cloudformation_stack` task has been changed with simplified arguments and more dependency on the slightly-changed `cloudformation.json` config file (see internal PR)

Upon first deploy, we'll need to do the following before switching CNAMEs and getting data:

* manually move the elasticsearch data directory on the EBS volume
* update the librato instruments to search based on the new naming conventions

These changes should not affect the service and functionality that instances provide each other nor any functionality changes on the frontend (aka, backend-only changes, nothing affecting frontend).