RubyGems Navigation menu

holepunch 1.0.0

# holepunch [![Build Status](https://travis-ci.org/undeadlabs/holepunch.svg?branch=master)](https://travis-ci.org/undeadlabs/holepunch) Holepunch manages AWS EC2 security groups in a declarative way through a DSL. ## Requirements - Ruby 1.9.3 or newer. ## Installation ```bash gem install holepunch ``` or in your Gemfile ```ruby gem 'holepunch' ``` ## Basic Configuration You need to provide your AWS security credentials and a region. These can be provided as the command-line options, or you can use the standard AWS environment variables: ```bash export AWS_ACCESS_KEY_ID='...' export AWS_SECRET_ACCESS_KEY='...' export AWS_REGION='us-west-2' ``` ## The SecurityGroups file Specify your security groups in a `SecurityGroups` file in your project's root. Declare security groups that you need and the ingresses you want to expose. You can add ingresses using `tcp`, `udp`, and `ping`. For each ingress you can list allowed hosts using group names or CIDR notation. ```ruby group 'web' do desc 'Web servers' tcp 80 end group 'db' do desc 'database servers' tcp 5432, 'web' end group 'log' do desc 'log server' tcp 9999, 'web', 'db', '10.1.0.0/16' end ``` An environment can be specified which is available through the `env` variable. This allows you to have custom security groups per server environment. ```ruby group "web-#{env}" group "db-#{env}" do tcp 5432, "web-#{env}" end ``` Your application may depend on security groups defined by other services. Ensure they exist using the `depends` method. ```ruby depends 'my-other-service' group 'my-service' do udp 9999, 'my-other-service' end ``` You may specify port ranges for `tcp` and `udp` using the range operator. ```ruby group 'my-service' do udp 5000..9999, '0.0.0.0/0' end ``` ## Usage Simply navigate to the directory containing your `SecurityGroups` file and run `holepunch`. ``` $ holepunch ``` If you need to specify an environment: ``` $ holepunch -e live ``` ## Testing You can run the unit tests by simply running rspec. ``` $ rspec ``` By default the integration tests with EC2 are not run. You may run them with: ``` $ rspec -t integration ``` ## Authors - Ben Scott (gamepoet@gmail.com) - Pat Wyatt (pat@codeofhonor.com) ## License Copyright 2014 Undead Labs, LLC. Licensed under the MIT License: http://opensource.org/licenses/MIT

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 1.3.0 - January 27, 2015 (10.0 KB)
  2. 1.2.0 - July 08, 2014 (10.0 KB)
  3. 1.1.0 - July 01, 2014 (10.0 KB)
  4. 1.0.1 - June 16, 2014 (9.5 KB)
  5. 1.0.0 - June 13, 2014 (9.5 KB)

Runtime 依赖 (1):

aws-sdk ~> 1.32

Development 依赖 (2):

rake >= 0.8.7
rspec ~> 3.0

业主:

作者:

  • Ben Scott, Pat Wyatt

SHA 256 校验和:

efc7f146362a5bedd09570e6181c84fce4ee5751cddb867afcb9530b25d2262a

下载总量 13,377

这个版本 2,526

许可:

MIT

需要的 Ruby 版本: >= 1.9.3

链接: