Lansing DevOps Meetup
June 5th, 2018
Now I am assimilated...
More at: https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages
dotnet test
dotnet publish
New-AzureRmResourceGroupDeployment ...
az functionapp deployment source config-zip ...
[FunctionName("DevHealthCheckScheduler")]
[Disable("DISABLE_SCHEDULERS")]
[FunctionName("DevHealthCheckScheduler")]
[Disable("DISABLE_SCHEDULERS")]
public static void Run(
[TimerTrigger("%DevHealthCheckSchedulerCronExpression%")] TimerInfo myTimer,
[OrchestrationClient] DurableOrchestrationClient starter)
{
starter.StartNewAsync("Orchestrators_HealthCheckMasterOrchestrator", "dev");
}
[FunctionName("Activities_HealthChecker")]
public static AppEnvStatus GetHealthCheckStatus(
[ActivityTrigger] HealthCheckEndpoint healthCheckEndpoint,
[Table("AppEnvStatuses")] CloudTable appEnvStatuses)
{
using (HttpClient httpClient = new HttpClient())
{
AppEnvStatus appEnvStatus = SlackBotUtils.RetrieveAppEnvStatus(healthCheckEndpoint, appEnvStatuses);
appEnvStatus.LatestStatus = AppEnvStatus.FAILURE;
appEnvStatus.LatestStatusTimeStamp = DateTime.Now;
RequestHealthCheckEndpoint(healthCheckEndpoint, appEnvStatuses, httpClient, appEnvStatus);
return appEnvStatus;
}
}