Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

Commit 8a51ec3

Browse files
Removed Duplicate Step
1 parent ce2f07d commit 8a51ec3

File tree

1 file changed

+56
-130
lines changed

1 file changed

+56
-130
lines changed

README.md

Lines changed: 56 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -53,136 +53,18 @@ git clone https://github.com/xamarin/XamarinAzureChallenge.git
5353

5454
To download the source clode, click this link: https://github.com/xamarin/XamarinAzureChallenge/archive/master.zip
5555

56-
### 2. Create Azure Function
56+
### 2. Publish Azure Function
5757

58-
After cloning the repository, we have 2 options to create our Azure Function:
58+
After cloning the repository, we have 3 options to create our Azure Function:
5959

60-
- Use [Azure Portal to create the Azure Function](#2a-use-azure-portal)
61-
- [Learn More](https://docs.microsoft.com/azure/azure-functions/functions-create-function-app-portal)
62-
- Use [Azure CLI to create the Azure Function](#2b-use-azure-cli)
63-
- [Learn More](https://docs.microsoft.com/azure/azure-functions/functions-create-first-azure-function-azure-cli?WT.mc_id=xamarinazurechallenge-github-bramin)
64-
65-
66-
#### 2a. Use Azure Portal
67-
68-
1. In your browser, naviagte to the [Azure Portal](http://portal.azure.com?WT.mc_id=xamarinazurechallenge-github-bramin)
69-
70-
2. In the **Azure Portal**, on the left-hand menu, click **+ Create a resource**
71-
72-
> Note: If the toolbar is collapsed, it will be shown as a green **+**
73-
74-
![Create new resource](https://user-images.githubusercontent.com/13558917/64928580-1a3e3f80-d7cf-11e9-84e7-01ecf565de81.png)
75-
76-
3. In the **New** dashboard, in the search bar, type **functions**
77-
78-
4. In the **New** dashboard, in the search bar tap the **[Enter]** key
79-
80-
![Marketplace Search Functions](https://user-images.githubusercontent.com/13558917/64928584-1d393000-d7cf-11e9-852d-fad28d656ae3.png)
81-
82-
5. On the **Marketplace** search results, click **Function App**
83-
84-
![Function App](https://user-images.githubusercontent.com/13558917/64928586-1e6a5d00-d7cf-11e9-9334-08eabee77898.png)
85-
86-
6. On the **Function App** window, select **Create**
87-
88-
![Create Functions App](https://user-images.githubusercontent.com/13558917/64928581-1ad6d600-d7cf-11e9-9805-829a665e5d88.png)
89-
90-
7. On the **Function App Create** page, enter the following information:
91-
92-
- **App name**: XamarinAzureChallenge-[Your Name]
93-
- Note: Replace `[Your Name]` with your name to ensure the app name is unique
94-
- In this example, I'm using "XamarinAzureChallenge-Brandon"
95-
- **Subscription**: [Select your Azure Subscription]
96-
- **Resource Group**:
97-
- [x] **Create new**
98-
- XamarinAzureChallenge
99-
- **OS**: Windows
100-
- **Hosting Plan**: Consumption Plan
101-
- **Location**: [Select the Azure Datacenter closest to you]
102-
- **Runtime Stack**: .NET Core
103-
- **Storage**:
104-
- [x] **Create new**
105-
- xamarinazure[Your Name]
106-
- Note: Replace `[Your Name]` with your name to ensure the storage name is unique
107-
- In this example, I'm using "xamarinazurebrandon"
108-
109-
8. On the **Function App Create** page, Click **Create**
110-
111-
![Enter Functions App Data](https://user-images.githubusercontent.com/13558917/64928583-1ca09980-d7cf-11e9-83ad-df824d193d66.png)
112-
113-
9. On the **Azure Portal**, at the top of the page, tap the notifications button which is shaped like a bell
114-
115-
10. In the **Notifications** window, ensure it says **Deployment in progress...**
116-
117-
![Deployment in progress](https://user-images.githubusercontent.com/13558917/64928694-ce4cc400-d7e9-11e9-8b87-c57a5695d6b2.png)
118-
119-
11. Stand by until the deployment has suceeded
120-
121-
![Deployment Succeeded](https://user-images.githubusercontent.com/13558917/64928721-3b605980-d7ea-11e9-9996-89f7d0ff8ef1.png)
122-
123-
#### 2b. Use Azure CLI
124-
125-
> As a prerequisite, you must install [Azure Core Tools version 2.x](https://docs.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=xamarinazurechallenge-github-bramin#v2), [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?WT.mc_id=xamarinazurechallenge-github-bramin) and [Azure Cloud Shell](https://shell.azure.com/bash?WT.mc_id=xamarinazurechallenge-github-bramin).
126-
127-
1. Open the terminal
128-
- [How to open the macOS Terminal](https://macpaw.com/how-to/use-terminal-on-mac)
129-
- [How to open the Windows Terminal](https://www.quora.com/How-do-I-open-terminal-in-windows)
130-
131-
2. In the terminal, enter the following command to login into Azure CLI:
132-
133-
```bash
134-
az login
135-
```
136-
> **Note:** Stand by until the Azure CLI opens your browser to the Azure Login page
137-
138-
3. In the automatically-opened browser window, in the Azure Login page, log into your Azure Account
139-
140-
4. In the terminal, enter the following command to create a new Azure Resource Group:
141-
142-
```bash
143-
az group create --name XamarinAzureChallenge --location westeurope
144-
```
145-
146-
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
147-
>
148-
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
149-
150-
5. In the terminal, enter the following command to create a new Azure Storage Account:
151-
152-
```bash
153-
az storage account create --name xamarinazure[Your Name] --location westeurope --resource-group XamarinAzureChallenge --sku Standard_LRS
154-
```
155-
> **Note:** Replace `[Your Name]` with your name to ensure the storage name is unique
156-
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
157-
>
158-
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
159-
160-
6. In the terminal, enter the following command to create a function app:
161-
162-
```bash
163-
az functionapp create --resource-group XamarinAzureChallenge --consumption-plan-location westeurope --name XamarinAzureChallenge-[Your Name] --storage-account xamarinazure[Your Name] --runtime dotnet
164-
```
165-
> **Note:** Replace `[Your Name]` with your name to ensure the functionapp name is unique
166-
> **Note:** For `--storage-account`, use the storage account created in the previous step
167-
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
168-
>
169-
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
170-
171-
> **Note:** The Azure Function name must be unique, which is why we append our name
172-
173-
## 3: Publish Code to Azure Function
174-
175-
After creating the Azure Function, it's time to publish our code to the cloud. For this, we have two options:
176-
177-
1. Use [Visual Studio on PC](#3a-use-visual-studio-on-pc)
60+
1. Use [Visual Studio on PC](#2a-use-visual-studio-on-pc)
17861
- [Learn More](https://blogs.msdn.microsoft.com/benjaminperkins/2018/04/05/deploy-an-azure-function-created-from-visual-studio?WT.mc_id=xamarinazurechallenge-github-bramin).
179-
2. Use [Visual Studio for Mac](#3b-use-visual-studio-for-mac)
62+
2. Use [Visual Studio for Mac](#2b-use-visual-studio-for-mac)
18063
- [Learn More](https://docs.microsoft.com/visualstudio/mac/publish-app-svc?WT.mc_id=xamarinazurechallenge-github-bramin)
181-
3. Use [Azure CLI](#3c-use-azure-cli)
64+
3. Use [Azure CLI](#2c-use-azure-cli)
18265
- [Learn More](https://docs.microsoft.com/azure/azure-functions/functions-create-first-azure-function-azure-cli?WT.mc_id=xamarinazurechallenge-github-bramin)
18366

184-
185-
### 3a. Use Visual Studio on PC
67+
### 2a. Use Visual Studio on PC
18668

18769
1. In Visual Studio on PC, open `XamarinAzureChallenge.sln`
18870

@@ -228,7 +110,7 @@ After creating the Azure Function, it's time to publish our code to the cloud. F
228110

229111
![Deploying](https://user-images.githubusercontent.com/13558917/65271519-533a2500-daeb-11e9-9a54-3a4b6afad613.png)
230112

231-
### 3b. Use Visual Studio for Mac
113+
### 2b. Use Visual Studio for Mac
232114

233115
1. In Visual Studio for Mac, open `XamarinAzureChallenge.sln`
234116

@@ -288,27 +170,71 @@ After creating the Azure Function, it's time to publish our code to the cloud. F
288170

289171
13. Stand by while Visual Studio for Mac publishes our code to our Azure Function
290172

291-
### 3c. Use Azure CLI
173+
#### 2c. Use Azure CLI
174+
175+
> As a prerequisite, you must install [Azure Core Tools version 2.x](https://docs.microsoft.com/azure/azure-functions/functions-run-local?WT.mc_id=xamarinazurechallenge-github-bramin#v2), [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?WT.mc_id=xamarinazurechallenge-github-bramin) and [Azure Cloud Shell](https://shell.azure.com/bash?WT.mc_id=xamarinazurechallenge-github-bramin).
292176
293177
1. Open the terminal
294-
- [How to open the macOS Terminal](https://macpaw.com/how-to/use-terminal-on-mac)
295-
- [How to open the Windows Terminal](https://www.quora.com/How-do-I-open-terminal-in-windows)
178+
- [How to open the macOS Terminal](https://macpaw.com/how-to/use-terminal-on-mac)
179+
- [How to open the Windows Terminal](https://www.quora.com/How-do-I-open-terminal-in-windows)
180+
181+
2. In the terminal, enter the following command to login into Azure CLI:
182+
183+
```bash
184+
az login
185+
```
186+
> **Note:** Stand by until the Azure CLI opens your browser to the Azure Login page
187+
188+
3. In the automatically-opened browser window, in the Azure Login page, log into your Azure Account
189+
190+
4. In the terminal, enter the following command to create a new Azure Resource Group:
296191

192+
```bash
193+
az group create --name XamarinAzureChallenge --location westeurope
194+
```
195+
196+
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
197+
>
198+
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
199+
200+
5. In the terminal, enter the following command to create a new Azure Storage Account:
297201

298-
2. In the terminal, enter the following command to navigate to the project folder `XamarinAzureChallenge.Functions` project folder.
202+
```bash
203+
az storage account create --name xamarinazure[Your Name] --location westeurope --resource-group XamarinAzureChallenge --sku Standard_LRS
204+
```
205+
> **Note:** Replace `[Your Name]` with your name to ensure the storage name is unique
206+
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
207+
>
208+
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
209+
210+
6. In the terminal, enter the following command to create a function app:
211+
212+
```bash
213+
az functionapp create --resource-group XamarinAzureChallenge --consumption-plan-location westeurope --name XamarinAzureChallenge-[Your Name] --storage-account xamarinazure[Your Name] --runtime dotnet
214+
```
215+
> **Note:** Replace `[Your Name]` with your name to ensure the functionapp name is unique
216+
> **Note:** For `--storage-account`, use the storage account created in the previous step
217+
> **Note:** If you have more than one subscription you will need to especify the subscription in which the resource group will be created using `--subscription [your Azure Subscription ID]`
218+
>
219+
> [How to find your Azure Subscription ID ](https://blogs.msdn.microsoft.com/mschray/2016/03/18/getting-your-azure-subscription-guid-new-portal?WT.mc_id=xamarinazurechallenge-github-bramin)
220+
221+
> **Note:** The Azure Function name must be unique, which is why we append our name
222+
223+
7. In the terminal, enter the following command to navigate to the project folder `XamarinAzureChallenge.Functions` project folder.
299224

300225
- Windows
301226
- `cd [Your Path to XamarinAzureChallengeSource Code]\src\XamarinAzureChallenge\XamarinAzureChallenge.Functions`
302227
- macOS
303228
- `cd [Your Path to XamarinAzureChallengeSource Code]/src/XamarinAzureChallenge/XamarinAzureChallenge.Functions`
304229

305-
3. In the terminal, enter the following command to publish our code to our Azure Function:
230+
8. In the terminal, enter the following command to publish our code to our Azure Function:
306231

307232
```bash
308233
func azure functionapp publish XamarinAzureChallenge-[Your Name]
309234
```
310235
> **Note:** Replace `[Your Name]` with your name, using the same account name [created earlier](#2b-use-azure-cli)
311236
237+
312238
## Task 2: Configure Azure Function
313239

314240
Before our Azure Function can submit our entry for the XamarinAzureChallenge, we'll need to do configure a few items.

0 commit comments

Comments
 (0)