Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capistrano-aws-ec2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capistrano-aws-ec2

  • 0.1.8
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Capistrano-AWS-EC2

Your EC2 instances are behind a load balancer and change their addresses way too often? Fear no more! Capistrano-AWS-EC2 allows you to query your EC2 instances and add them to capistrano.

Installation

Add this line to your application's Gemfile:

group :development do
  gem 'capistrano-aws-ec2', require: false
end

And then execute:

$ bundle install

Or install it yourself as:

$ gem install capistrano-aws-ec2

Usage

Add EC2 instances to your capistrano configuration:

# config/deploy/production.rb
ec2_instances.each do |instance|
  # this could be your custom filter logic:
  next unless instance.tags.any? { |tag| tag.key == 'foo' && tag.value == 'bar' }

  server instance.public_ip_address, user: 'deploy', roles: %w[web app db], primary: true
end

Configure AWS:

# config/deploy.rb or per stage
set :aws_region, 'eu-central-1' # falls back to ENV['AWS_REGION'] or ENV['AWS_DEFAULT_REGION']
set :aws_access_key_id, 'my-aws-key' # falls back to ENV["#{stage.upcase}_ACCESS_KEY_ID"] or ENV['AWS_ACCESS_KEY_ID']
set :aws_secret_access_key, 'my-aws-secret' # falls back to ENV["#{stage.upcase}_SECRET_ACCESS_KEY"] || ENV['AWS_SECRET_ACCESS_KEY']

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zyndoras/capistrano-aws-ec2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Capistrano::Aws::Ec2 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 05 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc