Skip to content

Commit

Permalink
Pulled in Threax.Provision files.
Browse files Browse the repository at this point in the history
  • Loading branch information
threax committed Jul 7, 2020
1 parent 7d791f5 commit e8469b8
Show file tree
Hide file tree
Showing 94 changed files with 4,137 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SampleProvisioner/ArmTemplates/AppServicePlan/ArmAppServicePlan.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
using Threax.Provision.AzPowershell;

namespace SampleProvisioner.ArmTemplates.AppServicePlan
{
class ArmAppServicePlan : ArmTemplate
{
public ArmAppServicePlan(String name)
{
this.nameFromTemplate = name;
}

public String nameFromTemplate { get; set; }
}
}
27 changes: 27 additions & 0 deletions SampleProvisioner/ArmTemplates/AppServicePlan/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "invalidname!"
},
"location": {
"value": "East US"
},
"numberOfWorkers": {
"value": "1"
},
"sku": {
"value": "Basic"
},
"skuCode": {
"value": "B1"
},
"workerSize": {
"value": "0"
},
"workerSizeId": {
"value": "0"
}
}
}
48 changes: 48 additions & 0 deletions SampleProvisioner/ArmTemplates/AppServicePlan/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "string"
},
"skucode": {
"type": "string"
},
"workerSize": {
"type": "string"
},
"workerSizeId": {
"type": "string"
},
"numberOfWorkers": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "[parameters('name')]",
"type": "Microsoft.Web/serverfarms",
"location": "[parameters('location')]",
"kind": "linux",
"tags": {},
"properties": {
"name": "[parameters('name')]",
"workerSize": "[parameters('workerSize')]",
"workerSizeId": "[parameters('workerSizeId')]",
"numberOfWorkers": "[parameters('numberOfWorkers')]",
"reserved": true
},
"sku": {
"Tier": "[parameters('sku')]",
"Name": "[parameters('skuCode')]"
}
}
]
}
34 changes: 34 additions & 0 deletions SampleProvisioner/ArmTemplates/DockerWebApp/ArmDockerWebApp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Security;
using System.Security.Principal;
using System.Text;
using Threax.Provision.AzPowershell;

namespace SampleProvisioner.ArmTemplates.DockerWebApp
{
class ArmDockerWebApp : ArmTemplate
{
public String subscriptionId { get; set; }

public String nameFromTemplate { get; set; }

public String location { get; set; }

public String hostingPlanName { get; set; }

public String serverFarmResourceGroup { get; set; }

public bool alwaysOn { get; set; }

public String linuxFxVersion { get; set; }

public String dockerRegistryUrl { get; set; }

public String dockerRegistryUsername { get; set; }

public SecureString dockerRegistryPassword { get; set; }

//public String dockerRegistryStartupCommand { get; set; }
}
}
42 changes: 42 additions & 0 deletions SampleProvisioner/ArmTemplates/DockerWebApp/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"name": {
"value": "invalidname!"
},
"location": {
"value": "East US"
},
"hostingEnvironment": {
"value": ""
},
"hostingPlanName": {
"value": "invalidname!"
},
"serverFarmResourceGroup": {
"value": "invalidname!"
},
"alwaysOn": {
"value": false
},
"linuxFxVersion": {
"value": "invalid!!"
},
"dockerRegistryUrl": {
"value": "https://threaxtestacr.azurecr.io"
},
"dockerRegistryUsername": {
"value": "threaxtestacr"
},
"dockerRegistryPassword": {
"value": null
},
"dockerRegistryStartupCommand": {
"value": ""
}
}
}
81 changes: 81 additions & 0 deletions SampleProvisioner/ArmTemplates/DockerWebApp/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionId": {
"type": "string"
},
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"hostingEnvironment": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"serverFarmResourceGroup": {
"type": "string"
},
"alwaysOn": {
"type": "bool"
},
"linuxFxVersion": {
"type": "string"
},
"dockerRegistryUrl": {
"type": "string"
},
"dockerRegistryUsername": {
"type": "string"
},
"dockerRegistryPassword": {
"type": "securestring"
},
"dockerRegistryStartupCommand": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "[parameters('name')]",
"type": "Microsoft.Web/sites",
"location": "[parameters('location')]",
"tags": {},
"dependsOn": [],
"properties": {
"name": "[parameters('name')]",
"siteConfig": {
"appSettings": [
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "[parameters('dockerRegistryUrl')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "[parameters('dockerRegistryUsername')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "[parameters('dockerRegistryPassword')]"
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false"
}
],
"linuxFxVersion": "[parameters('linuxFxVersion')]",
"appCommandLine": "[parameters('dockerRegistryStartupCommand')]",
"alwaysOn": "[parameters('alwaysOn')]"
},
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('serverFarmResourceGroup'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": "[parameters('hostingEnvironment')]",
"clientAffinityEnabled": false
}
}
]
}
24 changes: 24 additions & 0 deletions SampleProvisioner/ArmTemplates/KeyVault/ArmKeyVault.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Threax.Provision.AzPowershell;

namespace SampleProvisioner.ArmTemplates.KeyVault
{
class ArmKeyVault : ArmTemplate
{
public ArmKeyVault(String nameFromTemplate, String location, String tenant)
{
this.nameFromTemplate = nameFromTemplate;
this.location = location;
this.tenant = tenant;
}

public String nameFromTemplate { get; set; }

public string location { get; }

public string tenant { get; }
}
}
43 changes: 43 additions & 0 deletions SampleProvisioner/ArmTemplates/KeyVault/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "invalidname!"
},
"location": {
"value": "eastus"
},
"sku": {
"value": "Standard"
},
"accessPolicies": {
"value": [

]
},
"tenant": {
"value": "00000000-0000-0000-0000-000000000000"
},
"enabledForDeployment": {
"value": false
},
"enabledForTemplateDeployment": {
"value": false
},
"enabledForDiskEncryption": {
"value": false
},
"enableRbacAuthorization": {
"value": false
},
"networkAcls": {
"value": {
"defaultAction": "allow",
"bypass": "AzureServices",
"ipRules": [],
"virtualNetworkRules": []
}
}
}
}
61 changes: 61 additions & 0 deletions SampleProvisioner/ArmTemplates/KeyVault/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "string"
},
"accessPolicies": {
"type": "array"
},
"tenant": {
"type": "string"
},
"enabledForDeployment": {
"type": "bool"
},
"enabledForTemplateDeployment": {
"type": "bool"
},
"enabledForDiskEncryption": {
"type": "bool"
},
"enableRbacAuthorization": {
"type": "bool"
},
"networkAcls": {
"type": "object"
}
},
"variables": {},
"resources": [
{
"apiVersion": "2018-02-14",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"type": "Microsoft.KeyVault/vaults",
"properties": {
"enabledForDeployment": "[parameters('enabledForDeployment')]",
"enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]",
"enabledForDiskEncryption": "[parameters('enabledForDiskEncryption')]",
"enableRbacAuthorization": "[parameters('enableRbacAuthorization')]",
"accessPolicies": "[parameters('accessPolicies')]",
"tenantId": "[parameters('tenant')]",
"sku": {
"name": "[parameters('sku')]",
"family": "A"
},
"networkAcls": "[parameters('networkAcls')]"
},
"tags": {},
"dependsOn": []
}
],
"outputs": {}
}
Loading

0 comments on commit e8469b8

Please sign in to comment.