Not that I''m much of a Solaris guy, and definitely not a Solaris 10 guy, but since nobody else had posted anything yet: reductivelabs.com/trac/puppet/wiki/PuppetSolaris#Solaris10 The good news is that it appears to be a completely hands-off puppetd installation. Just sign the client key afterwards on the puppetmaster and you''re set. The bad news is that it''s probably got several boneheaded procedures in it, or things that could be done differently or better. One other thing that came up during getting all this running: Gary Law''s packages register themselves in Solaris 10 SMF fine when the system is already up and running, but the lack of a running svc.configd means they don''t register themselves in a Jumpstart. I''ve hacked around this by symlinking his manifest under /var/svc, but is there any way to detect running in a Jumpstart and modify the svcadm command accordingly? -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University
Hi Mike On 20/11/2007, Mike Renfro <renfro@tntech.edu> wrote:> > Not that I''m much of a Solaris guy, and definitely not a Solaris 10 guy, > but since nobody else had posted anything yet: > > reductivelabs.com/trac/puppet/wiki/PuppetSolaris#Solaris10 > > The good news is that it appears to be a completely hands-off puppetd > installation. Just sign the client key afterwards on the puppetmaster > and you''re set. The bad news is that it''s probably got several > boneheaded procedures in it, or things that could be done differently or > better. > > One other thing that came up during getting all this running: Gary Law''s > packages register themselves in Solaris 10 SMF fine when the system is > already up and running, but the lack of a running svc.configd means they > don''t register themselves in a Jumpstart. I''ve hacked around this by > symlinking his manifest under /var/svc, but is there any way to detect > running in a Jumpstart and modify the svcadm command accordingly?Hi Mike I''m not sure if there''s an ''official'' way to detect installation under jumpstart, but looking out for a directory /a always worked for me. $PKG_INSTALL_ROOT is a variable that is usually /. If it''s /a, then you''re under jumpstart. this is available during postinstall scripting. It might be fixable by changing this in post install: if [ "\$autoenable_daemons" != "no" ] ; then /usr/sbin/svccfg import /opt/csw/var/svc/manifest/puppetd.xml || /bin/true /usr/sbin/svcadm enable svc:network/puppetd || /bin/true fi to this if [ "\$autoenable_daemons" != "no" ] ; then /usr/sbin/svccfg import \ $PKG_INSTALL_ROOT/opt/csw/var/svc/manifest/puppetd.xml || /bin/true /usr/sbin/svcadm enable svc:network/puppetd || /bin/true fi thoughts? i can knock up a revised package if you think this will work. Gary -- Gary Law _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com mail.madstop.com/mailman/listinfo/puppet-users
Matthew Flanagan
2007-Nov-21 00:01 UTC
Re: Solaris 10 Jumpstart instructions on the wiki now
On Nov 21, 2007 10:32 AM, Gary Law <gary.law@gmail.com> wrote:> Hi Mike > > > On 20/11/2007, Mike Renfro <renfro@tntech.edu> wrote: > > Not that I''m much of a Solaris guy, and definitely not a Solaris 10 guy, > > but since nobody else had posted anything yet: > > > > reductivelabs.com/trac/puppet/wiki/PuppetSolaris#Solaris10 > > > > The good news is that it appears to be a completely hands-off puppetd > > installation. Just sign the client key afterwards on the puppetmaster > > and you''re set. The bad news is that it''s probably got several > > boneheaded procedures in it, or things that could be done differently or > > better. > > > > One other thing that came up during getting all this running: Gary Law''s > > packages register themselves in Solaris 10 SMF fine when the system is > > already up and running, but the lack of a running svc.configd means they > > don''t register themselves in a Jumpstart. I''ve hacked around this by > > symlinking his manifest under /var/svc, but is there any way to detect > > running in a Jumpstart and modify the svcadm command accordingly? > > Hi Mike > > I''m not sure if there''s an ''official'' way to detect installation under > jumpstart, but looking out for a directory /a always worked for me. > > $PKG_INSTALL_ROOT is a variable that is usually /. If it''s /a, then you''re > under jumpstart. this is available during postinstall scripting. > > It might be fixable by changing this in post install: > > if [ "\$autoenable_daemons" != "no" ] ; then > /usr/sbin/svccfg import /opt/csw/var/svc/manifest/puppetd.xml || > /bin/true > /usr/sbin/svcadm enable svc:network/puppetd || /bin/true > fi > > to this > > if [ "\$autoenable_daemons" != "no" ] ; then > /usr/sbin/svccfg import \ > $PKG_INSTALL_ROOT/opt/csw/var/svc/manifest/puppetd.xml || /bin/true > /usr/sbin/svcadm enable svc:network/puppetd || /bin/true > fi > > thoughts? i can knock up a revised package if you think this will work. >> > Gary > -- > Gary Law > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > mail.madstop.com/mailman/listinfo/puppet-users > >Hi Gary, There are 2 ways you can do this. 1. Add a "manifest" class action to your package prototype files like so: i i.manifest i r.manifest f manifest /var/svc/manifest/puppetd.xml Which will do the right thing and install the manifest during a jumpstart and it will be automatically be imported on reboot. It also works on a running system. This requires a separate package to be built for Solaris 10. 2. Do some checking in the postinstall script to emulate what i.manifest does [1]. This would allow you to deliver one package for all versions of Solaris. [1] src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/pkgdefs/common_files/i.manifest regards matthew -- Matthew Flanagan wadofstuff.blogspot.com
On Wednesday 21 November 2007 00:32:41 Gary Law wrote:> Hi Mike > > On 20/11/2007, Mike Renfro <renfro@tntech.edu> wrote: > > Not that I''m much of a Solaris guy, and definitely not a Solaris 10 guy, > > but since nobody else had posted anything yet: > > > > reductivelabs.com/trac/puppet/wiki/PuppetSolaris#Solaris10 > > > > The good news is that it appears to be a completely hands-off puppetd > > installation. Just sign the client key afterwards on the puppetmaster > > and you''re set. The bad news is that it''s probably got several > > boneheaded procedures in it, or things that could be done differently or > > better. > > > > One other thing that came up during getting all this running: Gary Law''s > > packages register themselves in Solaris 10 SMF fine when the system is > > already up and running, but the lack of a running svc.configd means they > > don''t register themselves in a Jumpstart. I''ve hacked around this by > > symlinking his manifest under /var/svc, but is there any way to detect > > running in a Jumpstart and modify the svcadm command accordingly? > > Hi Mike > > I''m not sure if there''s an ''official'' way to detect installation under > jumpstart, but looking out for a directory /a always worked for me. > > $PKG_INSTALL_ROOT is a variable that is usually /. If it''s /a, then you''re > under jumpstart. this is available during postinstall scripting. > > It might be fixable by changing this in post install: > > if [ "\$autoenable_daemons" != "no" ] ; then > /usr/sbin/svccfg import /opt/csw/var/svc/manifest/puppetd.xml || > /bin/true > /usr/sbin/svcadm enable svc:network/puppetd || /bin/true > fi > > to this > > if [ "\$autoenable_daemons" != "no" ] ; then > /usr/sbin/svccfg import \ > $PKG_INSTALL_ROOT/opt/csw/var/svc/manifest/puppetd.xml || /bin/true > /usr/sbin/svcadm enable svc:network/puppetd || /bin/true > fi > > thoughts? i can knock up a revised package if you think this will work. > > > GaryHello Mike, Gary Gary, you'' re right, $PKG_INSTALL_ROOT is the usual way to determine if under jumpstart. Unfortunately, packages do not contain the necessary prefix / check for $PKG_INSTALL_ROOT sometimes. Means, these are only cleanly installable when the sytem is up and running. (would refer to the network mounted / otherwise) . Basically, I use one of the following methods: 1 ) repackaging of the package with $PKG_INSTALL_ROOT included (as Gary stated above) 2 ) using the JumpstartEnterpriseToolkit (JET) available from sun.com/download/products.xml?id=472a460f JET enables you to manage you installation via templates, where you put all the necessary in, e.g. ip-addresses, partitioning, mirroring, patches, (custom) packages). If you call ''make_client ,hostname>'' afterwards , it will generate the sysidcfg, profile, dhcp (or rarp) config, jet config and you are ready to netinstall your system. The clue for packages missing $PKG_INSTALL_ROOT is the ''custom_packages_X'' parameter. Instead of ''X'' you place either a numbr x ''m'' or ''n'' . The number x ans, that jet will reboot the client x times, before the package is installed. '' m'' means the boot before the last reboot, ''n'' constitutes the final running system (no more reboots needed). You can use cusom_scripts and custom_patches in this way too. regards, Frank
> One other thing that came up during getting all this running: GaryLaw''s> packages register themselves in Solaris 10 SMF fine when the system is > already up and running, but the lack of a running svc.configd meansthey> don''t register themselves in a Jumpstart. I''ve hacked around this by > symlinking his manifest under /var/svc, but is there any way to detect > running in a Jumpstart and modify the svcadm command accordingly?I''m looking to solve this (and a variety of other) problem by switching to using flash archives -- basically build a system the way you want it, patched and with third-party apps like puppet already in place, then create an archive. You can then install new hosts from the archive instead of from "raw" Solaris media and most of your customizations remain intact. Matt (still installing stuff by hand post-jumpstart...)
>I''m looking to solve this (and a variety of other) problem by switching to using flash archives -- basically build a system the way you want it, patched and with third-party apps like puppet already in place, then >create an archive. You can then install new hosts from the archive >instead of from "raw" Solaris media and most of your customizations >remain intact.Yeah, I''ve done similarly for other systems, but no more. Too tough to keep everything in sync afterwards. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research 931 372-3601 / Tennessee Technological University