Thomas Bellman wrote:
> Chris Blumentritt wrote:
>
>
>> I am trying to manage ip address aliases and I cannot come up with a
>> good strategy. I have three webhead servers that are balanced via a
>> hardware load balancer. I have a define that will be setting up website
>> config on each server and one piece I need to sort out is configuring ip
>> addresses on the server and then configuring the apache virtual host
>> with the corresponding ip address for the host. A sort of visual way to
>> see what I am doing
>>
>> class site_name { ... } --> define setup_site { ...}
>>
>> The site_name class setups variables and the define does all the work
>> based on the variables. I would like to setup a ip addresses that will
>> be balanced for each site. And then do all of that with multiple sites.
>>
>> I fear the way to go about this is to set the ip address at the node and
>> then use the fact ipaddress_ethx:y but this means I will have to have an
>> interface to site mapping somewhere. I would rather just keep it all in
>> puppet somehow.
>>
>
> It seems that what you want is the old 'interface' resource type that
> existed earlier in Puppet. Unfortunately, it rotted and became broken,
> and since no-one stepped forward to fix it, Luke dropped it a while ago.
>
> I don't have a complete solution, but if you happen to run a RedHat
> based Linux distro (RHEL, CentOS, Fedora), I have written a definition
> that can configure network interfaces. You can find it in my module
> nsc-puppet-utils at <http://www.nsc.liu.se/~bellman/nsc-puppet-utils.git>.
> (You need to run 'git clone' on that URL to download it.) There are
> a bunch of other things there, but what you want is the 'rh_interface'
> definition in manifests/init.pp, and the accompanying template file
> 'rh-ifcfg.erb'. The documentation is a bit lacking, but you would use
> it something like this:
>
> rh_interface {
> "eth0":
> ipaddress => "10.20.30.40/24";
> "eth1:3":
> ipaddress => "192.168.1.2", netmask => "255.255.0.0";
> "eth2":
> bootproto => "dhcp";
> }
>
> The netmask can be specified either as part of the ipaddress parameter,
> or as its own parameter, and you can use either a dotted quad or a
> number of bits.
>
> And if you are running some other OS, then maybe that definition can
> serve as inspiration to write your own for your situation.
>
> Hope this is of some help.
>
>
If you are using an debian based distro you may want to have a look at
augeas and augeas resources. Before creating the rule play around with
augtool. Issue in augtool print /file/etc/network/interfaces so that you
can see the tree ;)
Also there might be something in augeas to help you with
rhel,centos,fedora but I haven't used any distro in this family for some
time.
Silviu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---