Search code examples
azurevisual-studio-2013azure-storageazure-web-roleswebrole

Multiple cloud projects publishing to the same web role


Is it possible to have multiple cloud projects independently publish to one web role?

For example, cloud project A's ServiceDefinition.csdef would contain:

  <WebRole name="SomeWebRole" vmsize="Small">
    <Sites>
      <Site name="WebA">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
  </WebRole>

And project B:

  <WebRole name="SomeWebRole" vmsize="Small">
    <Sites>
      <Site name="WebB">
        <Bindings>
          <Binding name="Endpoint2" endpointName="Endpoint2" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint2" protocol="http" port="81" />
    </Endpoints>
  </WebRole>

They have different <Site> names and are bound to different endpoints (port 80 and port 81).


Solution

  • Well ... no, you can't deploy from different cloud projects to a single cloud service ... because you need to describe the whole service (including its websites) in a single csdef file that must belong to a single cloud project.