Top Level Namespace

Defined Under Namespace

Modules: ApplicationHelper, CartsHelper, Commands, CommunicartMailerHelper, ErrorsHelper, Exporter, Ncr, PropMixin, TimeHelper Classes: ApiToken, ApplicationController, Approval, ApprovalGroup, ApprovalGroupError, ApprovalGroupsController, ApproverComment, AuthenticationError, Cart, CartDecorator, CartItem, CartItemTrait, CartsController, Comment, CommentsController, CommunicartMailer, CommunicartsController, Dispatcher, ErrorsController, ErrorsDecorator, HomeController, LinearDispatcher, MailPreview, NcrDispatcher, OverlayController, ParallelDispatcher, Property, Settings, User, UserRole

Instance Method Summary collapse

Instance Method Details

#asg_server(name) ⇒ Object


11
12
13
14
15
16
17
18
# File 'lib/capistrano/server_with_nat.rb', line 11

def asg_server(name)
  nat = primary(:nat)
  ec2_tagged('Name' => name).each do |asg_ip|
    server asg_ip, user: 'ubuntu', roles: %w{app}, ssh_options: {
      proxy: Net::SSH::Proxy::Command.new("ssh #{nat.user}@#{nat.hostname} -W %h:%p")
    }
  end
end

#cloud_cutter_env(cc_env) ⇒ Object


20
21
22
23
# File 'lib/capistrano/server_with_nat.rb', line 20

def cloud_cutter_env(cc_env)
  nat_server "cf-cap-#{cc_env}-nat"
  asg_server "cf-cap-#{cc_env}-asg"
end

#nat_server(name) ⇒ Object


5
6
7
8
9
# File 'lib/capistrano/server_with_nat.rb', line 5

def nat_server(name)
  ec2_tagged('Name' => name).each do |ip|
    server ip, user: 'ec2-user', roles: %w{nat}
  end
end