Skip to content

Commit cc10136

Browse files
committed
2 parents dbd7636 + 16bc07a commit cc10136

4 files changed

Lines changed: 104 additions & 8 deletions

File tree

deploy/az/createresources.sh

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/bin/bash
2+
3+
CreateGroup()
4+
{
5+
echo Creating resource group $resource_group in '$location'
6+
az group create --name $resource_group --location $location
7+
} # end of CreateGroup()
8+
9+
10+
11+
deployresources()
12+
{
13+
echo Deploying ARM template '$path_and_filename.json' in resource group $resource_group
14+
az group deployment create --resource-group $resource_group --parameters @$path_and_filename.parameters.json --template-file $path_and_filename.json
15+
} # end of deployresources
16+
17+
Error_Usage()
18+
{
19+
echo ""
20+
echo Usage:
21+
echo create-resources arm-file resource-group-name [-c location]
22+
echo arm-file: Path to ARM template WITHOUT .json extension. An parameter file with same name plus '.parameters' MUST exist in same folder
23+
echo resource-grop-name: Name of the resource group to use or create
24+
echo -c: If appears means that resource group must be created. If -c is specified, must use enter location
25+
echo ""
26+
echo Examples:
27+
echo "1 create-resources path_and_filename testgroup (Deploys path_and_filename.json with parameters specified in path_and_filename.parameters.json file)."
28+
echo "2 create-resources path_and_filename newgroup -c westus (Deploys path_and_filename.json (with parameters specified in path_and_filename.parameters.json file) in a NEW resource group named newgroup in the westus location)"
29+
}
30+
31+
32+
33+
if [ $# -le 1 ]; then
34+
Error_Usage
35+
exit 1
36+
fi
37+
if [ "$1" == "" ]; then
38+
echo "path_and_filename is empty"
39+
Error_Usage
40+
exit 1
41+
fi
42+
43+
if [ "$2" == "" ]; then
44+
echo "Resource Group is empty"
45+
Error_Usage
46+
exit 1
47+
fi
48+
49+
if [ ! -f "$1.json" ]; then
50+
echo "$1.json doesn't exist"
51+
exit 1
52+
fi
53+
54+
if [ ! -f "$2.parameters.json" ]; then
55+
echo "$2.parameters.json doesn't exist"
56+
exit 1
57+
fi
58+
59+
60+
path_and_filename=$1
61+
resource_group=$2
62+
63+
64+
if [ "$3" == "-c" ]; then
65+
echo "Resource Group needs to be created"
66+
if [ "$4" == "" ]; then
67+
echo "but Resource Group name is missing"
68+
Error_Usage
69+
exit 1
70+
else
71+
location=$4
72+
CreateGroup
73+
fi
74+
75+
fi
76+
deployresources
77+
78+
echo "all resources finished successfully"

deploy/az/readme.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
1+
12
# Deploying resources using create-resources script
23

3-
The `create-resources` script is a basic script to allow easy deployment of one ARM template in one resource group. You can deploy to an existing resource group or to create one.
4+
The `create-resources.cmd ` script is a basic script to allow easy deployment of one ARM template in one resource group. You can deploy to an existing resource group or to create one.
5+
6+
**NOTE**: Alternatively, you can also use the `createresources.sh` bash script which can be used as a second option, convenient if you are using the Azure Cloud Bash Shell, a Mac or Linux machine, or simply, bash on Windows, instead of CMD/CommandPrompt in a local Windows
7+
8+
## Deploying to a existing resource group - Windows CMD
9+
10+
Just type `create-resources [pathfile-to-arm-template] resourcegroup` from command-prompt. Called this way the script will:
11+
12+
1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
13+
2. If they exist, will deploy them in the `resourcegroup` specified (that resource group in Azure has to exist).
14+
15+
## Deploying to a new resource group - Windows CMD
16+
17+
Just type `create-resources [pathfile-to-arm-template] resourcegroup -c location`. Called this way the script will:
18+
19+
1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
20+
2. If they exist, will create the `resourcegroup` specified in the `location` specified.
21+
3. Finally will deploy `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files in the `resourcegroup`
22+
23+
424

5-
## Deploying to a existing resource group
25+
## Deploying to a existing resource group - Bash shell
626

7-
Just type `create-resources path-to-arm-template resourcegroup`. Called this way the script will:
27+
Just type `createresources.sh [pathfile-to-arm-template] resourcegroup` from command-prompt. Called this way the script will:
828

929
1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
10-
2. If they exist, will deploy them in the `resourcegroup` specified (that has to exist).
30+
2. If they exist, will deploy them in the `resourcegroup` specified (that resource group in Azure has to exist).
1131

12-
## Deploying to a new resource group
32+
## Deploying to a new resource group - Bash shell
1333

14-
Just type `create-resources path-to-arm-template resourcegroup -c location`. Called this way the script will:
34+
Just type `createresources.sh [pathfile-to-arm-template] resourcegroup -c location`. Called this way the script will:
1535

1636
1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
1737
2. If they exist, will create the `resourcegroup` specified in the `location` specified.

src/Services/Identity/Identity.API/Startup.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
148148
await next();
149149
});
150150

151-
app.UseAuthentication();
152-
153151
// Adds IdentityServer
154152
app.UseIdentityServer();
155153

0 commit comments

Comments
 (0)