Sunday, October 12, 2014

Moving my website to Azure Cloud

Introduction

I have moved my website away from my small atom server at snafu into Microsoft's Azure cloud. This includes the following steps:
  1. Create a website
  2. Move the site into git
  3. Create a site on Azure
  4. Deployment of the sites
  5. charging the A and C records

Creating a Website

Formerly i hosted my website on a small atom server at a cost of 18 Euros per month. Ocacionally i have used this server to host other services as well. It would be preferable for me to host my website in an environment which allows me to host my website basically for free and to allocate a VM on demand when i need it.  

Moving my Site into Git

Moving my website into Git at github.com is actually not a big thing, but i am using GetSimple to build my web site. This means that my contents is stored in GetSimple which is written in PHP at the web server. Finally i decided to move the complete site into git since i am doing some times small changes to the GetSimple theme or GetSimple it self which can be tracked better having all in git.

Together with Azure comes the tool webmatrix from Microsoft which allows to change and run the web site on my laptop/desktop. Typically when putting in contents into my website by running the site on my development system using webmatrix on my desktop by using the editor GetSimple it self. 

Automatic Deployment

Besides of a server which is used for local testing webmatrix provides as well a decent integration with git. It is possible to setup the site in a way that Aszure monitors are given git repository for commits and to deploys the commited changes to the site. I have my complete site at github.com; so after editing i am commiting to git hub. After the commit the Azure website will be deployed.

Changing A and C record

This was the most tedious step because the descriptions i found in the net are some what unclear and it took several hours until changes i have done to the C/A record have been distributed in the net. 

The IP configuration, where <website> represents the host name of your azure website, which worked finally looks like this:
  • A - Record for www.michaelslab.net points to the IP address given by Azur
  • C - Record contains the following aliases:
    michaelslab.net  points to <website>.azurewebsites.net
    www  points to <website>.azurewebsites.net

    awverify  point
    awverify.<website>.azurewebsites.net
After this record have been distributed you can link the website domain with your domain by using the Azure domain management. After these changes my website has become visible under the name www.michaelslab@net.









No comments:

Post a Comment