-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create webapp from arm template automatically #285
Open
epa095
wants to merge
9
commits into
microsoft:master
Choose a base branch
from
epa095:deploy_webapp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a5df67e
Create webapp from arm template automatically
107c83d
Remove dangling reference to myResourceGroup
c5185e2
Use az cli to fetch ACI username/password
fd3549a
Add ACR_NAME variable
994ae93
Remove location restriction in webapp arm
5748809
Parameterize SKU in webapp arm
082db54
Cleanup comment in webapp arm
44b4a6e
Cleanup variables in webapp arm
c14b586
Merge branch 'master' into deploy_webapp
lokijota File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"imagelocation": { | ||
"type": "string" | ||
}, | ||
"acr_username": { | ||
"type": "string" | ||
}, | ||
"acr_password": { | ||
"type": "secureString" | ||
}, | ||
"baseName": { | ||
"type": "string", | ||
"maxLength": 10, | ||
"minLength": 3, | ||
"metadata": { | ||
"description": "The base name to use as prefix to create all the resources." | ||
} | ||
}, | ||
"location": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Specifies the location for all resources." | ||
} | ||
}, | ||
"acr": { | ||
"type": "string", | ||
"defaultValue": "[concat(toLower(parameters('baseName')),'amlcr')]" | ||
}, | ||
"webAppName": { | ||
"type": "string", | ||
"defaultValue": "[concat(toLower(parameters('baseName')),'webapp')]", | ||
"metadata": { | ||
"description": "Base name of the web app name and app service plan" | ||
}, | ||
"minLength": 2 | ||
}, | ||
"sku": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "SKU for the app service plan" | ||
}, | ||
"defaultValue": "S1" | ||
} | ||
}, | ||
"variables": { | ||
"webAppPortalName": "[concat(parameters('webAppName'), '-webapp')]", | ||
"appServicePlanName": "[concat(parameters('webAppName'),'AppServicePlan')]" | ||
|
||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Web/serverfarms", | ||
"apiVersion": "2018-02-01", | ||
"name": "[variables('appServicePlanName')]", | ||
"location": "[parameters('location')]", | ||
"sku": { | ||
"name": "[parameters('sku')]" | ||
}, | ||
"kind": "linux", | ||
"properties": { | ||
"reserved": true, | ||
"maximumElasticWorkerCount": 5 | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Web/sites", | ||
"apiVersion": "2018-11-01", | ||
"name": "[variables('webAppPortalName')]", | ||
"location": "[parameters('location')]", | ||
"kind": "app,linux,container", | ||
"dependsOn": [ | ||
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]" | ||
], | ||
"properties": { | ||
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]", | ||
"httpsOnly": true, | ||
"siteConfig": { | ||
"linuxFxVersion": "[concat('DOCKER|', parameters('imagelocation'))]", | ||
"appSettings": [ | ||
{ | ||
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", | ||
"value": "false" | ||
}, | ||
{ | ||
"name": "DOCKER_REGISTRY_SERVER_URL", | ||
"value": "[concat('https://', parameters('acr'), '.azurecr.io')]" | ||
}, | ||
{ | ||
"name": "DOCKER_REGISTRY_SERVER_USERNAME", | ||
"value": "[parameters('acr_username')]" | ||
}, | ||
{ | ||
"name": "DOCKER_REGISTRY_SERVER_PASSWORD", | ||
"value": "[parameters('acr_password')]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the need for this additional environment variable? Can we reuse the image location variable?