Last active
December 3, 2018 05:43
-
-
Save yokawasa/09046180c85a93792473eac80a63d65a to your computer and use it in GitHub Desktop.
Quick Demo of Spinning up API in Azure Container instances
This file contains hidden or 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
#!/bin/sh | |
set -e -x | |
RESOURCE_GROUP="RG-apim" | |
REGION="southeastasia" | |
# REGION needs to be the following ACI available regions: | |
# westus,eastus,westeurope,westus2,northeurope,southeastasia,eastus2,centralus,australiaeast,southcentralus,centralindia,canadacentral | |
PREFIX="yoichika" | |
echo "Create Resource Group" | |
az group create -n $RESOURCE_GROUP -l $REGION | |
echo "Create API in Azure Container Instance" | |
az container create --name "${PREFIX}-api" \ | |
--resource-group $RESOURCE_GROUP \ | |
--image "danielscholl/demoapi" \ | |
--dns-name-label "${PREFIX}-api" \ | |
--ports 80 | |
echo "Test Access to Swagger" | |
open "http://${PREFIX}-api.${REGION}.azurecontainer.io/index.html" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment