Setup a Project Server on Microsoft Azure

Last modified by Christian Reiber on 2021/02/26 11:58

About Azure Cloud

Azure is the cloud computing service operated by Microsoft, offering IaaS, PaaS and SaaS services available since 2010. It runs data centers worldwide including the EU GDPR area. Maintenance of cloud resources happen through a Web GUI  or REST interfaces.

For installing a Project Server we use the IaaS service to set up a suitable VM. As Azure has no option to boot from an ISO image we let Azure setup a VM for us with the necessary Debian distribution preinstalled.

Required Resources

Ressource need scales with the number and kind of applications you plan to run and the number of users you want to serve. Luckily virtual environments make it easy to increase resources when necessary so that ressources can grow according to demand. 

Resource requirements vary wildly depending on the kind and number of stacks you want to run on your PS4 instance. Therefore the following requirements can just serve as rough guideline to start with:

                      CPUsRAM  DiskRemark
 Bare minimum             1      1 GB    4 GB   Just for trying PS4 and running proxy and GoTTY stacks. 
 Minimal setup            2      2 GB   10 GB   Run stacks with low resource requirements for <10 users. 
 Convenient setup         4      8 GB   30 GB   

Create a VM

An extensive description of the process is beyond the scope of this document as comprehensive documentation is available from Microsoft. As the Web GUI changes over time use the following just as a guidance.

  • Login to Azure Portal
  • Click Create a Resource at the top left
  • In the "Azure Marketplace" column to the very left click Compute.
  • If in the list of featured setups the target operating system is already listed, select it there. Otherwise:
    • In the Search the Marketplace field enter Debian 9.
    • You should then be provided with a list of setups which also contains a bare OS install.
    • In the proper tile there is a Create list box where you select the desired version and variant.

The Create a virtual machine dialog is started which consists of several tabs. Most settings have sensible defaults, so we cover just those things below which are important for a proper PS4 setup. Feel free to review all settings and modify them where you think this is necessary. 

You can switch to the Review + createtab at any time to see a summary of your settings and to reveal the total costs per hour for this VM. From here you also trigger the final confirmation for creation of your VM.

exclamation  Never use your browser's "back" button when editing these tabs as otherwise all your settings will be lost.

Basics tab:

  • Subscription:  If you have more than one subscription select the one which pays for the VM.
  • Ressource Group:  The recommended way to keep order if you have many Azure ressources (or plan to have so). This also offers a convenient way to delete associated ressources in one go as deletion of a resource group deletes all resources contained in this group (a single VM alone is comprised of up to ten resources).
  • Region:  The context in which you plan to deploy PS4 may put contraints on the location where your VM is hosted, e.g. you may to have it in a country adhering to EU GDPR regulation. This influences the cost of the VM, too.
  • Virtual machine name:  The name under which Azure will list this VM. This also becomes the initial local hostname of the VM (which you can alter later).
  • Image:  Should already be preset with what you selected above but better double-check.
  • Size:  You have to decide for a certain VM model. This primarily determines type and number of CPUs and the amount of RAM (sometimes models also have a default disk). This decision is the main driver of the total VM cost. Choose a size suitable for what you plan to do. If none of the recommended sizes fits your needs, click See all sizes for a complete list. Changing the VM size later is possible of course (hey, it's a cloud!) and should usually just need a reboot of your VM. However, there are corner cases which require more effort, e.g. if you have to switch the region for the new VM. While the minimum required resources are sufficient to play around with a small number of stacks, the stacks you plan to deploy and the number of people using them determine the necessary resources.
  • Administrator account:  This account has the rights to become superuser through sudo. Below we will setup PS4 in the serial console. You therefore do not need SSH connectivity but have to choose the Password method and provide an username and password.
  • Inbound port rules:  The following assumes that PS4 is set up through Azure Serial Console; then we need just HTTP(S) to access the Web GUI of the installed stacks. Therefore enable Allow selected ports and select HTTPS (443) as the only inbound port (i.e. deselect SSH). You may later install the ADM-GoTTY stack which will allow you to access the command line over HTTPS so that your use of the Azure Serial Console will be limited to very rare cases.

Disks tab

Most Azure VM models come without a predefined disk. Through Create and attach a new disk you size your disk:

  • OS disk type:  This determines quality and speed of the disk where you install your operating system onto. Note that some disk types incur transaction costs, i.e. you are additionally charged for the number of read/write operations you carry out on the disk. Check the details here.
  • Source type:  "None" (except you want to create the disk from an already existing snapshot)
  • Size:  Choose a reasonable size by clicking on Change size
  • Leave the dialog with OK

Note that depending on your VM model you may attach more than one disk to the VM. This is not necessary for a standard PS4 setup but may make sense to improve performance on servers which require very high disk throughput.

Management tab

On this tab we need to make the necessary settings to be able to  access the VM through the Azure Serial Console.

  • Boot diagnostics:  set to Enable with custom storage account
  • Diagnostics storage account:  This is where metrics are saved to. You have to create one if none is available yet.

Additionally review these settings:

  • Enable auto-shutdown:  Shutting down the VM when not in use (e.g. during the night or during weekends) can be a real cost-saver. You can configure a daily shutdown time here. Important: If you shutdown your VM through Linux means (shutdown or init 0 commands) your VM enters status "stopped" but Azure will continue to bill as if the machine would be running. In order to avoid costs you have to Stop the VM from the Azure portal or the REST API; the VM is then in the "Stopped (deallocated)" state.
  • Backup:  You should definitely consider the backup options if you plan to use your PS4 for anything near to production. (Beware that a software development environment is a production setup for your project team!)

Review+create tab

Review your settings and the costs. When you then click on Create your VM is born. This takes a few minutes. Azure creates the following resources:

  • the VM itself
  • possibly a resource group
  • a network interface
  • a public IP address
  • a network security group

After the VM has been created and the Debian image been installed it is instantly started. You visit it through the button Go to resource or by selecting it from your Azure portal home screen. Under Networking you find the public IP assigned to the VM.

Register your hostname in DNS

You have to do this so that you are able to access your Project Server by name and not just per IP address. When installing PS4 in a later step you have to provide this hostname.

  • If not yet in your VM's administration pane goto Home->Virtual machines and click on the name of the machine you just created.
  • At the top right you see your public IP address and below the Caption "DNS name" with a link Configure. Click on this link.
  • The page you reach now you can choose between a dynamic or static public IP address. You need a public IP so that your VM is accessible from the Internet. A dynamic IP address may change when a VM ist stopped and restarted, a static IP address will not. Microsoft charges you for each hour you occupy a public IP address. For dynamic addresses occupation ends when the VM is stopped/deallocated, while for static addresses it lasts until the VM itself is finally deleted. (Note that in both cases your VM learns about its IP via DHCP; only in very rare cases an IP address has to be statically configured into the Linux OS in Azure.)
    • Select either Dynamic or Static assignment.
    • In the DNS name label entry field enter the desired local host name of your machine. This will create an A record in DNS. Azure automatically adds the domain part which usually ready region.cloudapp.azure.com. We recommend to name your machine identically to the VM name you provided to Azure and use an alias record to provide a different name. Should you name it differently here you should also tell your VM by updating /etc/hostname as superuser.
    • The Create alias record gives you the opportunity to give a secondary name to your VM. Should there be a reason that the name provided above in the A record changes (e.g. because you move your VM to another Azure region) the alias is not affected because it is tied to the resource, not the IP address.
  • Click Save at the top of the page. You see a pop-up informing you about the progress, once it disappears your hostname is registered and can be resolved.

Log into the VM

To continue with PS4 setup we must access the Azure Serial Console

  • In the navigation pane to the left of the VM page scroll down to Support + Troubleshooting, then select Serial console. Please note:
    • The connect to Azure Serial Console can be slow (up to two minutes).
    • If you receive a timeout error message try again by pressing Enter.
    • If you receive an error message speculating about improper boot diagnostics settings you may not have set the boot diagnostics properly in the Management tab above. In the sidebar go to Boot diagnostics and change the respective settings as detailed above.
  • On the serial console you might see lots of diagnostic messages from the boot process. Press Enter to get a login prompt and log in with the username and password you configured above.
  • Enter sudo -i and again provide your password to become superuser.

Install and setup ProjectServer

Because the Azure Serial Console spoils the interactive dialogs which are normally used during installation and setup of PS4 we therefore have to go the "unattended" way. This means that you provide all necessary data in a plain text file and then let the PS4 setup run without any further interaction.

In step 1 use template C2 for your configuration file.

Connect to the Web UI

Your PS4 should now be accessible in your web browser using the DNS name you registered above. Take care to use the proper protocol in your URL (http:// or https://) as otherwise the connection might fail.

Tags:
Created by Christian Reiber on 2019/09/24 07:30

Navigation