Project

General

Profile

Azure VPS setup notes » History » Version 6

Jon Goldberg, 08/07/2020 06:54 PM

1 1 Jon Goldberg
# Azure VPS setup notes
2
3 6 Jon Goldberg
Azure is more complex than, say, Linode.  To set up a free account, you must:
4
* Get a Sponsorship.
5
* Create a Subscription linked to the Sponsorship.
6
* Create a Resource Group linked to the Subscription.
7
* Create a Virtual Machine (and associated resources) linked to the Resource Group.
8 1 Jon Goldberg
9 6 Jon Goldberg
[**NOTE**: Most of Microsoft's pages break with an ad blocker enabled.]
10
11
### Get a Sponsorship
12
* [Go to the Nonprofit Microsoft Getting Started page](https://nonprofit.microsoft.com/en-us/getting-started).  Fill out the paperwork to be approved as a 501c3.  Approval can take 1 day or 3-4 weeks - I've seen both multiple times.
13
* Once approved, go to https://www.microsoft.com/en-us/nonprofits/azure to claim credits 
14
15
### Create a Subscription
16
17 1 Jon Goldberg
* Check that you have credits in your sponsored account: https://www.microsoftazuresponsorships.com/Balance
18 6 Jon Goldberg
* Visit the [Azure Portal](https://portal.azure.com).  
19
* Click the **Subscriptions** icon.
20
* Click the **Add** button.
21
* Add a subscription of type "Microsoft Azure Sponsorship" from the Azure portal. You will likely need to select **Show other subscription types** to see it.
22 1 Jon Goldberg
 * **Note**: Even sponsored subscriptions require a credit card, make sure you have one available.
23
24 6 Jon Goldberg
#### Create a resource group
25
* Select "Resource Group" from the main Azure portal.  
26
* Select **Add** and give it a name.
27
* Your subscription should be pre-selected since you only have the one.
28
* Click **Review and Create**.
29 1 Jon Goldberg
30 6 Jon Goldberg
#### Create a virtual machine
31
* Click on your new resource group in the Azure Portal.
32
* Click **Add**.
33
* Search for the name of the image you want (e.g. Debian).
34
* See the screenshots below for configuration of the "Basics" and "Disk" tabs.  The other tabs I keep with the defaults.
35
* I've attached a downloaded template for this VM, which as of now I haven't used yet, not sure how it works.
36 1 Jon Goldberg
37 6 Jon Goldberg
#### Post-provisioning configuration
38 5 Jon Goldberg
39 6 Jon Goldberg
##### Modify Firewall Rules
40
* Click on your new virtual machine in the Azure portal.
41
* Click **Networking** in the side navigation.
42
* You should see your firewall settings.  They should look like the screenshot below, except they'll be missing the two items circled.
43
* Add the "allow_ping" and "Port_5665" rules to the *Inbound Port Rules* as shown in the screenshot.
44
45
##### Add a swapfile
46
[Complete instructions are here](https://support.microsoft.com/en-us/help/4010058/how-to-add-a-swap-file-in-linux-azure-virtual-machines) but in short, add this to `/etc/waagent.conf` for an 8GB swapfile:
47
48
```
49
    ResourceDisk.Format=y
50
    ResourceDisk.EnableSwap=y
51
    ResourceDisk.SwapSizeMB=8192
52
```
53
54
Then run `service walinuxagent restart`.