Services/Resources/Scaffolding/General/WorkerRole/WorkerRole.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="DummyName" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WorkerRole name="$RoleName$" vmsize="Small">
    <Endpoints>
      <InputEndpoint name="HttpIn" protocol="tcp" port="$Port$" />
    </Endpoints>
    <Startup>
      <Task executionContext="elevated" commandLine="setup_worker.cmd &gt; log.txt">
        <Environment>
          <Variable name="EMULATED">
            <RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
          </Variable>
          <Variable name="RUNTIMEID" value="" />
          <Variable name="RUNTIMEURL" value=""/>
        </Environment>
      </Task>
      <Task executionContext="elevated" commandLine=".\startup.cmd &gt; startup_log.txt" />
    </Startup>
    <Runtime>
      <Environment>
        <Variable name="PORT">
          <RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[@name='HttpIn']/@port" />
        </Variable>
        <Variable name="EMULATED">
          <RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
        </Variable>
      </Environment>
      <EntryPoint>
        <ProgramEntryPoint commandLine="worker.cmd" setReadyOnProcessStart="true"/>
      </EntryPoint>
    </Runtime>
  </WorkerRole>
</ServiceDefinition>