Skip to content

Commit

Permalink
Update deployment of telemetry application (dotnet#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexperovich authored Oct 21, 2020
1 parent 6eee353 commit 8cefb37
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 27 deletions.
36 changes: 22 additions & 14 deletions eng/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,30 @@ stages:
artifact: TelemetryApplication
- download: current
artifact: ReleaseUtilities
- task: ServiceFabricPowerShell@1
displayName: Refresh Service Fabric Services (Telemetry)
inputs:
clusterConnection: ${{ parameters.ServiceFabricConnection }}
scriptType: filePath
scriptPath: $(Pipeline.Workspace)/ReleaseUtilities/refresh-service-fabric-services.ps1
scriptArguments: -ApplicationName fabric:/TelemetryApplication
-ApplicationManifestPath $(Pipeline.Workspace)/TelemetryApplication/projectartifacts/ApplicationPackageRoot/ApplicationManifest.xml
-ServicesSourceFolder $(Build.SourcesDirectory)/src/Telemetry/
- task: ServiceFabricDeploy@1
- task: AzureCLI@2
displayName: Deploy Service Fabric Application (Telemetry)
inputs:
applicationPackagePath: $(Pipeline.Workspace)/TelemetryApplication/applicationpackage
serviceConnectionName: ${{ parameters.ServiceFabricConnection }}
publishProfilePath: $(Pipeline.Workspace)/TelemetryApplication/projectartifacts/PublishProfiles/$(PublishProfile).xml
applicationParameterPath: $(Pipeline.Workspace)/TelemetryApplication/projectartifacts/ApplicationParameters/$(PublishProfile).xml
azureSubscription: ${{ parameters.Subscription }}
scriptType: ps
scriptLocation: inlineScript
inlineScript: |
$parameters = @{
"PublishProfile" = $env:PublishProfilePath;
"ApplicationPackage" = $env:ApplicationPackage;
"ForceUpgrade" = $false;
"ApplicationName" = "fabric:/TelemetryApplication";
"ApplicationManifestPath" = $env:ApplicationManifestPath;
"ServicesSourceFolder" = $env:ServicesSourceFolder;
}
if ($env:DisableAutoRollBack -eq 'true') {
$parameters["ForceUpgrade"] = $true;
}
eng/deployment/deploy.ps1 @parameters
env:
PublishProfilePath: $(Pipeline.Workspace)/TelemetryApplication/projectartifacts/PublishProfiles/$(PublishProfile).xml
ApplicationPackage: $(Pipeline.Workspace)/TelemetryApplication/applicationpackage
ApplicationManifestPath: $(Pipeline.Workspace)/TelemetryApplication/projectartifacts/ApplicationPackageRoot/ApplicationManifest.xml
ServicesSourceFolder: $(Build.SourcesDirectory)/src/Telemetry/

- job: deployStatus
displayName: Deploy dotnet-status web app
Expand Down
26 changes: 20 additions & 6 deletions src/Telemetry/TelemetryApplication/PublishProfiles/Int.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,27 @@
AzureActiveDirectory="true"
ServerCertThumbprint="0123456789012345678901234567890123456789" />
-->
<ClusterConnectionParameters ConnectionEndpoint="maestro-int.westus2.cloudapp.azure.com:19000" X509Credential="true"
ServerCertThumbprint="6D5B19EC4F23B78811ED38EBBEBFABD8713A4C41"
FindType="FindByThumbprint" FindValue="9C2D2C0F9A13D303D7E186DE476DBF4B51D056F9"
StoreLocation="LocalMachine" StoreName="My" />
<ClusterConnectionParameters
ConnectionEndpoint="maestro-int.westus2.cloudapp.azure.com:19000"
X509Credential="true"
FindType="FindBySubjectName"
FindValue="maestro.client.westus2.cloudapp.azure.com"
StoreLocation="CurrentUser"
StoreName="My" />
<CertificateSource
VaultName="maestroint"
CertificateName="maestro-client-westus2-cloudapp-azure-com" />
<ApplicationParameterFile Path="..\ApplicationParameters\Int.xml" />
<CopyPackageParameters CompressPackage="true" />
<UpgradeDeployment Mode="Monitored" Enabled="true">
<Parameters FailureAction="Rollback" Force="True" />
<UpgradeDeployment Enabled="true" Mode="Monitored">
<Parameters
FailureAction="Rollback"
UpgradeReplicaSetCheckTimeoutSec="120"
HealthCheckWaitDurationSec="0"
HealthCheckRetryTimeoutSec="600"
HealthCheckStableDurationSec="60"
UpgradeDomainTimeoutSec="660"
UpgradeTimeoutSec="3600"
ForceRestart="true"/>
</UpgradeDeployment>
</PublishProfile>
28 changes: 21 additions & 7 deletions src/Telemetry/TelemetryApplication/PublishProfiles/Prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,27 @@
AzureActiveDirectory="true"
ServerCertThumbprint="0123456789012345678901234567890123456789" />
-->
<ClusterConnectionParameters ConnectionEndpoint="maestro-prod.westus2.cloudapp.azure.com:19000" X509Credential="true"
ServerCertThumbprint="6D5B19EC4F23B78811ED38EBBEBFABD8713A4C41"
FindType="FindByThumbprint" FindValue="9C2D2C0F9A13D303D7E186DE476DBF4B51D056F9"
StoreLocation="LocalMachine" StoreName="My" />
<ClusterConnectionParameters
ConnectionEndpoint="maestro-prod.westus2.cloudapp.azure.com:19000"
X509Credential="true"
FindType="FindBySubjectName"
FindValue="maestro.client.westus2.cloudapp.azure.com"
StoreLocation="CurrentUser"
StoreName="My" />
<CertificateSource
VaultName="maestroprod"
CertificateName="maestro-client-westus2-cloudapp-azure-com" />
<ApplicationParameterFile Path="..\ApplicationParameters\Prod.xml" />
<CopyPackageParameters CompressPackage="true" />
<UpgradeDeployment Mode="Monitored" Enabled="true">
<Parameters FailureAction="Rollback" Force="True" />
<UpgradeDeployment Enabled="true" Mode="Monitored">
<Parameters
FailureAction="Rollback"
UpgradeReplicaSetCheckTimeoutSec="120"
HealthCheckWaitDurationSec="0"
HealthCheckRetryTimeoutSec="600"
HealthCheckStableDurationSec="60"
UpgradeDomainTimeoutSec="660"
UpgradeTimeoutSec="3600"
ForceRestart="true"/>
</UpgradeDeployment>
</PublishProfile>
</PublishProfile>

0 comments on commit 8cefb37

Please sign in to comment.