- From: John Hanks <
>
- To:
- Subject: [chef] Re: Re: Re: Managing network interfaces
- Date: Tue, 13 Jul 2010 20:50:46 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=D4mcMyCkgUS5S0D/FXIRs2FkXPCAVsHOnHm9GjXlU7M2tZ2oYfBzq6rO6aowNPT11X gLcjbbu2+yiyCW409wyu9IjECEg8tguCGEmwsrzSfAINNEscg20rDfXtpXBhk7P08yBA wBFUTSoKQbaakx3k2NalwfXUaTkV3YTswY19g=
I have a recipe that is redhat/centos specific that I use to configure
eth, vlan and bond devices. It's crude but effective and uses a set of
attributes like (most complicated example I've used):
"netcfg" => {
"devices" => {
"bond0" => {
"bootproto" => "dhcp",
"device" => "bond0",
"nics" => "eth0,eth1",
"onboot" => "yes",
"mtu" => "9000",
"mode" => "0"
},
"vlan32" => {
"bootproto" => "dhcp",
"device" => "vlan32",
"physdev" => "bond0"
}
},
"gatewaydev" => "vlan32"
}
Or, a simpler config for 2 nics:
"netcfg" => {
"devices" => {
"eth0" => {
"bootproto" => "dhcp",
"device" => "eth0",
"onboot" => "yes"
},
"eth1" => {
"bootproto" => "dhcp",
"device" => "eth1",
"onboot" => "yes",
"mtu" => "9000"
}
},
"gatewaydev" => "eth1"
}
The cookbook should support all available redhat style settings for
ifcfg-* files and /etc/sysconfig/network. But since all my interfaces
dhcp, using this for the static settings is poorly tested. If anyone
is interested I've stuck a recent copy of it here:
http://www.broadinstitute.org/~jbh/netcfg.tar.gz
Because my nodes are diskless, there's not much effort put into
maintaining files, just into creating them since everything gets
rebuilt upon reboot. It'd probably take a bit more polish to make this
safe for a server provisioned to disk where you'd want to maintain and
update the files over time.
jbh
On Tue, Jul 13, 2010 at 7:59 PM, Jesse Nelson
<
>
wrote:
>
you can manage the files directly or use the resources. we use the
>
resource and data bags to manage static assignments for sub-interface and
>
vlan interfaces on some (not all) hosts..
>
this model has allowed me to name interfaces in json data in a data bag and
>
reuse or search against those names in other recipes. this has worked out
>
well for me.
>
i am happy to share the very simple recipe that achieves this, but its not
>
up anywhere atm.
>
>
>
>
On Jul 13, 2010, at 4:23 PM, Ryan C. Creasey wrote:
>
>
I've played around with managing auxiliary interfaces on my nodes (eth1,
>
loopback aliases, etc) for some of our DSR nodes and took the easy way out
>
and had the recipe manage the templates to the
>
"/etc/sysconfig/network-scripts/ifcfg-#{interface[:device]}" (yes, we're
>
redhat based).
>
I'd also be interested to hear other use cases for interface management with
>
chef.
>
>
Ryan C. Creasey
>
PRINCIPAL SYSTEMS ENGINEER
>
IGN Entertainment
>
T: 714.460.6789 | C: 949.378.9023 | AIM: ryancreasey
>
>
>
On Jul 13, 2010, at 4:19 PM, Jacobo García wrote:
>
>
Hi,
>
>
I have to manage some network interfaces, routes and and ipip tunnels.
>
I know about chef's route and ifconfig resource. But I'd like to know
>
experiences of people playing with these sensitive stuff, specially
>
about configuring network interfaces, is the resource reliable enough?
>
does it work with virtual interfaces?
>
>
Thanks :)
>
>
Jacobo García López de Araujo
>
blog: http://robotplaysguitar.com
>
http://workingwithrails.com/person/13395-jacobo-garc-a
>
>
>
>
- [chef] Managing network interfaces, Jacobo García, 07/13/2010
- [chef] Re: Managing network interfaces, Ryan C. Creasey, 07/13/2010
- [chef] Re: Re: Managing network interfaces, Jesse Nelson, 07/13/2010
- [chef] Re: Re: Re: Managing network interfaces, John Hanks, 07/13/2010
- [chef] Re: Re: Re: Re: Managing network interfaces, Jesse Nelson, 07/13/2010
- [chef] Re: Re: Re: Re: Re: Managing network interfaces, Jacobo García, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Managing network interfaces, Jacobo García, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Managing network interfaces,
, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Re: Managing network interfaces, Jacobo García, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Managing network interfaces,
, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Managing network interfaces, Jacobo García, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Managing network interfaces, Dan Ryan, 07/14/2010
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Managing network interfaces, AJ Christensen, 07/14/2010
Archive powered by MHonArc 2.6.16.