Windows Azure Developer Challenge – Day Two (April 30)

Time to build a website! I’m following the tutorial on how to build an MVC4 website but since I’m not going to be using SQL for this part of the competition I’ll leave the membership stuff out for now (by commenting out the entire AccountController class so it doesn’t try to initialize the membership database).
Managed to deploy the sample MVC4 website to Azure – http://youconf.azurewebsites.net/ using the builtin Visual Studio publishing mechanism after I’d downloaded my publish profile from Azure.

4youconfhomepage

Note: I had a bit of an issue at one stage with Azure as per the screenshot – I couldn’t seem to access my website, even though I could see the site live at http://youconf.azurewebsites.net/ …… After about half an hour this seemed to go away, so not quite sure what was happening….

1AzureIssues

Now let’s setup Git so I can publish directly to Azure when I checkin, using the steps in this article.

I’ve downloaded the Git explorer, setup a local youconf repository, and published my local changes to Git (https://github.com/phillee007/youconf/). Rather than pushing local changes directly to Azure, I’d rather they were first pushed to my GitHub repository so they’re visible to anyone else who might want to have a poke around. To accomplish this I’m following the steps in the article under the heading “Deploy files from a repository web site like BitBucket, CodePlex, Dropbox, GitHub, or Mercurial

*IMPORTANT* After publishing my changes to Git I realised that I’d included all of my publish profile files as well, which contained some sensitive Azure settings (not good). To remove them, I did a quick search and found the following article http://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository. The commands I ran in the Git shell were as follows:

3GitRemove

I also added an entry to my .gitignore file so that I wouldn’t accidentally checkin anything in the Publish profile folder again:

2GitIgnore

After fixing those, I clicked on my website in the Azure portal, clicked the link under Integrate Source Control, and followed the steps, selecting my youconf repository in GitHub. About 20 seconds later – voila! – my site has been deployed to Azure from GitHub. Seriously, how easy was that?!! Now we’re all setup to write some code…..

Next up: What will my site look like?

I want a site that looks good, so will do a bit of searching and see if I can find something that’s nice, and free (Creative Commons licence or similar).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s