Skip to content

Commit a59bbf0

Browse files
Cory Fowlerlindydonna
Cory Fowler
authored andcommitted
Added ARM Template (lindydonna#1)
* Moved images to a folder * added deployment template * updated storage location to variable to remove redundant selection * updated template * removed description * descriptions removed * adding gitignore * added repoUrl and branch for continuos deployment * added dependsOn for Appsettings * updated template
1 parent fd521bf commit a59bbf0

9 files changed

+742
-2
lines changed

.gitignore

+613
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

CardGenerator/image-lib.csx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void RenderText(Image source, Graphics graphics, float yCoordinate, strin
7575

7676
static string GetFullImagePath(string filename)
7777
{
78-
var appPath = Path.Combine(Environment.GetEnvironmentVariable("HOME"), "site", "wwwroot", "CardGenerator");
78+
var appPath = Path.Combine(Environment.GetEnvironmentVariable("HOME"), "site", "wwwroot", "CardGenerator", "assets");
7979
return Path.Combine(appPath, filename);
8080
}
8181

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# CoderCards
1+
# CoderCards
2+
3+
4+
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json)

azuredeploy.json

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"siteName": {
6+
"type": "string"
7+
},
8+
"location": {
9+
"type": "string",
10+
"allowedValues": [
11+
"Brazil South",
12+
"East US",
13+
"East US 2",
14+
"Central US",
15+
"North Central US",
16+
"South Central US",
17+
"West US",
18+
"West US 2"
19+
],
20+
"defaultValue": "[resourceGroup().location]"
21+
},
22+
"emotionAPIKey": {
23+
"type": "string"
24+
},
25+
"branch": {
26+
"type": "string",
27+
"defaultValue": "master",
28+
"allowedValues": [
29+
"master"
30+
]
31+
},
32+
"repoUrl": {
33+
"type": "string"
34+
}
35+
},
36+
"variables": {
37+
"appServicePlanName": "[parameters('siteName')]",
38+
"storageAccountName": "[toLower(parameters('siteName'))]",
39+
"storageAccountType": "Standard_LRS",
40+
"storageAccountid": "[concat(resourceGroup().id,'/providers/','Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
41+
"storageLocation": "[parameters('location')]"
42+
},
43+
"resources": [
44+
{
45+
"type": "Microsoft.Storage/storageAccounts",
46+
"name": "[variables('storageAccountName')]",
47+
"apiVersion": "2015-05-01-preview",
48+
"location": "[variables('storageLocation')]",
49+
"properties": {
50+
"accountType": "[variables('storageAccountType')]"
51+
}
52+
},
53+
{
54+
"apiVersion": "2015-08-01",
55+
"name": "[variables('appServicePlanName')]",
56+
"type": "Microsoft.Web/serverfarms",
57+
"location": "[parameters('location')]",
58+
"sku": {
59+
"name": "F1",
60+
"tier": "Free"
61+
},
62+
"properties": {}
63+
},
64+
{
65+
"apiVersion": "2015-08-01",
66+
"name": "[parameters('siteName')]",
67+
"type": "Microsoft.Web/sites",
68+
"kind": "functionapp",
69+
"location": "[parameters('location')]",
70+
"dependsOn": [
71+
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
72+
"[resourceId('Microsoft.Web/serverfarms', parameters('siteName'))]"
73+
],
74+
"properties": {
75+
"serverFarmId": "[variables('appServicePlanName')]",
76+
"alwaysOn": true
77+
},
78+
"resources": [
79+
{
80+
"apiVersion": "2015-08-01",
81+
"name": "appsettings",
82+
"type": "config",
83+
"dependsOn": [
84+
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]",
85+
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
86+
],
87+
"properties": {
88+
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
89+
"AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
90+
"AZUREJOBS_EXTENSION_VERSION": "beta",
91+
"FUNCTIONS_EXTENSION_VERSION": "latest",
92+
"EmotionAPIKey": "[parameters('emotionAPIKey')]"
93+
}
94+
},
95+
{
96+
"apiVersion": "2015-04-01",
97+
"name": "web",
98+
"type": "sourcecontrols",
99+
"dependsOn": [
100+
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]",
101+
"[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/appsettings')]"
102+
],
103+
"properties": {
104+
"repoUrl": "[parameters('repoUrl')]",
105+
"branch": "[parameters('branch')]",
106+
"IsManualIntegration": false
107+
}
108+
}
109+
]
110+
}
111+
]
112+
}

azuredeploy.parameters.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"siteName": {
6+
"value": "cf-cardGenerator"
7+
},
8+
"emotionAPIKey": {
9+
"value": ""
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)