Skip to content

Commit

Permalink
ReadMe and gem description update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aftab-Akram committed Sep 18, 2021
1 parent 1c92784 commit 1c95b52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Gem Version](https://badge.fury.io/rb/capistrano3-asg-ami.png)](http://badge.fury.io/rb/capistrano3-asg-ami)
# capistrano3-asg-ami
Capistrano 3 plugin for Updating Lanuch Template AMI with autoscale group first healthy instance.
Capistrano 3 plugin for updating AWS [Launch Template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) with [autoscale group](https://aws.amazon.com/about-aws/whats-new/2018/01/introducing-aws-auto-scaling/) first healthy instance.

## Requirements

Expand Down Expand Up @@ -31,7 +31,7 @@ require 'capistrano/autoscaling'

## Usage

Set credentials with AmazonEC2FullAccess permission and in the capistrano deploy script / stage files add the following lines
Create [IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) with [AmazonEC2FullAccess](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_ec2_region.html) permission and Set credentials in the capistrano deploy script / stage files add the following lines

```ruby
set :aws_region, 'ap-northeast-1'
Expand All @@ -57,19 +57,18 @@ And to update autoscale group launch template manually
```ruby
cap [stage] autoscaling:update_ami
```

i.e [stage] can be staging or production

## How this works

1- Fetch only running instances that have an auto scaling group name you specified
2- Create AMI with first healthy instance
3- Tag AMI with autoscale group name
4- Wait for AMI to be available for use
5- Update Launch template with update AMI
6- Deleting stale images base on (aws_keep_prev_no_of_ami) variable
1. Fetch only running instances that have an auto scaling group name you specified
2. Create AMI with first healthy instance
3. Tag AMI with autoscale group name
4. Wait for AMI to be available for use
5. Update Launch template with update AMI
6. Deleting stale images base on (aws_keep_prev_no_of_ami) variable
if not set will only keep the latest one
and delete the other AMI tagged with autoscale group name
**


## Contributing
Expand Down
2 changes: 1 addition & 1 deletion capistrano3-asg-ami.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.authors = ['Aftab Akram']
spec.email = ['[email protected]']
spec.summary = %q{Deploy to AWS Auto Scaling group.}
spec.description = %q{Capistrano 3 plugin for Updating Lanuch Template AMI with autoscale group first healthy instance}
spec.description = %q{Capistrano 3 plugin for updating AWS Launch Template AMI with autoscale group first healthy instance.}
spec.homepage = 'https://github.com/Aftab-Akram/capistrano3-asg-ami'
spec.license = 'MIT'

Expand Down

0 comments on commit 1c95b52

Please sign in to comment.