none
Biztalk Deployment FrameWork to restart only Few Host Instances RRS feed

  • Question

  • Hi All,

    How do we control in Deployment Framework to restart only Few Hostinstances at present Bounce BizTalk Command is restarting all the host instances?

    Thanks,

    Sujith.

    Monday, November 30, 2015 11:02 AM

Answers

  • Hi Sujith,

    Thank you for posting in MSDN forum.

    With BTDF you should achive it, Let me provide you some code for reference,

    In below script there are three host ReceiveHost, SendHost and OrchHost

    with this script only will restart these three hosts.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- 
      Deployment Framework for BizTalk
      Copyright (C) 2008-14 Thomas F. Abraham, 2004-08 Scott Colestock
    -->
    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Installer" ToolsVersion="4.0">
      <PropertyGroup>
        <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
        <Platform Condition="'$(Platform)' == ''">x86</Platform>
        <SchemaVersion>1.0</SchemaVersion>
        <ProjectName>abc.Integration.abcff</ProjectName>
        <ProjectVersion>1.0</ProjectVersion>
        <IncludeSSO>False</IncludeSSO>
        <UsingMasterBindings>True</UsingMasterBindings>
        <RequireXmlPreprocessDirectives>False</RequireXmlPreprocessDirectives>
        <ApplyXmlEscape>True</ApplyXmlEscape>
        <IncludeOrchestrations>false</IncludeOrchestrations>
        <IncludeTransforms>false</IncludeTransforms>
        <SkipIISReset>true</SkipIISReset>
        <SkipHostInstancesRestart>False</SkipHostInstancesRestart>
        </PropertyGroup>
      <PropertyGroup>
        <!-- Properties related to building an MSI for server deployments -->
        <!-- BizTalk App Version Upgrade -->
        <!--   For each new product release to be deployed to your BizTalk servers: -->
        <!--     1) Increment ProductVersion -->
        <!--     2) Generate a new GUID and update ProductId with the new GUID -->
        <!--   This allows the new MSI to automatically uninstall (not undeploy!) the old MSI and install the new one. -->
        <ProductVersion>1.0.0</ProductVersion>
        <ProductId>dd853ecf-b7f4-4ffa-9108-299ce18ff736</ProductId>
        <!-- BizTalk App Version Upgrade -->
        <ProductName>abc.Integration.abcff for BizTalk</ProductName>
        <Manufacturer>Deployment Framework User</Manufacturer>
        <PackageDescription>abc.Integration.abcff</PackageDescription>
        <!-- NEVER change the ProductUpgradeCode. -->
        <ProductUpgradeCode>83410ee1-4d88-4647-8da1-2bda1e75894f</ProductUpgradeCode>
      </PropertyGroup>
      <!-- Under TFS Team Build, set CustomizableOutDir property to true in TFS 2005/2008/2010 UpgradeTemplate. -->
      <!-- With a workflow build, copy the default template then modify the MSBuild task for the solution build. Set OutDir to blank and -->
      <!-- CommandLineArguments to String.Format("/p:SkipInvalidConfigurations=true;TeamBuildOutDir=""{0}"" {1}", BinariesDirectory, MSBuildArguments). -->
      <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Debug\</OutputPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Release\</OutputPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Server'">
        <DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath>
        <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
        <DeployPDBsToGac>false</DeployPDBsToGac>
      </PropertyGroup>
      <ItemGroup>
        <PropsFromEnvSettings Include="ReceiveHost;SendHost;OrchHost" />
      </ItemGroup>
      <!-- !!! TODO !!! -->
      <!-- Add ItemGroup elements that contain one or more Schemas, Orchestrations, Transforms, etc. elements that describe -->
      <!-- the specific artifacts in your solution that need to be deployed. Use IntelliSense as a guide. -->
      <ItemGroup>
       <AppsToReference Include="abc.Integration.Common" />
      </ItemGroup>
       <ItemGroup>
        <Schemas Include="abc.Integration.abcff.dll">
          <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
        </Schemas>
      </ItemGroup>
      <ItemGroup>
        <BizTalkHosts Include="$(SendHost);$(ReceiveHost);$(OrchHost)" />
      </ItemGroup>
      <!-- !!! TODO !!! -->
      <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
      <!--
        The Deployment Framework automatically packages most files into the server install MSI.
        However, if there are special folders that you need to include in the MSI, you can
        copy them to the folder $(RedistDir) in the CustomRedist target.
        To include individual files, add an ItemGroup with AdditionalFiles elements.
      -->
      <Target Name="CustomRedist">
      </Target>
    </Project>

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, November 30, 2015 11:19 AM
    Moderator

All replies

  • Hi Sujith,

    Thank you for posting in MSDN forum.

    With BTDF you should achive it, Let me provide you some code for reference,

    In below script there are three host ReceiveHost, SendHost and OrchHost

    with this script only will restart these three hosts.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- 
      Deployment Framework for BizTalk
      Copyright (C) 2008-14 Thomas F. Abraham, 2004-08 Scott Colestock
    -->
    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Installer" ToolsVersion="4.0">
      <PropertyGroup>
        <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
        <Platform Condition="'$(Platform)' == ''">x86</Platform>
        <SchemaVersion>1.0</SchemaVersion>
        <ProjectName>abc.Integration.abcff</ProjectName>
        <ProjectVersion>1.0</ProjectVersion>
        <IncludeSSO>False</IncludeSSO>
        <UsingMasterBindings>True</UsingMasterBindings>
        <RequireXmlPreprocessDirectives>False</RequireXmlPreprocessDirectives>
        <ApplyXmlEscape>True</ApplyXmlEscape>
        <IncludeOrchestrations>false</IncludeOrchestrations>
        <IncludeTransforms>false</IncludeTransforms>
        <SkipIISReset>true</SkipIISReset>
        <SkipHostInstancesRestart>False</SkipHostInstancesRestart>
        </PropertyGroup>
      <PropertyGroup>
        <!-- Properties related to building an MSI for server deployments -->
        <!-- BizTalk App Version Upgrade -->
        <!--   For each new product release to be deployed to your BizTalk servers: -->
        <!--     1) Increment ProductVersion -->
        <!--     2) Generate a new GUID and update ProductId with the new GUID -->
        <!--   This allows the new MSI to automatically uninstall (not undeploy!) the old MSI and install the new one. -->
        <ProductVersion>1.0.0</ProductVersion>
        <ProductId>dd853ecf-b7f4-4ffa-9108-299ce18ff736</ProductId>
        <!-- BizTalk App Version Upgrade -->
        <ProductName>abc.Integration.abcff for BizTalk</ProductName>
        <Manufacturer>Deployment Framework User</Manufacturer>
        <PackageDescription>abc.Integration.abcff</PackageDescription>
        <!-- NEVER change the ProductUpgradeCode. -->
        <ProductUpgradeCode>83410ee1-4d88-4647-8da1-2bda1e75894f</ProductUpgradeCode>
      </PropertyGroup>
      <!-- Under TFS Team Build, set CustomizableOutDir property to true in TFS 2005/2008/2010 UpgradeTemplate. -->
      <!-- With a workflow build, copy the default template then modify the MSBuild task for the solution build. Set OutDir to blank and -->
      <!-- CommandLineArguments to String.Format("/p:SkipInvalidConfigurations=true;TeamBuildOutDir=""{0}"" {1}", BinariesDirectory, MSBuildArguments). -->
      <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Debug\</OutputPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' == ''">bin\Release\</OutputPath>
        <OutputPath Condition="'$(TeamBuildOutDir)' != ''">$(TeamBuildOutDir)</OutputPath>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Server'">
        <DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath>
        <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
        <DeployPDBsToGac>false</DeployPDBsToGac>
      </PropertyGroup>
      <ItemGroup>
        <PropsFromEnvSettings Include="ReceiveHost;SendHost;OrchHost" />
      </ItemGroup>
      <!-- !!! TODO !!! -->
      <!-- Add ItemGroup elements that contain one or more Schemas, Orchestrations, Transforms, etc. elements that describe -->
      <!-- the specific artifacts in your solution that need to be deployed. Use IntelliSense as a guide. -->
      <ItemGroup>
       <AppsToReference Include="abc.Integration.Common" />
      </ItemGroup>
       <ItemGroup>
        <Schemas Include="abc.Integration.abcff.dll">
          <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
        </Schemas>
      </ItemGroup>
      <ItemGroup>
        <BizTalkHosts Include="$(SendHost);$(ReceiveHost);$(OrchHost)" />
      </ItemGroup>
      <!-- !!! TODO !!! -->
      <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
      <!--
        The Deployment Framework automatically packages most files into the server install MSI.
        However, if there are special folders that you need to include in the MSI, you can
        copy them to the folder $(RedistDir) in the CustomRedist target.
        To include individual files, add an ItemGroup with AdditionalFiles elements.
      -->
      <Target Name="CustomRedist">
      </Target>
    </Project>

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, November 30, 2015 11:19 AM
    Moderator
  • Sorry to Post I have used the BizTalk Host Include to solve this from BTDF
    Monday, November 30, 2015 11:23 AM
  • Sorry to Post I have used the BizTalk Host Include to solve this from BTDF
    So Is your issue resolved ?

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, November 30, 2015 11:31 AM
    Moderator
  • Yes kamalesh Thanks
    Monday, November 30, 2015 1:00 PM