Hi cobbler-devel,
there are some suse sles related things that could make sense to be included directly in cobbler. These pieces are currently here: https//fluxcoil.net/doku.php/cobbler/sles .
Uwe, I think the existing suse pieces are from you, so you might be able to point out some things I am missing.
Here are my questions, please comment if things make sense to get included and in which way:
- Currently cobbler comes with autoyast_sample.xml, I think of additionally shipping a autoyast_complex.xml, with these things included: - snippet which sets up kdump - a construct which allows sles-rootpw to be set if specified as ksmeta $rootpw - code which allows selection of one of 3 package selections which are selected via a ksmeta, minimal/tiny/big - post snippet: disabling of some services - post snippet: this deploys a snippet with pure shellcode (which works also for rhel and cleans up /etc/grub.conf), and a wrappersnippet. The wrappersnippet makes it possible reuse snippets written for rhel (containing shellcode) also for sles (in wrapping it in the xml code that autoyast expects).
Which of these look useful for inclusion? Should documentation happen inline as comments or in wiki?
- While the above works here for sles11, with some functions dropped I have this also here for sles9 and 10. These are separate template files, and separate interface snippets for these other distros. Is this of interest to be included?
- currently, when the networking.xml snippet is included and the hostname does not contain a hostname it bails out with an error message. In the code here this is checked for using #if re.match('.*..*', $hostname)
- the current networking.xml is not adapted to use $network instead of $subnet . The scripts here cope with both now, when changing this in git then only the $netmask has to be used I guess?
- current cobbler git head uses the SuSE subdirectory, I am currently only testing with cobbler 2.2 in fedora updates-testing.
- currently, autoyast.xml is not directly usable as cobbler template. It is xml valid, but the <!-- comments --> at the beginning seems to be the problem. So users have to remove this bevore using. I would suggest this file no longer be xml valid, instead using here ## these ## comments which are filtered out by cobbler later.
Opinions on the points above welcome.
cheers, Christian
On Tuesday, January 10, 2012 at 1:14 PM, Christian Horn wrote:
Hi cobbler-devel,
there are some suse sles related things that could make sense to be included directly in cobbler. These pieces are currently here: https//fluxcoil.net/doku.php/cobbler/sles (http://fluxcoil.net/doku.php/cobbler/sles) .
Uwe, I think the existing suse pieces are from you, so you might be able to point out some things I am missing.
Here are my questions, please comment if things make sense to get included and in which way:
- Currently cobbler comes with autoyast_sample.xml, I think of additionally
shipping a autoyast_complex.xml, with these things included:
- snippet which sets up dump
- a construct which allows sles-rootpw to be set if specified
as ksmeta $rootpw
This should be in the default one, IMHO
- code which allows selection of one of 3 package selections
which are selected via a ksmeta, minimal/tiny/big
We don't do this for RHEL, it should be consistent, I'd think? (If not, have a default and put it in the default snippet)
- post snippet: disabling of some services
This sounds like a Wiki item to me since it's behavior not in the RHEL one either. Though if we want to ship some more complex RHEL examples that could be good.
- post snippet: this deploys a snippet with pure shellcode
(which works also for rhel and cleans up /etc/grub.conf),
Also also...
and a wrappersnippet. The wrappersnippet makes it possible reuse snippets written for rhel (containing shellcode) also for sles (in wrapping it in the xml code that autoyast expects).
Most of the RHEL snippets are a mix of bash and Anaconda directives, would it work?
But snippet parity and kickstart parity is a very good cause, yes.
Which of these look useful for inclusion? Should documentation happen inline as comments or in wiki?
Inline similar to the comment style of the sudoers file could be rather helpful. A lot of the RHEL stuff is enabled (not even commented so much) and gated with booleans in the master settings file, but are a bit distro specific unfortunately where they might want to be renamed (yum_post_install_mirror, in particular, should work on SLES)
- While the above works here for sles11, with some functions dropped I have this
also here for sles9 and 10. These are separate template files, and separate interface snippets for these other distros. Is this of interest to be included?
- currently, when the networking.xml snippet is included and the hostname
does not contain a hostname it bails out with an error message. In the code here this is checked for using #if re.match('.*..*', $hostname)
- the current networking.xml is not adapted to use $network instead
of $subnet . The scripts here cope with both now, when changing this in git then only the $netmask has to be used I guess?
- current cobbler git head uses the SuSE subdirectory, I am currently only
testing with cobbler 2.2 in fedora updates-testing.
- currently, autoyast.xml is not directly usable as cobbler template.
It is xml valid, but the <!-- comments --> at the beginning seems to be the problem. So users have to remove this bevore using.
send in a patch
I would suggest this file no longer be xml valid, instead using here ## these ## comments which are filtered out by cobbler later.
Opinions on the points above welcome.
cheers, Christian _______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org (mailto:cobbler-devel@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler-devel
Hi cobbler-dev,
On Tue, Jan 10, 2012 at 03:22:51PM -0500, Michael DeHaan wrote:
On Tuesday, January 10, 2012 at 1:14 PM, Christian Horn wrote:
there are some suse sles related things that could make sense to be included directly in cobbler.
Suming up the patch (against current git):
- autoyast_sample.xml now usable as shipped
- additional autoyast_complex.xml which utilizes these:
- new snippet that configurs kdump
- a post snippet which is a wrapper for snippets that can also be used on RHEL. Shell snippets which contain pure bash code are compatible. That way snippets can easily be shared between RHEL and SuSE deployments. I hope its sufficiently documented currently in the template.
- example snippet name_of_pure_shell_snippet which contains an echo to fill /etc/motd as example
- uses the existing hosts.xml snippet (just cosmetic modified)
- existing networking.xml modified, handles now hostname without domain and subnet->netmask conversion
Tested this for SLES11SP1:
- hostname, domainname setting - network config for one interface - 'cobbler status' properly getting triggered - after deployments 'zypper install something' is configured to install things from the install repo, like 'yum install' - no interaction required for the deployment
Notes: - I did not make the root password configurable, used a $rootpw but this is no cobbler default variable/not implemented by default - I dropped the package selection code as per Michaels note its also not in the Red Hat template/snippets - Also not included the snippet which displays suse style post snippets
send in a patch
Attached.
cheers, Christian
On Fri, Jan 13, 2012 at 05:33:39PM +0100, Christian Horn wrote:
On Tue, Jan 10, 2012 at 03:22:51PM -0500, Michael DeHaan wrote:
On Tuesday, January 10, 2012 at 1:14 PM, Christian Horn wrote:
there are some suse sles related things that could make sense to be included directly in cobbler.
Any comments?
Christian
On Fri, Jan 20, 2012 at 4:00 PM, Christian Horn chorn@fluxcoil.net wrote:
Any comments?
Hi Christian,
The networking snippet should be updated to reflect the new interface_type naming scheme for bonded interfaces. I never got around to fixing that after i submitted the SuSE snippets. Also support for the $subnet variable (now $netmask) should be safe to drop i guess.
Thanks for your time!
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
A base config file and an advanced config file is pretty reasonable.
Out of the box, the default selected by import should be mostly consistent between platforms if possible.
-- Grtz, Jörgen Maas _______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org (mailto:cobbler-devel@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler-devel
On Fri, Jan 20, 2012 at 03:32:05PM -0500, Michael DeHaan wrote:
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
A base config file and an advanced config file is pretty reasonable.
Out of the box, the default selected by import should be mostly consistent between platforms if possible.
Currently autoyast_complex.xml provides this to a better extend than autoyast_sample.xml .
The thing is that autoyast_sample.xml is probably compatible with more suse/autoyast versions.. taking autoyast_complex.xml by default for breed=suse might make sense but to have a startconfig as fallback autoyast_sample.xml makes also sense.
Christian
Hi,
On Fri, Jan 20, 2012 at 09:24:36PM +0100, Jörgen Maas wrote:
The networking snippet should be updated to reflect the new interface_type naming scheme for bonded interfaces.
New version of the patch attached, did you have that in mind?
Also support for the $subnet variable (now $netmask) should be safe to drop i guess.
Thought so and that is the current state of the patch. So the snippets included in cobbler are compatible to the cobbler version itself.
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
The package selection I did bevore is not in the patch. In this current state all the important bells'n'whistles that I used bevore for SLES deployment are in the patch (and former network con- fig was worse than what it is with the networking.xml that was committed to cobbler in the meantime).
Having currently no ideas of further features that could be missing here..
Comments to the patch welcome.
Christian
Hi,
modifications required, or not considered useful?
Christian
On Sat, Jan 21, 2012 at 08:34:12PM +0100, Christian Horn wrote:
Hi,
On Fri, Jan 20, 2012 at 09:24:36PM +0100, Jörgen Maas wrote:
The networking snippet should be updated to reflect the new interface_type naming scheme for bonded interfaces.
New version of the patch attached, did you have that in mind?
Also support for the $subnet variable (now $netmask) should be safe to drop i guess.
Thought so and that is the current state of the patch. So the snippets included in cobbler are compatible to the cobbler version itself.
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
The package selection I did bevore is not in the patch. In this current state all the important bells'n'whistles that I used bevore for SLES deployment are in the patch (and former network con- fig was worse than what it is with the networking.xml that was committed to cobbler in the meantime).
Having currently no ideas of further features that could be missing here..
Comments to the patch welcome.
Christian
diff -Naur cobbler.git/kickstarts/autoyast_complex.xml cobbler/kickstarts/autoyast_complex.xml --- cobbler.git/kickstarts/autoyast_complex.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/kickstarts/autoyast_complex.xml 2012-01-21 22:22:12.838630290 +0100 @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!DOCTYPE profile> +## wrapper working? +## networking? +<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<deploy_image>
- <image_installation config:type="boolean">false</image_installation>
</deploy_image>
- ## without the next 6 lines autoyast will ask for confirmation bevore installation
<general>
<mode>
<confirm config:type="boolean">false</confirm>
<final_reboot config:type="boolean">true</final_reboot>
</mode>
</general>
- $SNIPPET('snippets_new/hosts.xml')
- $SNIPPET('snippets_new/kdump.xml')
<keyboard>
- <keymap>english</keymap>
</keyboard>
<language>
- <language>en_US</language>
- <languages></languages>
</language>
<login_settings/>
- $SNIPPET('snippets_new/networking.xml')
<runlevel>
- <default>3</default>
</runlevel>
<users config:type="list">
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>root</fullname>
<gid>0</gid>
<home>/root</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>0</uid>
- ## password: cobbler
- <user_password>$2a$05$OByGoYrDs05U3L62Sy0G4uMPsIx3JcUM5SBshs0xL0H6VYDFAvvGy</user_password>
<username>root</username>
</user>
</users>
- <scripts>
- ## we have to include the pre-scripts tag to get kickstart_start included
- <pre-scripts config:type="list">
- </pre-scripts>
<post-scripts config:type="list">
- ## This plugin wrapper provides the flexibility to call pure shell
- ## snippets which can be used directly on kickstart and with with
- ## wrapper on SuSE.
- ##
- ## exchange name_of_pure_shell_snippet with the name of this shell snippet
- ##
- #set global $wrappedscript = 'snippets_new/name_of_pure_shell_snippet'
- $SNIPPET('snippets_new/suse_scriptwrapper.xml')
</post-scripts>
- </scripts>
+</profile> diff -Naur cobbler.git/snippets/SuSE/hosts.xml cobbler/snippets/SuSE/hosts.xml --- cobbler.git/snippets/SuSE/hosts.xml 2012-01-12 20:26:58.584464858 +0100 +++ cobbler/snippets/SuSE/hosts.xml 2012-01-21 22:21:32.882617099 +0100 @@ -1,23 +1,23 @@
<host> - <hosts config:type="list"> - <hosts_entry> - <host_address>127.0.0.1</host_address> - <names config:type="list"> - <name>localhost</name> - </names> - </hosts_entry> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() in ["","na","bridge","bond"] - <hosts_entry> - <host_address>$idata["ip_address"]</host_address> - <names config:type="list"> - #set $my_interface_hostname_short = $idata["dns_name"].split('.',1)[:1][0] - <name>$idata["dns_name"].lower() $my_interface_hostname_short.lower()</name> - </names> - </hosts_entry> - #end if - #end for - </hosts> -</host> + <hosts config:type="list"> + <hosts_entry> + <host_address>127.0.0.1</host_address> + <names config:type="list"> + <name>localhost</name> + </names> + </hosts_entry> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #if $idata["interface_type"].lower() in ["","na","bridge","bond"] + <hosts_entry> + <host_address>$idata["ip_address"]</host_address> + <names config:type="list"> + #set $my_interface_hostname_short = $idata["dns_name"].split('.',1)[:1][0] + <name>$idata["dns_name"].lower() $my_interface_hostname_short.lower()</name> + </names> + </hosts_entry> + #end if + #end for + </hosts> + </host> diff -Naur cobbler.git/snippets/SuSE/kdump.xml cobbler/snippets/SuSE/kdump.xml --- cobbler.git/snippets/SuSE/kdump.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/kdump.xml 2012-01-21 22:21:32.882617099 +0100 @@ -0,0 +1,35 @@ +<kdump> + <!-- memory reservation --> + <!-- reserve 64 MB with 256MB to 2GB Memory and 128MB with more then 2GB Memory --> + <add_crash_kernel config:type="boolean">true</add_crash_kernel> + <crash_kernel>256M-2G:64M,2G-:128M</crash_kernel> + + <general> + <!-- dump target settings --> + <KDUMP_SAVEDIR>file:///var/crash</KDUMP_SAVEDIR> + <KDUMP_COPY_KERNEL>true</KDUMP_COPY_KERNEL> + <KDUMP_FREE_DISK_SIZE>64</KDUMP_FREE_DISK_SIZE> + <KDUMP_KEEP_OLD_DUMPS>4</KDUMP_KEEP_OLD_DUMPS> + + <!-- filtering and compression --> + <KDUMP_DUMPFORMAT>compressed</KDUMP_DUMPFORMAT> + <KDUMP_DUMPLEVEL>31</KDUMP_DUMPLEVEL> + + <!-- notification --> + <KDUMP_NOTIFICATION_TO></KDUMP_NOTIFICATION_TO> + <KDUMP_NOTIFICATION_CC></KDUMP_NOTIFICATION_CC> + <KDUMP_SMTP_SERVER></KDUMP_SMTP_SERVER> + <KDUMP_SMTP_USER></KDUMP_SMTP_USER> + <KDUMP_SMTP_PASSWORD></KDUMP_SMTP_PASSWORD> + + <!-- kdump kernel --> + <KDUMP_KERNELVER></KDUMP_KERNELVER> + <KDUMP_COMMANDLINE></KDUMP_COMMANDLINE> + <KDUMP_COMMANDLINE_APPEND></KDUMP_COMMANDLINE_APPEND> + + <!-- expert settings --> + <KDUMP_IMMEDIATE_REBOOT>yes</KDUMP_IMMEDIATE_REBOOT> + <KDUMP_VERBOSE>3</KDUMP_VERBOSE> + <KEXEC_OPTIONS></KEXEC_OPTIONS> + </general> + </kdump> diff -Naur cobbler.git/snippets/SuSE/name_of_pure_shell_snippet cobbler/snippets/SuSE/name_of_pure_shell_snippet --- cobbler.git/snippets/SuSE/name_of_pure_shell_snippet 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/name_of_pure_shell_snippet 2012-01-21 22:21:08.715609122 +0100 @@ -0,0 +1 @@ +echo 'cobbler deployed SuSE system' >/etc/motd diff -Naur cobbler.git/snippets/SuSE/networking.xml cobbler/snippets/SuSE/networking.xml --- cobbler.git/snippets/SuSE/networking.xml 2012-01-12 20:26:58.584464858 +0100 +++ cobbler/snippets/SuSE/networking.xml 2012-01-21 22:21:33.798617402 +0100 @@ -1,107 +1,121 @@ #if $hostname == "" -#set $hostname = $system_name + #set $hostname = $system_name #end if -#set $my_hostname = $hostname.split('.',1)[:1][0] -#set $my_domainname = $hostname.split('.',1)[1:][0] -<networking> - <keep_install_network config:type="boolean">false</keep_install_network> - <dhcp_options> - <dhclient_client_id></dhclient_client_id> - <dhclient_hostname_option></dhclient_hostname_option> - </dhcp_options> - <dns> - <dhcp_hostname config:type="boolean">false</dhcp_hostname> - <dhcp_resolv config:type="boolean">false</dhcp_resolv> - <write_hostname config:type="boolean">false</write_hostname> - <resolv_conf_policy></resolv_conf_policy> - <hostname>$my_hostname</hostname> - <domain>$my_domainname</domain> - #if $getVar("name_servers_search","") != "" - <searchlist config:type="list"> - #for $sd in $name_servers_search - <search>$sd</search> +#if $getVar("dns_name_eth0","") != "" + #set $my_hostname = $hostname.split('.',1)[:1][0] + #set $my_domainname = $dns_name_eth0 +#else + #set $my_hostname = $hostname + #set $my_domainname = "site" +#end if + + <networking> + <keep_install_network config:type="boolean">false</keep_install_network> + <dhcp_options> + <dhclient_client_id></dhclient_client_id> + <dhclient_hostname_option></dhclient_hostname_option> + </dhcp_options> + <dns> + <dhcp_hostname config:type="boolean">false</dhcp_hostname> + <dhcp_resolv config:type="boolean">false</dhcp_resolv> + <write_hostname config:type="boolean">false</write_hostname> + <resolv_conf_policy></resolv_conf_policy> + <hostname>$my_hostname</hostname> + <domain>$my_domainname</domain> + #if $getVar("name_servers_search","") != "" + <searchlist config:type="list"> + #for $sd in $name_servers_search + <search>$sd</search> + #end for + </searchlist> + #end if + <nameservers config:type="list"> + #for $ns in $name_servers + <nameserver>$ns</nameserver> + #end for + </nameservers> + </dns> + <interfaces config:type="list"> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #set $mac = $idata["mac_address"] + #set $ip = $idata["ip_address"] + #set $netmask = $idata["netmask"] + #set $iface_type = $idata["interface_type"] + #set $bonding_opts = $idata["bonding_opts"] + #if $iface_type.lower() == "bond" + <interface> + <bonding_master>yes</bonding_master> + <bonding_module_opts>$bonding_opts.lower()</bonding_module_opts> + #set $loop_ikeys = $interfaces.keys() + #set $loop_counter = 0 + #for $loop_iface in $loop_ikeys + #set $loop_idata = $interfaces[$loop_iface] + #set $loop_interface_type = $loop_idata["interface_type"] + #if $loop_interface_type.lower == "bond_slave" + #if $loop_idata["interface_master"] != "" + #if $loop_idata["interface_master"].lower() == $iface.lower() + <bonding_slave$loop_counter>$loop_iface</bonding_slave$loop_counter> + #set $loop_counter += 1 + #end if + #end if + #end if + #end for + <bootproto>static</bootproto> + <device>$iface</device> + <ipaddr>$ip</ipaddr> + <netmask>$netmask</netmask> + <startmode>auto</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if + #if $iface_type.lower() in ["bond_slave","bridge_slave"] + <interface> + <bootproto>none</bootproto> + <device>$iface</device> + <startmode>off</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if + #if $iface_type.lower() in ["","na"] + <interface> + <bootproto>static</bootproto> + <device>$iface</device> + <lladdr>$mac.lower()</lladdr> + <ipaddr>$ip</ipaddr> + <netmask>$netmask</netmask> + <startmode>auto</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if #end for - </searchlist> - #end if - <nameservers config:type="list"> - #for $ns in $name_servers - <nameserver>$ns</nameserver> + </interfaces> + <managed config:type="boolean">false</managed> + <net-udev config:type="list"> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #set $mac = $idata["mac_address"] + #set $interface_type = $idata["interface_type"] + #if $interface_type.lower() not in ["bond","bridge"] + <rule> + <name>$iface</name> + <rule>ATTR{address}</rule> + <value>$mac.lower()</value> + </rule> + #end if #end for - </nameservers> - </dns> - <interfaces config:type="list"> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() == "bond" - <interface> - <bonding_master>yes</bonding_master> - <bonding_module_opts>$idata["bonding_opts"].lower()</bonding_module_opts> - #set $loop_ikeys = $interfaces.keys() - #set $loop_counter = 0 - #for $loop_iface in $loop_ikeys - #set $loop_idata = $interfaces[$loop_iface] - #if $loop_idata["interface_type"].lower == "bond_slave" - #if $loop_idata["interface_master"] != "" - #if $loop_idata["interface_master"].lower() == $iface.lower() - <bonding_slave$loop_counter>$loop_iface</bonding_slave$loop_counter> - #set $loop_counter += 1 - #end if - #end if - #end if - #end for - <bootproto>static</bootproto> - <device>$iface</device> - <ipaddr>$idata["ip_address"]</ipaddr> - <netmask>$idata["subnet"]</netmask> - <startmode>auto</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #if $idata["interface_type"].lower() in ["bond_slave","bridge_slave"] - <interface> - <bootproto>none</bootproto> - <device>$iface</device> - <startmode>off</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #if $idata["interface_type"].lower() in ["","na"] - <interface> - <bootproto>static</bootproto> - <device>$iface</device> - <lladdr>$idata["mac_address"].lower()</lladdr> - <ipaddr>$idata["ip_address"]</ipaddr> - <netmask>$idata["subnet"]</netmask> - <startmode>auto</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #end for - </interfaces> - <managed config:type="boolean">false</managed> - <net-udev config:type="list"> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() not in ["bond","bridge"] - <rule> - <name>$iface</name> - <rule>ATTR{address}</rule> - <value>$idata["mac_address"].lower()</value> - </rule> - #end if - #end for - </net-udev> - <routing> - <ip_forward config:type="boolean">false</ip_forward> - <routes config:type="list"> - <route> - <destination>default</destination> - <netmask>-</netmask> - <device>-</device> - <gateway>$gateway</gateway> - </route> - </routes> - </routing> -</networking> + </net-udev> + <routing> + <ip_forward config:type="boolean">false</ip_forward> + <routes config:type="list"> + <route> + <destination>default</destination> + <netmask>-</netmask> + <device>-</device> + <gateway>$gateway</gateway> + </route> + </routes> + </routing> + </networking> diff -Naur cobbler.git/snippets/SuSE/suse_scriptwrapper.xml cobbler/snippets/SuSE/suse_scriptwrapper.xml --- cobbler.git/snippets/SuSE/suse_scriptwrapper.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/suse_scriptwrapper.xml 2012-01-21 22:21:33.798617402 +0100 @@ -0,0 +1,12 @@ + <script> +## <debug config:type="boolean">true</debug> +## <feedback config:type="boolean">false</feedback> +## <location></location> +## <network_needed config:type="boolean">true</network_needed> + <interpreter>shell</interpreter> +#set $filename = $wrappedscript.replace('/', '_') + <filename>$filename</filename> + <source><![CDATA[ +$SNIPPET($wrappedscript) +]]></source> + </script>
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel
Anything for SuSE's default sample.xml should first strive for parity with the Red Hat example -- ideally it should set up networking, have the config integration, etc.
I'm not against shipping a "complex" example showing more but "complex" should not be the default. I'd like it to aim for parity first though.
Other tricks might make a good Wiki article.
On Thursday, February 2, 2012 at 8:41 AM, Christian Horn wrote:
Hi,
modifications required, or not considered useful?
Christian
On Sat, Jan 21, 2012 at 08:34:12PM +0100, Christian Horn wrote:
Hi,
On Fri, Jan 20, 2012 at 09:24:36PM +0100, Jörgen Maas wrote:
The networking snippet should be updated to reflect the new interface_type naming scheme for bonded interfaces.
New version of the patch attached, did you have that in mind?
Also support for the $subnet variable (now $netmask) should be safe to drop i guess.
Thought so and that is the current state of the patch. So the snippets included in cobbler are compatible to the cobbler version itself.
Also; Personally i think it's better to include as much useable autoyast snippets/stuff in Cobbler even if they're not implemented yet for RHEL. In my opinion the included stuff should be a starting point for users, not an out-of-the-box-one-size-fits-all solution.
The package selection I did bevore is not in the patch. In this current state all the important bells'n'whistles that I used bevore for SLES deployment are in the patch (and former network con- fig was worse than what it is with the networking.xml that was committed to cobbler in the meantime).
Having currently no ideas of further features that could be missing here..
Comments to the patch welcome.
Christian
diff -Naur cobbler.git/kickstarts/autoyast_complex.xml cobbler/kickstarts/autoyast_complex.xml --- cobbler.git/kickstarts/autoyast_complex.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/kickstarts/autoyast_complex.xml 2012-01-21 22:22:12.838630290 +0100 @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!DOCTYPE profile> +## wrapper working? +## networking? +<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<deploy_image>
- <image_installation config:type="boolean">false</image_installation>
</deploy_image>
- ## without the next 6 lines autoyast will ask for confirmation bevore installation
<general>
<mode>
- <confirm config:type="boolean">false</confirm>
- <final_reboot config:type="boolean">true</final_reboot>
</mode>
</general>
- $SNIPPET('snippets_new/hosts.xml')
- $SNIPPET('snippets_new/kdump.xml')
<keyboard>
- <keymap>english</keymap>
</keyboard>
<language>
- <language>en_US</language>
- <languages></languages>
</language>
<login_settings/>
- $SNIPPET('snippets_new/networking.xml')
<runlevel>
- <default>3</default>
</runlevel>
<users config:type="list">
<user>
- <encrypted config:type="boolean">true</encrypted>
- <fullname>root</fullname>
- <gid>0</gid>
- <home>/root</home>
<password_settings>
- <expire></expire>
- <flag></flag>
- <inact></inact>
- <max></max>
- <min></min>
- <warn></warn>
</password_settings>
- <shell>/bin/bash</shell>
- <uid>0</uid>
- ## password: cobbler
- <user_password>$2a$05$OByGoYrDs05U3L62Sy0G4uMPsIx3JcUM5SBshs0xL0H6VYDFAvvGy</user_password>
- <username>root</username>
</user>
</users>
- <scripts>
- ## we have to include the pre-scripts tag to get kickstart_start included
- <pre-scripts config:type="list">
- </pre-scripts>
<post-scripts config:type="list">
- ## This plugin wrapper provides the flexibility to call pure shell
- ## snippets which can be used directly on kickstart and with with
- ## wrapper on SuSE.
- ##
- ## exchange name_of_pure_shell_snippet with the name of this shell snippet
- ##
- #set global $wrappedscript = 'snippets_new/name_of_pure_shell_snippet'
- $SNIPPET('snippets_new/suse_scriptwrapper.xml')
</post-scripts>
- </scripts>
+</profile> diff -Naur cobbler.git/snippets/SuSE/hosts.xml cobbler/snippets/SuSE/hosts.xml --- cobbler.git/snippets/SuSE/hosts.xml 2012-01-12 20:26:58.584464858 +0100 +++ cobbler/snippets/SuSE/hosts.xml 2012-01-21 22:21:32.882617099 +0100 @@ -1,23 +1,23 @@
<host> - <hosts config:type="list"> - <hosts_entry> - <host_address>127.0.0.1</host_address> - <names config:type="list"> - <name>localhost</name> - </names> - </hosts_entry> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() in ["","na","bridge","bond"] - <hosts_entry> - <host_address>$idata["ip_address"]</host_address> - <names config:type="list"> - #set $my_interface_hostname_short = $idata["dns_name"].split('.',1)[:1][0] - <name>$idata["dns_name"].lower() $my_interface_hostname_short.lower()</name> - </names> - </hosts_entry> - #end if - #end for - </hosts> -</host> + <hosts config:type="list"> + <hosts_entry> + <host_address>127.0.0.1</host_address> + <names config:type="list"> + <name>localhost</name> + </names> + </hosts_entry> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #if $idata["interface_type"].lower() in ["","na","bridge","bond"] + <hosts_entry> + <host_address>$idata["ip_address"]</host_address> + <names config:type="list"> + #set $my_interface_hostname_short = $idata["dns_name"].split('.',1)[:1][0] + <name>$idata["dns_name"].lower() $my_interface_hostname_short.lower()</name> + </names> + </hosts_entry> + #end if + #end for + </hosts> + </host> diff -Naur cobbler.git/snippets/SuSE/kdump.xml cobbler/snippets/SuSE/kdump.xml --- cobbler.git/snippets/SuSE/kdump.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/kdump.xml 2012-01-21 22:21:32.882617099 +0100 @@ -0,0 +1,35 @@ +<kdump> + <!-- memory reservation --> + <!-- reserve 64 MB with 256MB to 2GB Memory and 128MB with more then 2GB Memory --> + <add_crash_kernel config:type="boolean">true</add_crash_kernel> + <crash_kernel>256M-2G:64M,2G-:128M</crash_kernel> + + <general> + <!-- dump target settings --> + <KDUMP_SAVEDIR>file:///var/crash</KDUMP_SAVEDIR> + <KDUMP_COPY_KERNEL>true</KDUMP_COPY_KERNEL> + <KDUMP_FREE_DISK_SIZE>64</KDUMP_FREE_DISK_SIZE> + <KDUMP_KEEP_OLD_DUMPS>4</KDUMP_KEEP_OLD_DUMPS> + + <!-- filtering and compression --> + <KDUMP_DUMPFORMAT>compressed</KDUMP_DUMPFORMAT> + <KDUMP_DUMPLEVEL>31</KDUMP_DUMPLEVEL> + + <!-- notification --> + <KDUMP_NOTIFICATION_TO></KDUMP_NOTIFICATION_TO> + <KDUMP_NOTIFICATION_CC></KDUMP_NOTIFICATION_CC> + <KDUMP_SMTP_SERVER></KDUMP_SMTP_SERVER> + <KDUMP_SMTP_USER></KDUMP_SMTP_USER> + <KDUMP_SMTP_PASSWORD></KDUMP_SMTP_PASSWORD> + + <!-- kdump kernel --> + <KDUMP_KERNELVER></KDUMP_KERNELVER> + <KDUMP_COMMANDLINE></KDUMP_COMMANDLINE> + <KDUMP_COMMANDLINE_APPEND></KDUMP_COMMANDLINE_APPEND> + + <!-- expert settings --> + <KDUMP_IMMEDIATE_REBOOT>yes</KDUMP_IMMEDIATE_REBOOT> + <KDUMP_VERBOSE>3</KDUMP_VERBOSE> + <KEXEC_OPTIONS></KEXEC_OPTIONS> + </general> + </kdump> diff -Naur cobbler.git/snippets/SuSE/name_of_pure_shell_snippet cobbler/snippets/SuSE/name_of_pure_shell_snippet --- cobbler.git/snippets/SuSE/name_of_pure_shell_snippet 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/name_of_pure_shell_snippet 2012-01-21 22:21:08.715609122 +0100 @@ -0,0 +1 @@ +echo 'cobbler deployed SuSE system' >/etc/motd diff -Naur cobbler.git/snippets/SuSE/networking.xml cobbler/snippets/SuSE/networking.xml --- cobbler.git/snippets/SuSE/networking.xml 2012-01-12 20:26:58.584464858 +0100 +++ cobbler/snippets/SuSE/networking.xml 2012-01-21 22:21:33.798617402 +0100 @@ -1,107 +1,121 @@ #if $hostname == "" -#set $hostname = $system_name + #set $hostname = $system_name #end if -#set $my_hostname = $hostname.split('.',1)[:1][0] -#set $my_domainname = $hostname.split('.',1)[1:][0] -<networking> - <keep_install_network config:type="boolean">false</keep_install_network> - <dhcp_options> - <dhclient_client_id></dhclient_client_id> - <dhclient_hostname_option></dhclient_hostname_option> - </dhcp_options> - <dns> - <dhcp_hostname config:type="boolean">false</dhcp_hostname> - <dhcp_resolv config:type="boolean">false</dhcp_resolv> - <write_hostname config:type="boolean">false</write_hostname> - <resolv_conf_policy></resolv_conf_policy> - <hostname>$my_hostname</hostname> - <domain>$my_domainname</domain> - #if $getVar("name_servers_search","") != "" - <searchlist config:type="list"> - #for $sd in $name_servers_search - <search>$sd</search> +#if $getVar("dns_name_eth0","") != "" + #set $my_hostname = $hostname.split('.',1)[:1][0] + #set $my_domainname = $dns_name_eth0 +#else + #set $my_hostname = $hostname + #set $my_domainname = "site" +#end if + + <networking> + <keep_install_network config:type="boolean">false</keep_install_network> + <dhcp_options> + <dhclient_client_id></dhclient_client_id> + <dhclient_hostname_option></dhclient_hostname_option> + </dhcp_options> + <dns> + <dhcp_hostname config:type="boolean">false</dhcp_hostname> + <dhcp_resolv config:type="boolean">false</dhcp_resolv> + <write_hostname config:type="boolean">false</write_hostname> + <resolv_conf_policy></resolv_conf_policy> + <hostname>$my_hostname</hostname> + <domain>$my_domainname</domain> + #if $getVar("name_servers_search","") != "" + <searchlist config:type="list"> + #for $sd in $name_servers_search + <search>$sd</search> + #end for + </searchlist> + #end if + <nameservers config:type="list"> + #for $ns in $name_servers + <nameserver>$ns</nameserver> + #end for + </nameservers> + </dns> + <interfaces config:type="list"> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #set $mac = $idata["mac_address"] + #set $ip = $idata["ip_address"] + #set $netmask = $idata["netmask"] + #set $iface_type = $idata["interface_type"] + #set $bonding_opts = $idata["bonding_opts"] + #if $iface_type.lower() == "bond" + <interface> + <bonding_master>yes</bonding_master> + <bonding_module_opts>$bonding_opts.lower()</bonding_module_opts> + #set $loop_ikeys = $interfaces.keys() + #set $loop_counter = 0 + #for $loop_iface in $loop_ikeys + #set $loop_idata = $interfaces[$loop_iface] + #set $loop_interface_type = $loop_idata["interface_type"] + #if $loop_interface_type.lower == "bond_slave" + #if $loop_idata["interface_master"] != "" + #if $loop_idata["interface_master"].lower() == $iface.lower() + <bonding_slave$loop_counter>$loop_iface</bonding_slave$loop_counter> + #set $loop_counter += 1 + #end if + #end if + #end if + #end for + <bootproto>static</bootproto> + <device>$iface</device> + <ipaddr>$ip</ipaddr> + <netmask>$netmask</netmask> + <startmode>auto</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if + #if $iface_type.lower() in ["bond_slave","bridge_slave"] + <interface> + <bootproto>none</bootproto> + <device>$iface</device> + <startmode>off</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if + #if $iface_type.lower() in ["","na"] + <interface> + <bootproto>static</bootproto> + <device>$iface</device> + <lladdr>$mac.lower()</lladdr> + <ipaddr>$ip</ipaddr> + <netmask>$netmask</netmask> + <startmode>auto</startmode> + <usercontrol>no</usercontrol> + </interface> + #end if #end for - </searchlist> - #end if - <nameservers config:type="list"> - #for $ns in $name_servers - <nameserver>$ns</nameserver> + </interfaces> + <managed config:type="boolean">false</managed> + <net-udev config:type="list"> + #set $ikeys = $interfaces.keys() + #for $iface in $ikeys + #set $idata = $interfaces[$iface] + #set $mac = $idata["mac_address"] + #set $interface_type = $idata["interface_type"] + #if $interface_type.lower() not in ["bond","bridge"] + <rule> + <name>$iface</name> + <rule>ATTR{address}</rule> + <value>$mac.lower()</value> + </rule> + #end if #end for - </nameservers> - </dns> - <interfaces config:type="list"> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() == "bond" - <interface> - <bonding_master>yes</bonding_master> - <bonding_module_opts>$idata["bonding_opts"].lower()</bonding_module_opts> - #set $loop_ikeys = $interfaces.keys() - #set $loop_counter = 0 - #for $loop_iface in $loop_ikeys - #set $loop_idata = $interfaces[$loop_iface] - #if $loop_idata["interface_type"].lower == "bond_slave" - #if $loop_idata["interface_master"] != "" - #if $loop_idata["interface_master"].lower() == $iface.lower() - <bonding_slave$loop_counter>$loop_iface</bonding_slave$loop_counter> - #set $loop_counter += 1 - #end if - #end if - #end if - #end for - <bootproto>static</bootproto> - <device>$iface</device> - <ipaddr>$idata["ip_address"]</ipaddr> - <netmask>$idata["subnet"]</netmask> - <startmode>auto</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #if $idata["interface_type"].lower() in ["bond_slave","bridge_slave"] - <interface> - <bootproto>none</bootproto> - <device>$iface</device> - <startmode>off</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #if $idata["interface_type"].lower() in ["","na"] - <interface> - <bootproto>static</bootproto> - <device>$iface</device> - <lladdr>$idata["mac_address"].lower()</lladdr> - <ipaddr>$idata["ip_address"]</ipaddr> - <netmask>$idata["subnet"]</netmask> - <startmode>auto</startmode> - <usercontrol>no</usercontrol> - </interface> - #end if - #end for - </interfaces> - <managed config:type="boolean">false</managed> - <net-udev config:type="list"> - #set $ikeys = $interfaces.keys() - #for $iface in $ikeys - #set $idata = $interfaces[$iface] - #if $idata["interface_type"].lower() not in ["bond","bridge"] - <rule> - <name>$iface</name> - <rule>ATTR{address}</rule> - <value>$idata["mac_address"].lower()</value> - </rule> - #end if - #end for - </net-udev> - <routing> - <ip_forward config:type="boolean">false</ip_forward> - <routes config:type="list"> - <route> - <destination>default</destination> - <netmask>-</netmask> - <device>-</device> - <gateway>$gateway</gateway> - </route> - </routes> - </routing> -</networking> + </net-udev> + <routing> + <ip_forward config:type="boolean">false</ip_forward> + <routes config:type="list"> + <route> + <destination>default</destination> + <netmask>-</netmask> + <device>-</device> + <gateway>$gateway</gateway> + </route> + </routes> + </routing> + </networking> diff -Naur cobbler.git/snippets/SuSE/suse_scriptwrapper.xml cobbler/snippets/SuSE/suse_scriptwrapper.xml --- cobbler.git/snippets/SuSE/suse_scriptwrapper.xml 1970-01-01 01:00:00.000000000 +0100 +++ cobbler/snippets/SuSE/suse_scriptwrapper.xml 2012-01-21 22:21:33.798617402 +0100 @@ -0,0 +1,12 @@ + <script> +## <debug config:type="boolean">true</debug> +## <feedback config:type="boolean">false</feedback> +## <location></location> +## <network_needed config:type="boolean">true</network_needed> + <interpreter>shell</interpreter> +#set $filename = $wrappedscript.replace('/', '_') + <filename>$filename</filename> + <source><![CDATA[ +$SNIPPET($wrappedscript) +]]></source> + </script>
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org (mailto:cobbler-devel@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler-devel
cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org (mailto:cobbler-devel@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler-devel
On Thu, Feb 02, 2012 at 10:44:37AM -0500, Michael DeHaan wrote:
Anything for SuSE's default sample.xml should first strive for parity with the Red Hat example -- ideally it should set up networking, have the config integration, etc.
The autoyast_complex.xml provides the network setup in rhel style, so it should be used as default then. Could be renamed if required.
I'm not against shipping a "complex" example showing more but "complex" should not be the default. I'd like it to aim for parity first though.
By default the autoyast_complex.xml from the patch strives for exactly this.
The only thing which could be considered 'ontop' of typical RHEL deployment functionality is the snippetwrapper which when used enables sharing of snippets between sles/rhel. Its enabled in the current patch and uses a oneline script to fill /etc/motd .
Other tricks might make a good Wiki article.
So the snippetwrapper should be taken out here?
Christian
I think we're ok as is unless anyone has objections/suggestions.
Send me a github pull request and we can merge it.
Yes, it sounds like it should just replace the default if it more or less does what the RHEL-compatible one does.
I was confused earlier because it had some bonus capabilities that would require extra ksmeta params or whatever.
Thanks!
On Thursday, February 2, 2012 at 9:03 AM, Christian Horn wrote:
On Thu, Feb 02, 2012 at 10:44:37AM -0500, Michael DeHaan wrote:
Anything for SuSE's default sample.xml should first strive for parity with the Red Hat example -- ideally it should set up networking, have the config integration, etc.
The autoyast_complex.xml provides the network setup in rhel style, so it should be used as default then. Could be renamed if required.
I'm not against shipping a "complex" example showing more but "complex" should not be the default. I'd like it to aim for parity first though.
By default the autoyast_complex.xml from the patch strives for exactly this.
The only thing which could be considered 'ontop' of typical RHEL deployment functionality is the snippetwrapper which when used enables sharing of snippets between sles/rhel. Its enabled in the current patch and uses a oneline script to fill /etc/motd .
Other tricks might make a good Wiki article.
So the snippetwrapper should be taken out here?
Christian _______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org (mailto:cobbler-devel@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler-devel
cobbler-devel@lists.fedorahosted.org