Timur Sufiev 32c9b0beaf Improve server-side caching.
Recreate cache when files are changed via admin API.
Send existing archive if data is hached.
Also modify .gitignore and setup.cfg

Change-Id: Ifb67856965586c2c5a115303e11c7b9856162aaf
2013-10-28 14:48:55 +04:00

81 lines
3.5 KiB
XML

<workflow>
<rule match="$.services[?(@.type == 'linuxTelnetService')].units[?(@.state.hostname and not @.temp.instanceName)]"
desc="Units of Linux Telnet service having hostname and image names assigned but without instances">
<report entity="unit">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">Creating Linux instance <select path="state.hostname"/> (<select path="name"/>)</parameter>
</report>
<update-cf-stack template="Linux" error="exception">
<parameter name="mappings">
<map>
<mapping name="instanceName"><select path="state.hostname"/></mapping>
<mapping name="instancePort">port-<select path="state.hostname"/></mapping>
<mapping name="networkName">network-<select path="/id"/></mapping>
<mapping name="userData">
<prepare-user-data template="Linux" initFile="linux_init.sh">
<parameter name="hostname"><select path="state.hostname"/></parameter>
<parameter name="unit"><select path="id"/></parameter>
<parameter name="service"><select path="::id"/></parameter>
</prepare-user-data>
</mapping>
<mapping name="instanceType"><select path="::flavor" default="m1.medium"/></mapping>
<mapping name="imageName"><select path="::osImage.name"/></mapping>
<mapping name="availabilityZone"><select path="::availabilityZone" default="nova"/></mapping>
</map>
</parameter>
<success>
<set path="temp.instanceName"><select path="name"/></set>
<report entity="unit">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">Linux instance <select path="state.hostname"/> (<select path="name"/>) created</parameter>
</report>
</success>
<failure>
<report entity="unit" level="error">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">Unable to deploy Linux instance <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/> </parameter>
</report>
<stop/>
</failure>
</update-cf-stack>
</rule>
<rule match="$.services[?(@.type == 'linuxTelnetService')].units[?(@.temp.instanceName and not @.state.TelnetInstalled)]"
desc="Units of Linux Telnet service which have got an instance deployed but have not got telnet service installed">
<report entity="unit">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">yum-ing telnet on unit <select path="state.hostname"/> (<select path="name"/>)</parameter>
</report>
<send-command template="DeployTelnet" error='exception'>
<parameter name="unit">
<select path="id"/>
</parameter>
<parameter name="service">
<select path="::id"/>
</parameter>
<parameter name="mappings">
<map>
<mapping name="appName">telnet-server</mapping>
</map>
</parameter>
<success>
<set path="state.TelnetInstalled"><true/></set>
<report entity="unit">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">Telnet deployed on <select path="state.hostname"/> (<select path="name"/>)</parameter>
</report>
</success>
<failure>
<report entity="unit" level="error">
<parameter name="id"><select path="id"/></parameter>
<parameter name="text">Unable to deploy Telnet on <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/></parameter>
</report>
<stop/>
</failure>
</send-command>
</rule>
</workflow>