[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strategy for "one-off" tasks
From: |
Allen Bettilyon |
Subject: |
Re: Strategy for "one-off" tasks |
Date: |
11 Jul 2003 16:49:17 -0600 |
For this example, I would write a static-routes config file that listed
all the needed routes, and than write a second script than maintained
the routes. In fact, I am doing exactly that (using red-hats
/etc/sysconfig/static-routes ) method.
For example, I've got an inputs/global.static-routes file that looks
kinda like this:
(Bear in mind, this IS redhat specific... but you should get the idea).
control:
hw_class1:: admin_dev = ( eth1 )
hw_class2:: admin_dev = ( eth0 )
hw_class3:: admin_dev = ( eth2 )
any::
route_file = ( /etc/sysconfig/static-routes )
actionsequence = (
editfiles.static_routes
shellcommands.static_routes
)
editfiles:
static_routes::
{ $(route_file)
AppendIfNoSuchLine "$(admin_dev) net 10.10.0.0 netmask
255.255.0.0 gw 1.1.1.1"
AppendIfNoSuchLine "$(admin_dev) net 10.11.0.0 netmask
255.255.0.0 gw 1.1.1.2"
DefineClasses "newRoutes"
AutoCreate
}
shellcommands:
static_routes.newRoutes::
"/etc/sysconfig/network-scripts/ifup-routes $(admin_dev)"
> One example:
>
> We have a bunch of web servers that connect to a farm of database servers
> on the same private subnet, and the connection goes through a load balancer.
> The database servers need a static route set for each web server pointing to
> the load balancer, so the web server will get the reply back from the same
> IP it sent the request to (the load balancer).
> When we add a new web server, we need to add a route to each database
> server. Using "AppendIfNoSuchLine" works fine for adding to the init
> script, but we also need to run a shellcomand one-time-only to add the
> route now instead of on the next reboot (which is probably many months
> from now).
>
>
> --
> Frank Smith fsmith@hoovers.com
> Systems Administrator Voice: 512-374-4673
> Hoover's Online Fax: 512-374-4501
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
- Re: Strategy for "one-off" tasks, (continued)
- Re: Strategy for "one-off" tasks, Spam Collector, 2003/07/10
- Re: Strategy for "one-off" tasks, Frank Smith, 2003/07/10
- Re: Strategy for "one-off" tasks, Daniel Pittman, 2003/07/10
- Re: Strategy for "one-off" tasks, Adrian Phillips, 2003/07/11
- Re: Strategy for "one-off" tasks, Mark . Burgess, 2003/07/11
- Re: Strategy for "one-off" tasks, Jamie Wilkinson, 2003/07/11
- Re: Strategy for "one-off" tasks,
Allen Bettilyon <=
- Re: Strategy for "one-off" tasks, David Douthitt, 2003/07/14
- Re: Strategy for "one-off" tasks, Jamie Wilkinson, 2003/07/14
RE: Strategy for "one-off" tasks, Ferguson, Steve, 2003/07/11
Re: Strategy for "one-off" tasks, David Masterson, 2003/07/11
RE: Strategy for "one-off" tasks, Ferguson, Steve, 2003/07/11
RE: Strategy for "one-off" tasks, Ferguson, Steve, 2003/07/14
RE: Strategy for "one-off" tasks, Nielsen, Steve, 2003/07/14