Skip to content

Instantly share code, notes, and snippets.

@AlainODea
Last active August 29, 2015 13:58
Show Gist options
  • Save AlainODea/10431222 to your computer and use it in GitHub Desktop.
Save AlainODea/10431222 to your computer and use it in GitHub Desktop.
WIP: SMF manifest for GHC builder client (aka build slave)
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="ghc-builder-client">
<service name="site/ghc-builder-client" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<exec_method type="method" name="start" exec="ctrun builder-client -v &amp;" timeout_seconds="10">
<method_context working_directory="/home/ghcbld/builder">
<method_credential user="ghcbld" group="ghcbld" />
<method_environment>
<envvar name='HOME' value='/home/ghcbld/builder'/>
<envvar name='PATH' value='/home/ghcbld/.cabal/bin:/usr/local/sbin:/usr/local/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin'/>
<envvar name='LC_ALL' value='en_US.UTF-8'/>
<envvar name='SHELL' value='/bin/bash'/>
</method_environment>
</method_context>
</exec_method>
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="30" />
<template>
<common_name>
<loctext xml:lang="C">GHC builder client</loctext>
</common_name>
</template>
</service>
</service_bundle>
@AlainODea
Copy link
Author

Run as non-root user to avoid the you can do anything permissions results that fail tests like ../../libraries/directory/tests getPermissions001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment