Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

maskx/ARMOrchestration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Azure Resource Manager

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/

Quick start

  1. Using ARMOrchestrationService
 var sqlConfig = new ARMOrchestrationSqlServerConfig()
    {
        Database = new DatabaseConfig()
        {
            ConnectionString = TestHelper.ConnectionString,
            AutoCreate = true
        }
    };
 services.UsingARMOrchestration(sqlConfig);
  1. Add On-premises support

for more information about IInfrastructure, please reference IInfrastructure

 services.AddSingleton<IInfrastructure>((sp) =>
 {
     return new MockInfrastructure(sp);
 });
  1. Add Communication Processsor

for more information about Communication Processor, please reference https://github.com/maskx/OrchestrationService#icommunicationprocessor

 services.AddSingleton<ICommunicationProcessor>((sp) =>
 {
     return new MockCommunicationProcessor();
 });
  1. Provisioning resource by ARM Templates
 var instance = webHost.Services.GetService<ARMOrchestrationClient>().Run(
    new DeploymentOrchestrationInput()
    {
        ApiVersion = "1.0",
        DeploymentName = "UsingARMOrchestrationTest",
        DeploymentId = Guid.NewGuid().ToString("N"),
        TemplateContent = TestHelper.GetTemplateContent("dependsOn/OneResourceName"),
        SubscriptionId = TestHelper.SubscriptionId,
        ResourceGroup = TestHelper.ResourceGroup,
        CorrelationId = Guid.NewGuid().ToString("N"),
        GroupId = Guid.NewGuid().ToString("N"),
        GroupType = "ResourceGroup",
        HierarchyId = "001002003004005",
        TenantId = "TenantId"
    }).Result;

IInfrastructure

Property

Method

DeploymentOrchestrationInput

About

Using ARM provisioning resource in On-premises environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published