Ian Main
2008-Jun-03 01:25 UTC
[Ovirt-devel] [PATCH] Update wui kickstart to set up developer appliance to NAT the Managed Nodes
On Mon, 2 Jun 2008 21:28:54 -0400 Perry Myers <pmyers at redhat.com> wrote:> Signed-off-by: Perry Myers <pmyers at redhat.com> > --- > wui-appliance/common-install.ks | 2 +- > wui-appliance/wui-devel-x86_64.ks | 11 ++++++++++- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/wui-appliance/common-install.ks b/wui-appliance/common-install.ks > index e2fa902..36eb28d 100644 > --- a/wui-appliance/common-install.ks > +++ b/wui-appliance/common-install.ks > @@ -5,7 +5,7 @@ rootpw --iscrypted Xa8QeYfWrtscM > firewall --disabled > authconfig --enableshadow --enablemd5 > selinux --disabled > -services --disabled=libvirtd,postgresql,iptables,yum-updatesd,bluetooth,cups,gpm,pcscd,NetworkManager,NetworkManagerDispatcher --enabled=network,tgtd,nfs > +services --disabled=libvirtd,postgresql,yum-updatesd,bluetooth,cups,gpm,pcscd,NetworkManager,NetworkManagerDispatcher --enabled=network,tgtd,nfs,iptables > timezone --utc UTC > text > > diff --git a/wui-appliance/wui-devel-x86_64.ks b/wui-appliance/wui-devel-x86_64.ks > index 470aa7e..b9841f6 100644 > --- a/wui-appliance/wui-devel-x86_64.ks > +++ b/wui-appliance/wui-devel-x86_64.ks > @@ -16,6 +16,7 @@ logvol /iscsi5 --name=iSCSI5 --vgname=VolGroup00 --size=64 > %include common-pkgs.ks > > %post > +exec > /root/kickstart-post.log 2>&1 > > %include common-post.ks > > @@ -30,6 +31,14 @@ for i in `seq 3 252` ; do > echo "192.168.50.$i node$i.priv.ovirt.org" >> /etc/hosts > done > > +# Enable forwarding so this node can act as a router for the .50 network > +sed -i 's/net.ipv4.ip_forward = .*/net.ipv4.ip_forward = 1/' /etc/sysctl.conf > +cat > /etc/sysconfig/iptables << EOF > +*nat > +-A POSTROUTING -o eth0 -j MASQUERADE > +COMMIT > +EOF > + > principal=ovirtadmin > realm=PRIV.OVIRT.ORG > password=ovirt > @@ -186,7 +195,7 @@ start() { > -W _ldap._tcp,management.priv.ovirt.org,389 \ > -W _collectd._tcp,management.priv.ovirt.org,25826 \ > --enable-tftp --tftp-root=/tftpboot -M pxelinux.0 \ > - -O option:router,192.168.50.1 -O option:ntp-server,192.168.50.2 \ > + -O option:router,192.168.50.2 -O option:ntp-server,192.168.50.2 \ > -R --local /priv.ovirt.org/ --server 192.168.122.1 > > # Set up the fake iscsi target > --Looks good to me, ACK. Ian
Perry Myers
2008-Jun-03 01:28 UTC
[Ovirt-devel] [PATCH] Update wui kickstart to set up developer appliance to NAT the Managed Nodes
Signed-off-by: Perry Myers <pmyers at redhat.com> --- wui-appliance/common-install.ks | 2 +- wui-appliance/wui-devel-x86_64.ks | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wui-appliance/common-install.ks b/wui-appliance/common-install.ks index e2fa902..36eb28d 100644 --- a/wui-appliance/common-install.ks +++ b/wui-appliance/common-install.ks @@ -5,7 +5,7 @@ rootpw --iscrypted Xa8QeYfWrtscM firewall --disabled authconfig --enableshadow --enablemd5 selinux --disabled -services --disabled=libvirtd,postgresql,iptables,yum-updatesd,bluetooth,cups,gpm,pcscd,NetworkManager,NetworkManagerDispatcher --enabled=network,tgtd,nfs +services --disabled=libvirtd,postgresql,yum-updatesd,bluetooth,cups,gpm,pcscd,NetworkManager,NetworkManagerDispatcher --enabled=network,tgtd,nfs,iptables timezone --utc UTC text diff --git a/wui-appliance/wui-devel-x86_64.ks b/wui-appliance/wui-devel-x86_64.ks index 470aa7e..b9841f6 100644 --- a/wui-appliance/wui-devel-x86_64.ks +++ b/wui-appliance/wui-devel-x86_64.ks @@ -16,6 +16,7 @@ logvol /iscsi5 --name=iSCSI5 --vgname=VolGroup00 --size=64 %include common-pkgs.ks %post +exec > /root/kickstart-post.log 2>&1 %include common-post.ks @@ -30,6 +31,14 @@ for i in `seq 3 252` ; do echo "192.168.50.$i node$i.priv.ovirt.org" >> /etc/hosts done +# Enable forwarding so this node can act as a router for the .50 network +sed -i 's/net.ipv4.ip_forward = .*/net.ipv4.ip_forward = 1/' /etc/sysctl.conf +cat > /etc/sysconfig/iptables << EOF +*nat +-A POSTROUTING -o eth0 -j MASQUERADE +COMMIT +EOF + principal=ovirtadmin realm=PRIV.OVIRT.ORG password=ovirt @@ -186,7 +195,7 @@ start() { -W _ldap._tcp,management.priv.ovirt.org,389 \ -W _collectd._tcp,management.priv.ovirt.org,25826 \ --enable-tftp --tftp-root=/tftpboot -M pxelinux.0 \ - -O option:router,192.168.50.1 -O option:ntp-server,192.168.50.2 \ + -O option:router,192.168.50.2 -O option:ntp-server,192.168.50.2 \ -R --local /priv.ovirt.org/ --server 192.168.122.1 # Set up the fake iscsi target -- 1.5.5.1