cityindex/logsearch — pull request #237 by mrdavidlaing (2013-11-22 16:33:08+00:00)
Title: Add --capabilities flag

when doing a `rake deploy_aws_cloudformation_stack` I ran into the following error:

```
A client error (InsufficientCapabilitiesException) occurred: Requires capabilities : [CAPABILITY_IAM]
rake aborted!
Command failed with status (255): [aws cloudformation create-stack --stack-na...]
```

Adding the `---capabilities "CAPABILITY_IAM" flag seemed to fix it.

Full command output:

```
$ rake deploy_aws_cloudformation_stack[logsearch-ppe-`date +%Y%m%d`-mrdavidlaing-test,ci-elasticsearch-development-flow,config/ppe-cluster,composite-ci-r53,"ParameterKey=ElasticsearchEbsSnapshotId;ParameterValue=snap-c66aaed7"]
grep: /proc/cpuinfo: No such file or directory

==> Uploading Templates...
./bin/upload-aws-cloudformation ci-elasticsearch-development-flow logsearch-deploy/logsearch-ppe-20131122-mrdavidlaing-test/template/
composite-ci-r53.template...done
composite-example-standalone.template...done
group-logstash-default.template...done
node-es-ebs-default.template...done
node-es-ephemeral-default.template...done
node-redis-default.template...done
r53-ci-cname.template...done
secgrp-single-default.template...done

==> Generating, Uploading post-script...
( cd config/ppe-cluster && rake generate_post_provision_script ) > post-script-647.sh
aws s3api put-object --bucket ci-elasticsearch-development-flow --key 'logsearch-deploy/logsearch-ppe-20131122-mrdavidlaing-test/post-script.sh' --acl private --body post-script-647.sh
{
"ETag": "\"ccd7d07c0754a71d5e1e5fa33966e8e3\""
}
rm post-script-647.sh

==> Creating Stack...
aws cloudformation create-stack --stack-name logsearch-ppe-20131122-mrdavidlaing-test --template-url 'https://s3.amazonaws.com/ci-elasticsearch-development-flow/logsearch-deploy/logsearch-ppe-20131122-mrdavidlaing-test/template/composite-ci-r53.template' --parameters ParameterKey=S3StackBase,ParameterValue='https://s3.amazonaws.com/ci-elasticsearch-development-flow/logsearch-deploy/logsearch-ppe-20131122-mrdavidlaing-test/template' ParameterKey=InstancePostScript,ParameterValue='. /app/.env && /usr/local/bin/aws s3api get-object --bucket ci-elasticsearch-development-flow --key logsearch-deploy/logsearch-ppe-20131122-mrdavidlaing-test/post-script.sh /tmp/post-script.sh > /dev/null && /bin/bash /tmp/post-script.sh && rm /tmp/post-script.sh' ParameterKey=RepositoryCommit,ParameterValue=29b859fa0337203eac885b4983d49c5bc19cc49b ParameterKey=AlarmTopicArn,ParameterValue=arn:aws:sns:eu-west-1:860900021006:ops-labs-cityindex-com ParameterKey=AvailabilityZone,ParameterValue=eu-west-1a ParameterKey=CidrRange0,ParameterValue=80.169.172.178/32 ParameterKey=CidrRange1,ParameterValue=93.187.19.145/32 ParameterKey=CidrRange2,ParameterValue=94.199.134.2/32 ParameterKey=CidrRange3,ParameterValue=54.208.52.91/32 ParameterKey=ClusterName,ParameterValue=logsearch-ppe ParameterKey=CostCentre,ParameterValue=logsearch-ppe ParameterKey=DisableApiTermination,ParameterValue=true ParameterKey=InstanceProfile,ParameterValue=logsearch-default ParameterKey=KeyName,ParameterValue=logsearch-default ParameterKey=R53ZoneName,ParameterValue=cityindextest5.co.uk. ParameterKey=ElasticsearchEbsSnapshotId,ParameterValue=snap-c66aaed7
A client error (InsufficientCapabilitiesException) occurred: Requires capabilities : [CAPABILITY_IAM]
rake aborted!
Command failed with status (255): [aws cloudformation create-stack --stack-na...]
/Users/mrdavidlaing/Projects/cityindex/logsearch/Rakefile:74:in `block in '
Tasks: TOP => deploy_aws_cloudformation_stack
(See full trace by running task with --trace)
```