[chef] Re: Re: Re: Re: Re: How do I configure /etc/network/interfaces using chef?


Chronological Thread 
  • From: Maciek Misztal < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: How do I configure /etc/network/interfaces using chef?
  • Date: Thu, 20 Mar 2014 17:17:46 +0100

there already is such an issue - unattended ;)


On Thu, Mar 20, 2014 at 1:53 PM, Barthélemy Vessemont < " target="_blank"> > wrote:
Ohai !

I'm working regularly with this cookbook's author. Don't hesitate to create a github issue asking for some doc if you feel the need to.

Actually I'm using this very simple resource to manage my server's eth0 :

network_interfaces 'eth0' do
  target '10.10.16.203'
  mask '255.255.128.0'
  gateway '10.10.1.253'
end


there is other options you can use, you'd better look at lwrp ressource file to understand how it can work, and what can be changed :
attribute :device, kind_of: String, name_attribute: true
attribute :bridge, kind_of: [TrueClass, FalseClass, Array]
attribute :bridge_stp, kind_of: [TrueClass, FalseClass]
attribute :bond, kind_of: [TrueClass, FalseClass, Array]
attribute :bond_mode, kind_of: String
attribute :vlan_dev, kind_of: String
attribute :onboot, kind_of: [TrueClass, FalseClass], default: true
attribute :bootproto, kind_of: String
attribute :target, kind_of: String
attribute :gateway, kind_of: String
attribute :metric, kind_of: Integer
attribute :mtu, kind_of: Integer
attribute :mask, kind_of: String
attribute :network, kind_of: String
attribute :broadcast, kind_of: String
attribute :pre_up, kind_of: String
attribute :up, kind_of: String
attribute :post_up, kind_of: String
attribute :pre_down, kind_of: String
attribute :down, kind_of: String
attribute :post_down, kind_of: String
attribute :custom, kind_of: Hash




On Wed, Mar 19, 2014 at 7:04 PM, Maciek Misztal < " target="_blank"> > wrote:
Are there some usage examples? This cookbook's documentation is severely lacking - I'm not proficient with Chef yet, so I'm having a hard time understanding how to use it.

cheers,
Maciej


On Wed, Mar 19, 2014 at 5:25 PM, Eric Herot < " target="_blank"> > wrote:
Not sure if this is useful for your particular case but if what you’re trying to do is set up some existing physical NICs (or virtual NICs if you’re in a cloud computing environment) there is a cookbook for that:

-- 
Eric

On March 19, 2014 at 12:09:24 PM, Kenneth Barry ( " target="_blank"> ) wrote:

I'm going to take an initial whack at this, and say I "think" its going to be something like

node[network][interfaces].each do |nic|
[whatever you want to do here]

Youll probably wanna add a bit of logic just after that first line to help ignore it is the nic is the lo nic.

Other will certainly improve on this.


On Wed, Mar 19, 2014 at 8:10 AM, Maciek Misztal < " target="_blank"> > wrote:
I'm looking for a way to configure N (N=3) ubuntu nodes with 2 network interfaces each - since I'm a complete newb, what is the proper way to do it?

Regards,
Maciej





--
Barthélemy Vessemont - " target="_blank">
Ingénieur en informatique diplômé de l'UTC (Compiègne)




Archive powered by MHonArc 2.6.16.

§