Adding Worker Role to the Azure Project

Topics: Administration
Aug 3, 2011 at 12:54 PM

Hi Guys,

Unfortunately I couldn't find any resources about How can I add another Role to the Orchard Azure Project.

I added a worker role to the Azure project, but I got following errors after I ran the "BuildAzurePackage.cmd":

EXEC : error : Could not find a part of the path '[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot\BlogsUpdateCaller'. [[PROJECTDIR]\Orchard\AzurePackage.proj][PROJECTDIR]\Orchard\AzurePackage.proj(141,5): error MSB3073: The command ""C:\Program Files\Windows Azure SDK\v1.3\bin\cspack" "[PROJECTDIR]\Orchard\src\Orchard.Azure\Orchard.Azure.CloudService\ServiceDefinition.build.csdef" /role:Orchard.Azure.Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot";Orchard.Azure.Web.dll /sites:Orchard.Azure.Web;Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot" /rolePropertiesFile:Orchard.Azure.Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\Properties.txt" /out:"[PROJECTDIR]\Orchard\buildazure\Stage\Orchard.Azure.Web.cspkg"" exited with code 1.Done Building Project "[PROJECTDIR]\Orchard\AzurePackage.proj" (Build target(s)) -- FAILED.
Build FAILED."[PROJECTDIR]\Orchard\AzurePackage.proj" (Build target) (1) ->(Package-Stage target) ->  EXEC : error : Could not find a part of the path '[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot\BlogsUpdateCaller'. [[PROJECTDIR]\Orchard\AzurePackage.proj]  [PROJECTDIR]\Orchard\AzurePackage.proj(141,5): error MSB3073: The command ""C:\Program Files\Windows Azure SDK\v1.3\bin\cspack" "[PROJECTDIR]\Orchard\src\Orchard.Azure\Orchard.Azure.CloudService\ServiceDefinition.build.csdef"/role:Orchard.Azure.Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot";Orchard.Azure.Web.dll /sites:Orchard.Azure.Web;Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\roles\Orchard.Azure.Web\approot" /rolePropertiesFile:Orchard.Azure.Web;"[PROJECTDIR]\Orchard\buildazure\Compile\Orchard.Azure.CloudService.csx\Properties.txt" /out:"[PROJECTDIR]\Orchard\buildazure\Stage\Orchard.Azure.Web.cspkg"" exited with code 1.    0 Warning(s)    2 Error(s)

Coordinator
Aug 7, 2011 at 11:40 PM

Adding another role and compiling the project are two different concerns. You might just want to change the settings file you provide when deploying the package. There is a Instance="1" inside, and changing it to a higher number should do it while deploying.

Aug 8, 2011 at 7:20 AM

Hi Sebastien,

Actually I want to add another worker role to the same Azure package! but setting the Instance to the higher number is useful to run a same role on more cores, am I wrong?  

Coordinator
Aug 10, 2011 at 9:56 PM

Ok I see. The solution is not supposed to have multiple worker roles. Did you try to deploy the same package to different worker roles on Azure ?

Aug 11, 2011 at 7:19 PM

Actually I asked this question, because numbers of "Hosted Services" is limited and I always package related roles together on other regular ASP.NET projects.

but for packaging Azure projects I have to build package through "BuildAzurePackage.cmd" and it has the mentioned error!

P.S: I'm using Orchard 1.2