Skip to content

Instantly share code, notes, and snippets.

@calvimor
Last active March 17, 2017 01:47
Show Gist options
  • Save calvimor/b21267bed2f7cbe638b9d37a00d22ba9 to your computer and use it in GitHub Desktop.
Save calvimor/b21267bed2f7cbe638b9d37a00d22ba9 to your computer and use it in GitHub Desktop.
demo angular JS en azure
// https://docs.microsoft.com/en-us/azure/app-service-web/scripts/app-service-cli-deploy-local-git
=> az login
=> az appservice web deployment user set --user-name [YOUR USERNAME] --password [YOUR PASSWORD]
{
"id": null,
"kind": null,
"location": null,
"name": "web",
"publishingPassword": null,
"publishingPasswordHash": null,
"publishingPasswordHashSalt": null,
"publishingUserName": "YOUR USERNAME",
"tags": null,
"type": "Microsoft.Web/publishingUsers/web",
"userName": null
}
=> az appservice list-locations
[
{
"name": "South Central US"
},
{
"name": "North Europe"
},
{
"name": "West Europe"
},
{
"name": "Southeast Asia"
},
{
"name": "East Asia"
},
{
"name": "West US"
},
{
"name": "East US"
},
{
"name": "Japan West"
},
{
"name": "Japan East"
},
{
"name": "East US 2"
},
{
"name": "North Central US"
},
{
"name": "Central US"
},
{
"name": "Brazil South"
},
{
"name": "Australia East"
},
{
"name": "Australia Southeast"
},
{
"name": "Central India"
},
{
"name": "West India"
},
{
"name": "South India"
},
{
"name": "Canada Central"
},
{
"name": "Canada East"
},
{
"name": "West Central US"
},
{
"name": "West US 2"
},
{
"name": "UK West"
},
{
"name": "UK South"
},
{
"name": "Korea South"
},
{
"name": "Korea Central"
}
]
=> az group create --location "East US 2" --name cmdemonodegroup
{
"id": "/subscriptions/3ffaa914-6f65-420e-b42f-e71a3e353dfb/resourceGroups/cmdemonodegroup",
"location": "eastus2",
"managedBy": null,
"name": "cmdemonodegroup",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null
}
=> az appservice plan create --name cmdemonodeplan --resource-group cmdemonodegroup --sku FREE
{
"adminSiteName": null,
"appServicePlanName": "cmdemonodeplan",
"geoRegion": "East US 2",
"hostingEnvironmentProfile": null,
"id": "/subscriptions/3ffaa914-6f65-420e-b42f-e71a3e353dfb/resourceGroups/cmdemonodegroup/providers/Microsoft.Web/serverfarms/cmdemonodeplan",
"kind": "app",
"location": "East US 2",
"maximumNumberOfWorkers": 1,
"name": "cmdemonodeplan",
"numberOfSites": 0,
"perSiteScaling": false,
"provisioningState": "Succeeded",
"reserved": false,
"resourceGroup": "cmdemonodegroup",
"sku": {
"capabilities": null,
"capacity": 0,
"family": "F",
"locations": null,
"name": "F1",
"size": "F1",
"skuCapacity": null,
"tier": "Free"
},
"status": "Ready",
"subscription": "3ffaa914-6f65-420e-b42f-e71a3e353dfb",
"tags": null,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0,
"type": "Microsoft.Web/serverfarms",
"workerTierName": null
}
=> az appservice web create --name cmdemonodeapp --resource-group cmdemonodegroup --plan cmdemonodeplan
{
"availabilityState": "Normal",
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"cloningInfo": null,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"defaultHostName": "cmdemonodeapp.azurewebsites.net",
"enabled": true,
"enabledHostNames": [
"cmdemonodeapp.azurewebsites.net",
"cmdemonodeapp.scm.azurewebsites.net"
],
"gatewaySiteName": null,
"hostNameSslStates": [
{
"hostType": "Standard",
"name": "cmdemonodeapp.azurewebsites.net",
"sslState": "Disabled",
"thumbprint": null,
"toUpdate": null,
"virtualIp": null
},
{
"hostType": "Repository",
"name": "cmdemonodeapp.scm.azurewebsites.net",
"sslState": "Disabled",
"thumbprint": null,
"toUpdate": null,
"virtualIp": null
}
],
"hostNames": [
"cmdemonodeapp.azurewebsites.net"
],
"hostNamesDisabled": false,
"hostingEnvironmentProfile": null,
"id": "/subscriptions/3ffaa914-6f65-420e-b42f-e71a3e353dfb/resourceGroups/cmdemonodegroup/providers/Microsoft.Web/sites/cmdemonodeapp",
"isDefaultContainer": null,
"kind": "app",
"lastModifiedTimeUtc": "2017-03-17T00:37:19.993333",
"location": "East US 2",
"maxNumberOfWorkers": null,
"microService": "false",
"name": "cmdemonodeapp",
"outboundIpAddresses": "13.68.100.174,13.68.102.177,13.68.102.66,13.68.96.93",
"premiumAppDeployed": null,
"repositorySiteName": "cmdemonodeapp",
"reserved": false,
"resourceGroup": "cmdemonodegroup",
"scmSiteAlsoStopped": false,
"serverFarmId": "/subscriptions/3ffaa914-6f65-420e-b42f-e71a3e353dfb/resourceGroups/cmdemonodegroup/providers/Microsoft.Web/serverfarms/cmdemonodeplan",
"siteConfig": null,
"slotSwapStatus": null,
"state": "Running",
"suspendedTill": null,
"tags": null,
"targetSwapSlot": null,
"trafficManagerHostNames": null,
"type": "Microsoft.Web/sites",
"usageState": "Normal"
}
=> az appservice web source-control config-local-git --name cmdemonodeapp --resource-group cmdemonodegroup
{
"url": "https://[YOUR USERNAME]@cmdemonodeapp.scm.azurewebsites.net/cmdemonodeapp.git"
}
=> git remote add azure https://[YOUR USERNAME]@cmdemonodeapp.scm.azurewebsites.net/cmdemonodeapp.git
=> git init //because this is not a git repo
=> git add .
=> git commit -m "Initial commit"
=> git push azure master //write password
...
...
remote:
remote: Finished successfully.
remote: Running post deployment command(s)...
remote: Deployment successful.
To https://cmdemonodeapp.scm.azurewebsites.net/cmdemonodeapp.git
* [new branch] master -> master
=> az appservice web browse --name cmdemonodeapp --resource-group cmdemonodegroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment