Since my pilot program is wrapping up and I'll start deploying to our entire environment soon, I've finally gotten around to needing a Solaris 10 service since it doesn't ship with one, yet. I've adapted the files Ryan provided long ago to Cfengine 3 and they seem to be working.
It's worth noting that the service only starts cf-execd since SMF only monitors and manages the processes it starts. This makes Cfengine something of a multi-layered service, since SMF ensures cf-execd is running and, in turn, cf-execd ensures that cf-serverd (and cf-monitord for those of us running Nova) is running. Kill any of those off and the appropriate watcher (svc.startd or cf-execd) will restart them accordingly. I'd appreciate any critiques of the service files that would help make them more robust. Feel free to use them at your own risk. :) Justin -----Original Message----- From: Anderson, Ryan C (US SSA) [mailto:ryan.ander...@baesystems.com] Sent: Wednesday, July 01, 2009 3:40 PM To: Justin Lloyd; Robert Markula; help-cfengine@cfengine.org Subject: RE: How do you start cfengine? Attached is a manifest (cfservd.xml; svccfg import cfservd.xml) and method (cfservd; copy to /lib/svc/method). Its cfengine 2 only, but it is a good starting point for modifying it to work for cfengine 3. RCA -- UNIX Administrator, BAE Systems EIT desk 763-572-6684 mobile 612-419-9362 -----Original Message----- From: help-cfengine-bounces+ryan.anderson=baesystems....@cfengine.org [mailto:help-cfengine-bounces+ryan.anderson=baesystems....@cfengine.org] On Behalf Of Justin Lloyd Sent: Wednesday, July 01, 2009 2:05 PM To: Robert Markula; help-cfengine@cfengine.org Subject: RE: How do you start cfengine? Hi all, I don't have an answer for Robert as we're not implementing cfengine until starting sometime next month, most likely, but I wanted to ask a similar question. Has anyone written a Solaris 10 service (i.e. manifest and method files) for cfengine 2 and/or 3? It should be straightforward but I'd hate to go about reinventing the wheel if there's anything good already done. Thanks, Justin -----Original Message----- From: help-cfengine-bounces+jlloyd=digitalglobe....@cfengine.org [mailto:help-cfengine-bounces+jlloyd=digitalglobe....@cfengine.org] On Behalf Of Robert Markula Sent: Wednesday, July 01, 2009 12:17 PM To: help-cfengine@cfengine.org Subject: How do you start cfengine? Hey guys, I'm quite new to cfengine (using cfengine3), and at the moment I'm trying understand the principle on how to start cfengine on the server and on the clients. For the server, there are three daemons: - cf-execd - cf-monitord - cf-serverd And for the clients, there are two: - cf-execd - cf-monitord Do you use some initscript to start these? Or do you just start cf-execd which does the rest (what I imagine not to be a good idea, since the daemons wouldn't gracefully terminate on shutdown)? And can you give me an example of an initscript for cfengine3? I tried to brew one myself, but I experience some oddities that I don't think to be normal. Cheers, Robert _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received. DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives.
<?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type='manifest' name='export'> <service name='site/cfengine' type='service' version='0'> <create_default_instance enabled='true'/> <single_instance/> <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/filesystem/local'/> </dependency> <dependency name='net-loopback' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/network/loopback'/> </dependency> <dependency name='net-physical' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/network/physical'/> </dependency> <dependency name='utmp' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/utmp'/> </dependency> <dependency name='executable_file' grouping='require_all' restart_on='refresh' type='path'> <service_fmri value='file://localhost/var/cfengine/bin/cf-execd'/> </dependency> <dependency name='config_data' grouping='require_all' restart_on='restart' type='path'> <service_fmri value='file://localhost/var/cfengine/inputs/failsafe.cf' /> <service_fmri value='file://localhost/var/cfengine/inputs/update.cf' /> </dependency> <dependent name='cfservd_multi-user-server' restart_on='none' grouping='require_all'> <service_fmri value='svc:/milestone/multi-user-server'/> </dependent> <exec_method name='start' type='method' exec='/lib/svc/method/cfengine start' timeout_seconds='60'> <method_context/> </exec_method> <exec_method name='stop' type='method' exec='/lib/svc/method/cfengine stop' timeout_seconds='60'> <method_context/> </exec_method> <exec_method name='refresh' type='method' exec='/lib/svc/method/cfengine restart' timeout_seconds='60'> <method_context/> </exec_method> <stability value='Unstable'/> <template> <common_name> <loctext xml:lang='C'>Cfengine Nova</loctext> </common_name> </template> </service> </service_bundle>
cfengine
Description: cfengine
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine