[chef] Re: chef-provisioning - setting url-endpoint for the fog/AWS driver.


Chronological Thread 
  • From: Christine Draper < >
  • To:
  • Subject: [chef] Re: chef-provisioning - setting url-endpoint for the fog/AWS driver.
  • Date: Thu, 9 Apr 2015 21:46:28 -0500

So think you would do:

with_driver 'fog:AWS', :compute_options => { :ec2_endpoint => 'your_endpoint' }

But I haven't tested this.

Regards,
Christine Draper

On Thu, Apr 9, 2015 at 1:51 PM, Stefán Freyr Stefánsson < " target="_blank"> > wrote:

Hi.


We have a private cloud solution that has an EC2 compatable API. I'm trying to configure chef-provisioning to use that instead of AWS.


What I'm having problems with is where the configuration is supposed to go to set the endpoint-url for the EC2 API.


I have found the line in the code that does this:
https://github.com/chef/chef-provisioning-fog/blob/c8df0ed605dbb2cf80ddb7c384a79378d3b6d5ab/lib/chef/provisioning/fog_driver/providers/aws.rb#L225


...but that seems to be using something called compute_options that I'm not sure where to put?


The configuration I currently have for configuring the Fog/AWS driver is this:

require 'chef/provisioning/fog_driver/driver'

with_machine_options({
  :bootstrap_options => {
    :flavor_id => 't2.medium',
   },
  :ssh_username => 'centos',
  :image_id => 'ami-96a818fe'
})

so I'm not sure where to put the "ec2_endpoint" configuration in order to point it towards our own EC2 API instead of Amazon.


I know this is a bit silly, but I'm just not quite getting the configuration syntax of chef. So sorry for the silly question :-/


-Kind regards,

Stefan Freyr





Archive powered by MHonArc 2.6.16.

§