-
-
Save Aslan/364882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Completely untested. | |
gem_package "amazon-ec2" | |
aws = search("aws", "main") | |
Gem.clear_paths | |
ruby_block do "register_with_elb" do | |
do | |
require 'amazon-ec2' | |
AWS::Base.initialize(:access_key_id => aws['aws_access_key_id'], :secret_access_key => aws['aws_secret_access_key']) | |
AWS::ELB::Base.register_instances_with_load_balancer(:load_balancer_name => "name_of_load_balancer") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife data bag show aws main | |
{ | |
"id": "main", | |
"ec2_private_key": "private key as a string", | |
"ec2_cert": "certificate as a string", | |
"aws_account_id": "", | |
"aws_secret_access_key": "", | |
"aws_access_key_id": "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment