I would suggest that you don't use chef for this. Instead, put the creation of interfaces into your build process, e.g. kickstart
On Thu, Mar 20, 2014 at 2:50 PM, Eric Herot < " target="_blank"> > wrote:
Hi Maciek,Definitely agree about the docs. I have a Trello card open right now to deal with that in the next few weeks.Barthélemy’s example will probably serve your purposes but in case it doesn’t, please let me know if there are any specific questions I can answer in the mean time. I do not own the cookbook but I am a contributor to it.--
EricOn March 20, 2014 at 12:18:14 PM, Maciek Misztal ( " target="_blank"> ) wrote:
there already is such an issue - unattended ;)
On Thu, Mar 20, 2014 at 1:53 PM, Barthélemy Vessemont < " target="_blank"> > wrote:
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 :Ohai !Actually I'm using this very simple resource to manage my server's eth0 :
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.
network_interfaces 'eth0' do
target '10.10.16.203'
mask '255.255.128.0'
gateway '10.10.1.253'
end
attribute :device, kind_of: String, name_attribute: trueattribute :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: Stringattribute :vlan_dev, kind_of: Stringattribute :onboot, kind_of: [TrueClass, FalseClass], default: trueattribute :bootproto, kind_of: Stringattribute :target, kind_of: Stringattribute :gateway, kind_of: Stringattribute :metric, kind_of: Integerattribute :mtu, kind_of: Integerattribute :mask, kind_of: Stringattribute :network, kind_of: Stringattribute :broadcast, kind_of: Stringattribute :pre_up, kind_of: Stringattribute :up, kind_of: Stringattribute :post_up, kind_of: Stringattribute :pre_down, kind_of: Stringattribute :down, kind_of: Stringattribute :post_down, kind_of: Stringattribute :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:
Other will certainly improve on this.Youll probably wanna add a bit of logic just after that first line to help ignore it is the nic is the lo nic.I'm going to take an initial whack at this, and say I "think" its going to be something like[whatever you want to do here]
node[network][interfaces].each do |nic|
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.