Monthly Archives: September 2012

Deploy your site to Azure from Github private repositories

Last June I attended Microsoft Tech Ed in Amsterdam. During the event the main focus in ASP.NET development was on Azure, the Microsoft cloud solution. I didn’t had the time yet to play around with Azure until I wanted to test if one of my personal projects would have mess speed/loading problems when deployed on Azure.

Github

After working with Subversion (SVN) for the last years, the distributed source control of Github looked appealing. I didn’t wanted to give up the safety of my local SVN server at home with daily backups to my NAS. But on the other side, a recommended and proven source control like Github could only scale down backup and safety worries. To test out Github I’m now combining the two source control systems. Every change first gets committed to my SVN server and then committed and synchronized with my Github account.

Deploying to Azure

Azure websites have a few options to deploy to. Until some time ago the easiest way to deploy a website was to download the “publish profile” from the Azure management portal as shown in the image below

.

In Visual Studio you can select the downloaded “profile” and then publish to Azure.

Publish directly from Github

Scott Hanselman made a good post about deploying your application directly from your Github repository to your Azure website. Still working on Azure to test out the possibilities there was no problem that every commit would be deployed. It would give me the advantage to direct test the changes I made on my development machine in a ‘live’ production environment (although it isn’t the real production environment).

Following the steps as described by Scott I ran into a problem. When trying to associate my Azure website with the correct Github repository I could only choose from the existing public repositories. As my personal projects aren’t all open source projects I had placed this specific project in a private repository.

Searching for a solution

Up to Google to search if anyone else had solved this problem, maybe a setting on Github, maybe a setting in Azure, … I didn’t found any solutions on the GIT Deployment to Windows Azure forum nor on the wiki pages of the Kudu project (Kudu is the engine behind git deployments in Azure Web Sites. It can also run outside of Azure. It can be found on Github). I decided to post a comment on Scotts blog post. Scott was so kind to forward my question to David Ebbo who is working on Kudu with David Fowler. Just one hour after I posted my comment David responded on my question of it is already possible to deploy from private repo’s:

Not yet, but we are going to support this in the next update. Exact date is TBD, but hopefully in the next month or so.

No solution yet but …

One step closer, but no solution yet. I have some workarounds:

  • Make my repository public on Github.
  • Use the publish profile to deploy directly from Visual Studio
  • Look into pushing to Azure from a build server (not discussed in this post)

What I wanted to emphasize is the quick and clear response from Microsoft when dealing with this kind of problems. I can remember the long and tedious protocol to file bugs and then hopefully someone would answer a month or so later. The Microsoft of today is changed. Quicker response, listening to their users (the developers) and an improved open source protocol! A big change that hopefully will extend to all divisions at Microsoft.

MSDN

For the people who have a MSDN subscription. There’s a basic start credit included in your MSDN subscription. If you want to start playing around in Windows Azure without waving a credit card from step 1.

Goodbye editing host files for simple test websites

During development I often create test websites or pages to test new implementations or new frameworks. After creation the simple way to test the website is to add the site to the local IIS server and to assign a hostname to avoid remembering a specific port. This works great but you still have to add the hostname to your host file (c:\windows\system32\drivers\etc\hosts) and point it to the loopback address (127.0.0.1).

When I started to read the article Configuring your ASP.NET application for Microsoft OAuth account on the MSDN blog site one of the first items was to use a test domain. Without reading further I was already configuring IIS with a new custom host name for that specific site. After creating the site I read the item completely and discovered the localtest.me service.

This neat little service pointed all localtest.me domain names to 127.0.0.1. And they used the wildcart ‘*.localtest.me’ so you can choose any name you want. With this service setting up a test site is as simple as configuring your site in IIS.

Configure IIS for localtest.me

Open up IIS and create your site like you always do. Open up the bindings screen and add any hostname ending on .localtest.me.

 

 

 

 

 

 

After clicking ok, you can simply browse to mytestsite.localtest.me and your local website will appear.

Credits

Credits off course for Scott Forsyth and Imar Spaanjaars who came up with this idea.

More info on: localtest.me

SSL

Be sure to read their remarks on SSL before trying to test a local SSL configured site.

The birth of ABC G.OD – Group of Open Development

While working at the ABC-Groep, just north of Antwerp I’m involved in the coaching program the company have set up a couple of years ago.

As most of my colleagues are consultants working in the branch office of our customers we started with a program to provide a better follow up of the consultant, improve communication between the consultant and the company and to create a company feeling. Most of the consultants only meet each other on the obligated company meetings where for them a bunch of unknown people are present. With regular visits to the consultant, dedicated technical sessions for each branch and a fun event we try to involve the consultants in the social binding that exists in our company.

During one of my coach visits a consultant came up with the idea to create open source projects after the working hours. These projects could help us to play around in the latest version of the .NET framework and to discover the huge amount of open source libraries that can be plugged in into your .NET project. With Nuget it’s never been easier to use third party components or frameworks. As some of my colleagues work at legacy projects and others still work in .NET 3.5, doing a project in the latest version would be very interesting.

After some preparation we had our first kick-off meeting last week. With an 11 colleagues we started the ‘Open Development Group’. We talked about what should be the target, how we are to involve each other in the development process and what we we’re going to create. After some (healthy) discussion we came up with our first project: ‘The ABC Athletes Follow up’. An administrative application for coaches/trainers to efficiently follow up on their athletes.

Github

With 1 developers it’s necessary to have a common code repository to share and commit the code to. Next to the code repository we needed an issue tracker to file the open tasks and report the bugs. Since the projects would be open source we found Github is the perfect place to manage our projects. Github has a built-in issue tracker, repository browser, Wiki, …

Making the projects open source will not only improve the feedback on the created projects but will also give the contributors a very visual overview of their work in the latest version of .NET and other frameworks, components, … This overview can be very handy for the future job interviews of the contributors.

You can find our project page on http://abc-god.github.com/

GOD

The term ‘Open Development Group’ was just a work title for me to check out if there were any colleagues interested in the project. During our kick-off meeting the question arises if ‘Open Development group’ would be a good name to communicate to colleagues and the outside world. It didn’t take long to have one shouting out that if we changed it to ‘Group of Open Development’ the acronym ‘ABC G.OD’ does sound a bit better. A new name was born.

You can follow the ABC G.OD on the Github page, directly the Github repository or on twitter (@GodAbcGroep)
You’ll find more information about the ABC-Groep on the website, on twitter (@abcgroep). All .NET developers are part of the ACE branch of the ABC-groep, a company focusing on .Net development, consultancy for Microsoft Dynamics and services for the Microsoft Sharepoint platform.