-
Notifications
You must be signed in to change notification settings - Fork 55
/
aci.json
210 lines (210 loc) · 9.12 KB
/
aci.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"containerName": {
"type": "string",
"metadata": {
"description": "Name for the container"
}
},
"acceptEula": {
"type": "string",
"metadata": {
"description": "Change to 'Y' to accept the end user license agreement available at https://go.microsoft.com/fwlink/?linkid=861843. This is necessary to successfully run the container"
},
"defaultValue": "N",
"allowedValues": [
"Y",
"N"
]
},
"dockerImage": {
"type": "string",
"metadata": {
"description": "Before the colon: dynamics-nav for NAV or bcsandbox for Business Central. After the colon: Identifier for the specific release like 2018-cu4-de for NAV or de for BC. Possible values can be found at https://hub.docker.com/r/microsoft/dynamics-nav/tags/ or https://hub.docker.com/r/microsoft/bcsandbox/tags/"
},
"defaultValue": "mcr.microsoft.com/businesscentral/sandbox:us"
},
"username": {
"type": "string",
"metadata": {
"description": "Username for your NAV super user"
}
},
"password": {
"type": "string",
"metadata": {
"description": "Password for your NAV/BC super user and your sa user on the database"
}
},
"cpuCores": {
"type": "string",
"metadata": {
"description": "The number of CPU cores to allocate to the container"
},
"defaultValue": "2.0"
},
"memoryInGb": {
"type": "string",
"metadata": {
"description": "The amount of memory to allocate to the container in gigabytes. Provide a minimum of 2 as the container will include SQL Server and NAV NST"
},
"defaultValue": "4.0"
},
"ContactEMailForLetsEncrypt": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify the email address of the person accepting subscriber agreement for LetsEncrypt here https://letsencrypt.org/repository/. Leave empty for using self-signed certificate."
}
},
"CertificatePfxUrl": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Optional: Specify a secure Url of your Certificate Pfx File. Leave empty to use LetsEncrypt or Self Signed Certificate."
}
},
"CertificatePfxPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"Description": "Optional: Password for Certificate Pfx File. Leave empty to use LetsEncrypt or Self Signed Certificate."
}
},
"PublicDnsName": {
"type": "string",
"defaultValue": "",
"metadata": {
"Description": "Public DNS Name (CNAME record pointing to your VM). A # in the name will be replaced by the VM number. Leave empty to use LetsEncrypt or Self Signed Certificate."
}
}
},
"variables": {
"hostname": "[concat(parameters('containerName'),'.',resourceGroup().location,'.azurecontainer.io')]",
"publicdnsname": "[if(empty(Parameters('PublicDnsName')),Variables('hostname'),Parameters('PublicDnsName'))]",
"scriptsForLetsEncrypt": "c:\\run\\my=https://github.com/NAVDEMO/LetsEncrypt/archive/master.zip\\LetsEncrypt-master",
"additionalSetup": ",c:\\run\\my=https://github.com/NAVDEMO/Additional/archive/master.zip\\Additional-master"
},
"resources": [
{
"name": "[parameters('containerName')]",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-02-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"imageRegistryCredentials": [
{
"server": "bcinsider.azurecr.io",
"username": "2151f4c8-8fc2-4c87-a360-4f6c73ed8636",
"password": "IVn1X5Iuo2fD6spnZ/as5SgPFMYIJV0e+qoTTb91Jtg="
}
],
"containers": [
{
"name": "[parameters('containerName')]",
"properties": {
"environmentVariables": [
{
"name": "ACCEPT_EULA",
"value": "[parameters('acceptEula')]"
},
{
"name": "username",
"value": "[parameters('username')]"
},
{
"name": "password",
"value": "[parameters('password')]"
},
{
"name": "PublicDnsName",
"value": "[variables('publicdnsname')]"
},
{
"name": "folders",
"value": "[concat(variables('scriptsForLetsEncrypt'),variables('additionalSetup'))]"
},
{
"name": "ContactEMailForLetsEncrypt",
"value": "[parameters('ContactEMailForLetsEncrypt')]"
},
{
"name": "CertificatePfxUrl",
"value": "[parameters('CertificatePfxUrl')]"
},
{
"name": "CertificatePfxPassword",
"value": "[parameters('CertificatePfxPassword')]"
}
],
"image": "[Parameters('dockerImage')]",
"ports": [
{
"protocol": "TCP",
"port": 443
},
{
"protocol": "TCP",
"port": 80
},
{
"protocol": "TCP",
"port": 7048
},
{
"protocol": "TCP",
"port": 7049
},
{
"protocol": "TCP",
"port": 8080
}
],
"resources": {
"requests": {
"cpu": "[parameters('cpuCores')]",
"memoryInGB": "[parameters('memoryInGb')]"
}
}
}
}
],
"osType": "Windows",
"ipAddress": {
"type": "Public",
"ports": [
{
"protocol": "TCP",
"port": 443
},
{
"protocol": "TCP",
"port": 80
},
{
"protocol": "TCP",
"port": 7048
},
{
"protocol": "TCP",
"port": 7049
},
{
"protocol": "TCP",
"port": 8080
}
],
"dnsNameLabel": "[parameters('containerName')]"
}
}
}
],
"outputs": {
"containerIPAddressFqdn": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('containerName'))).ipAddress.fqdn]"
}
}
}