2012年1月27日 星期五

opscode/knife-ec2 - GitHub

opscode/knife-ec2 - GitHub:



CONFIGURATION:

In order to communicate with the Amazon's EC2 API you will have to tell Knife about your AWS Access Key and Secret Access Key. The easiest way to accomplish this is to create some entries in your knife.rb file:
knife[:aws_access_key_id]  = "Your AWS Access Key ID" knife[:aws_secret_access_key] = "Your AWS Secret Access Key"
If your knife.rb file will be checked into a SCM system (ie readable by others) you may want to read the values from environment variables:
knife[:aws_access_key_id] = "#{ENV['AWS_ACCESS_KEY_ID']}" knife[:aws_secret_access_key] = "#{ENV['AWS_SECRET_ACCESS_KEY']}"
You also have the option of passing your AWS API Key/Secret into the individual knife subcommands using the -A (or--aws-access-key-id) -K (or --aws-secret-access-key) command options
# provision a new m1.small Ubuntu 10.04 webserver knife ec2 server create -r 'role[webserver]' -I ami-7000f019 -f m1.small -A 'Your AWS Access Key ID' -K "Your AWS Secret Access Key"
Additionally the following options may be set in your `knife.rb`:
  • flavor
  • image
  • availability_zone
  • aws_ssh_key_id
  • region
  • distro
  • template_file

沒有留言:

張貼留言