Skip to content

Instantly share code, notes, and snippets.

@krames
Last active December 19, 2015 06:29
Show Gist options
  • Select an option

  • Save krames/5912321 to your computer and use it in GitHub Desktop.

Select an option

Save krames/5912321 to your computer and use it in GitHub Desktop.
service = Fog::Rackspace::LoadBalancers.new
#create load balancer
lb = service.load_balancers.create :name => 'bob-the-balancer',
:protocol => 'HTTP',
:port => 80,
:virtual_ips => [{:type => 'PUBLIC'}],
:nodes => [{:address => '1.1.1.1',
:port => 80,
:condition => 'ENABLED'
}]
#add additional node
lb.nodes.create :address => '1.1.1.2', :port => 80, :condition => 'ENABLED'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment