Skip to content

Instantly share code, notes, and snippets.

@jserviceorg
Created November 15, 2017 19:07
Show Gist options
  • Save jserviceorg/6ce2fd8469d2ffdc609539cc9b803e9a to your computer and use it in GitHub Desktop.
Save jserviceorg/6ce2fd8469d2ffdc609539cc9b803e9a to your computer and use it in GitHub Desktop.
smartos varnish smf
<?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='network/varnish' type='service' version='0'>
<create_default_instance enabled='true'/>
<single_instance/>
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<dependency name='filesystem' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<method_context>
<method_credential group='varnish' privileges='basic,net_privaddr' user='varnish'/>
<method_environment>
<envvar name='PATH' value='/opt/local/sbin:/opt/local/bin:/sbin:/usr/sbin:/usr/bin:/opt/varnish-live/bin:/opt/varnish-live/sbin'/>
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='/opt/varnish-live/sbin/varnishd -j solaris -a %{listen} -l %{size} -f %{config_file} -a 0.0.0.0:8081,PROXY ' timeout_seconds='60'/>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
<property_group name='application' type='application'>
<propval name='config_file' type='astring' value='/opt/local/etc/varnish-live/default.vcl'/>
<propval name='listen' type='astring' value='0.0.0.0:8080'/>
<propval name='size' type='astring' value='2048M'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='contract'/>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Evolving'/>
<template>
<common_name>
<loctext xml:lang='C'>Varnish daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment