Project

General

Profile

Azure VPS setup notes » History » Revision 6

Revision 5 (Jon Goldberg, 08/07/2020 04:54 PM) → Revision 6/49 (Jon Goldberg, 08/07/2020 06:54 PM)

# Azure VPS setup notes 

 Azure is more complex than, say, Linode.    To set up a free account, you must: 
 * Get a Sponsorship. 
 * Create a Subscription linked to the Sponsorship. 
 * Create a Resource Group linked to the Subscription. 
 * Create a Virtual Machine (and associated resources) linked to the Resource Group. 

 [**NOTE**: Most of Microsoft's pages break with an ad blocker enabled.] 

 ### Get a Sponsorship Eligibility 
 * [Go First you need to the Nonprofit Microsoft Getting Started page](https://nonprofit.microsoft.com/en-us/getting-started).    Fill out the submit paperwork to be approved as a 501c3. 501c3: https://nonprofit.microsoft.com/en-us/getting-started.    Approval can take 1 day or 3-4 weeks - I've seen both multiple times. 
 * Once approved, go to https://www.microsoft.com/en-us/nonprofits/azure to claim credits  

 (note: disable ad blockers) 

 ### Create VPS provisioning 
 * You need a Subscription 

 Sponsorship->Subscription->Resource Group->Virtual Machine. 
 * Check that you have credits in your sponsored account: https://www.microsoftazuresponsorships.com/Balance 
 * Visit the [Azure Portal](https://portal.azure.com).   
 * Click the **Subscriptions** icon. 
 * Click the **Add** button. 
 * Add a subscription of type "Microsoft Azure Sponsorship" from the Azure portal. You will likely need may have to select **Show "Show other subscription types** types" to see it. 
  * **Note**: Even sponsored subscriptions require a credit card, make sure you have one available. 

 #### 
 * Create a resource group 
 group: 
  * Select "Resource Group" from the main Azure portal.   
 *    Select **Add** and give it a name. 
 * Your subscription should be pre-selected since you only have the one. 
 * Click name, then **Review and Create**. 

 #### Create 
 * Add a virtual machine 
 machine: 
  * Click on your new resource group in the Azure Portal. 
 group. 
  * Click **Add**. 
 **Add** 
  * Search for the name of the image you want (e.g. Debian). 
 
  * See the screenshots below for configuration of the "Basics" and "Disk" tabs.    The other tabs I keep with the defaults. 
 
  * I've attached a downloaded template for this VM, which as of now I haven't used yet, not sure how it works. 

 #### Post-provisioning configuration 

 ##### Modify Firewall Rules 
 



 * Click on your new virtual machine in the Azure portal. 
 * Click **Networking** in the side navigation. 
 * You should see your firewall settings.    They should look like the screenshot below, except they'll be missing the two items circled. 
 * Add the "allow_ping" and "Port_5665" rules to the *Inbound Port Rules* [TODO] VM config allows adding endpoints for ports 22, 80, 443; need 5665 as shown in the screenshot. 

 ##### Add a swapfile well. 

 ### Swap 
 [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: 

 ``` 
     ResourceDisk.Format=y 
     ResourceDisk.EnableSwap=y 
     ResourceDisk.SwapSizeMB=8192 
 ``` 

 Then run `service walinuxagent restart`. https://support.microsoft.com/en-us/help/4010058/how-to-add-a-swap-file-in-linux-azure-virtual-machines