Backup and Restore is back in Windows 10

Great news! In Windows 10 build 10130, Microsoft appears to have seen sense and brought back the perfectly functional Backup and Restore function that was removed in Windows 8.1. You can find it in the classic Control Panel under “Backup and Restore (Windows 7)”.

No longer do you have to use the File History feature. The Windows 7 version of Backup and Restore supports a schedule you control, all files on your hard disk, includes a System Image at the same time and will include your OneDrive files!

image

The cynic in me suspects this is only here for the benefit of Windows 7 users who have upgraded directly to 10, skipping Windows 8 and 8.1, rather than an admission that Windows was suddenly without a viable backup solution (which File History is not).

.NET web app cloud deployments in 2015

.NET web applications tend to get treated very poorly in the real world – some people still think that copying and pasting the contents of their /bin/Release/ directory (lovingly referred to as “DLLs”) over Remote Desktop to a webserver and manually setting up IIS is acceptable – but this is now 2015 and the world has moved on. Here are my thoughts on some of the various ways you can deploy .NET apps to the cloud.

First things first – keeping your .NET app cloud ready

Real cloud environments are stateless. You must treat the web servers you use as ephemeral. DevOps practitioners treat virtual servers as cattle, not pets, and don’t nurse servers back to health if there is a problem. Instead they take them out back, shoot them in the head and spin up a new one.

The .NET Framework does not make building cloud-ready, stateless scalable applications easy by default, especially if you are still shaking off decade old WebForms habits. Here is some advice:

  • Never use Session State. If you type HttpContext.Current.Session you lose. Using Session State either forces you to have a “Session State Server”, building a single point of failure into your architecture, or having to use sticky load balancers to force users to continuously hit the same web node where their in-memory session lives.
  • You’ll need to synchronize your MachineKey settings between machines, so all nodes use the same keys for crypto.
  • Multiple nodes will break ASP.NET MVC’s TempData (typically used for Flash messages) – try CookieTempData
  • For configuration values, only use web.config AppSettings and ConnectionStrings. Sticking to this rule will give you maximum compatibility with the various cloud deployment platforms I’ll outline below. And no, don’t use Environment Variables, despite what The 12 Factor app enthuses – Windows apps do not use Environment Variables for application configuration. UPDATE Jan 2016: ASP.NET 5 has embraced Environment Variables as a first class configuration option bringing it inline with other web frameworks – if you are using ASP.NET 5 you can now use Environment Variables as an alternative to local config files. Don’t bother for ASP.NET 4.6 apps. 
  • Do not rely on any pre-installed software. All dependencies should be pulled from NuGet and distributed with your application package. If you use a vendor’s “solution” (custom PDF components? Using Office to create Excel files? CrystalReports?) insist on a NuGet package or remove the vendor’s software. This is 2015.

image

Azure Websites

The granddaddy of .NET Platform as a Service and the cornerstone of almost every Azure demo. Azure Websites is a very high level abstraction over IIS and .NET web farms, supports lots of very cool deployment mechanisms and is easily scalable.

  • Deploy from Github, TFS, Mercurial etc by monitoring branches. The very clever software under the hood (Kudu) monitors branches for changes, runs MSBuild for you and deploys your app.
  • Lots of features – staging slots (with DNS switch over for zero-downtime deploys), scaling with a slider, monitoring and logging all included
  • You don’t get access to the underlying Windows VM that the sites are running on – even if you pay to have dedicated VMs for your sites. This does mean that you get auto-patching, but if you have any exotic requirements (I’ve seen third party APIs have such broken SSL implementations you need to install their Root CA certificate on your web server) you’ll be out of luck as there is no way to run scripts on the servers.
  • To configure your app, you can set variables that replace AppSettings or ConnectionStrings in your web.config at deployment time.
  • Azure Websites also supports PHP, Java, node.js and more, if you are happy to run those frameworks on Windows. This blog is WordPress backed, so PHP, and running on Azure Websites!

An honorable mention goes out to App Harbor – they technically got there first by providing a Heroku-like experience for .NET developers. Also note that Azure has “Azure Cloud Services” – this is significantly more complex than Azure Websites and does tie you into the Azure platform significantly. Azure Cloud Services are typically chosen for long running cloud systems rather than transactional web sites (think Xbox Live rather than a high traffic blog).

image

Amazon Web Services Elastic Beanstalk

Amazon are by far the biggest cloud provider out there and they try to tick as many Windows feature boxes as possible to woo enterprises. Elastic Beanstalk is a Platform as a Service deployment platform, similar to Azure Websites, but completely platform agnostic. Since it uses all the existing EC2 APIs underneath (Elastic Load Balancing, Auto Scaling Groups etc), Language and OS support is much higher than Azure Websites, at the expense of not being optimised for Windows/.NET workloads.

  • There is no cheap, shared tier. Your application runs on a dedicated VM that you have access to. This makes costs a bit higher (unless you are crazy and want to try to run .NET on micro instances) but gives you more control. As part of your deployment package you can include Powershell scripts that can execute on your VM.
  • The user interface is very limited – when I last checked the only configuration values you could set via the UI were named “PARAM1”, “PARAM2”, “PARAM3” etc, which limited your AppSettings to using those names unless you wanted to completely script your deployment.
  • If you want a SQL Server as a Service, you are limited to RDS which charges for the whole VM and SQL Server license. Azure’s SQL Server service charges for CPU time and disk space, which can work out quite a bit cheaper.
  • Docker container support is available – this will become important for .NET developers when ASP.NET 5 is out of beta and CoreCLR is ready.

image

Opscode Chef + Azure or AWS VMs

Opscode Chef is a favorite of the “infrastructure as code” crowd, and it can be made to work on Windows. Given standard virtual machines on either AWS or Azure, you can install the Chef service on your nodes and execute Chef recipes.

  • Chef recipes are written in Ruby. This may or may not be a problem depending on your team (I can count the number of .NET developers I know who are also good at Ruby on one hand) but is definitely extra skilled requirements. It is possible to use Chef recipes to bootstrap Powershell scripts, but then you have Rube Goldberg machine of pain.
  • Ruby is simply not designed to run on Windows, let alone for long-running processes. The Chef Service had a long standing bug on Windows where Ruby would simply run out of memory. Anybody who has tried getting every gem in a typical Ruby on Rails gemfile to compile on Windows knows the pain I am talking about. Windows support for Ruby is an afterthought.
  • One thing Azure has over AWS for Chef deployments is the ability to pre-install the Chef Client onto a VM when you start it, all from the UI. AWS requires you to manually apt-get the client.
  • Chef recipes are based on the concept of convergence – where the desired state of the server is described and then a policy is calculated to bring the server to that state. Co-incidentally, this is exactly what Powershell Desired State Configuration does. Chef have plans to integrate with Powershell DSC.

image

Octopus Deploy + Azure or AWS VMs

Ocotpus Deploy is quickly becoming one of my favourite parts of the .NET ecosystem. Built by some of the finest .NET developers in the land, for .NET developers. It provides the Platform as a Service ease of Azure Websites with the power of running your own VMs. I think of it as bringing your own platform layer to infrastructure you might get elsewhere – I’ve dealt with a big deployment of Octopus on AWS.

  • VMs can be assigned to environments, enabling a fully customisable Test-UAT-Staging-Production workflow with release promotion.
  • Your build server needs to create “octopack” packages– a nuget package variant. These packages then get pushed to the Octopus server nuget feed and can be deployed.
  • A deployment agent called a “Tentacle” is deployed on each VM. A single MSI command can install and enroll the node.
  • Elastic scaling is not included – Octopus does not manage your environment for you.
  • Deployment steps are fully customisable – you can create IIS sites, AppPools, run custom scripts or even install Windows Services
  • Configuration settings for your application are set as variables that apply to AppSettings and ConnectionStrings in your web.config when you deploy.

The Octopus Deploy team is currently working on version 3.0, which will replace the RavenDB database with SQL Server. I’m very much looking forward to it. Octopus isn’t limited to cloud-deployments either – it can be used equally well for on-premise datacenters.


In summary then, I’d choose Azure Websites if the application is simple enough to work within it’s constraints. Given an application with multiple tiers (microservices etc) or special deployment requirements (third party software, certificates), I’d go for Octopus Deploy on top of whichever is your organisation’s favored cloud provider.

If you have any thoughts on the above, or can point out a mistake I’ve made, please drop me an email or leave a comment.

East Village London E20 – Get Living London Review

Update: I’ve posted an updated review after being here for 18 months.

The following is a review of my thoughts so far about living at East Village, the former Athlete’s Village at the 2012 Olympic Games. My landlord is Get Living London and this will be from the perspective of myself as someone I imagine typical of a renter here – a young professional working at a firm in Canary Wharf in the technology field. I have moved back to after spending half a decade in Japan, so my taste in living space might be a bit skewed towards modern city life.

The surroundings

CIMG3871

This really is now a gorgeous part of London. The Olympic Park is just next door and there are acres of parklands available for public use. There is even a wetlands area with ducks! The site has a security team in East Village fleeces looking after the place and gardeners (although I haven’t seen them).

Nice things nearby

The following is all available within walking distance of my flat:

ellie_simmondsstratrford1

Sainsbury’s Local – 30 seconds walk

d29620e4-4fd3-46be-b8c4-d8859d16eaa112345

The Neighborhood Pub that serves a mean rotisserie chicken and Asahi beer! – 35 seconds walk

Westfield_stratford_city

The Stratford City Westfield Shopping mall – one of the largest urban shopping centers in Europe (with a cinema, casino and an Apple Store!) – 4 minutes walk

1280px-Stratford_International_stn_entrance

Stratford International stn entrance” by Sunil060902Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons.

Stratford International Train station – you can get to Paris in 2.5 hours – plus a DLR station that gets me to work in 20 minutes – 3 minutes walk

I have not included the Olympic Park legacy facilities above – the swimming pool, cycling velodrome etc – simply because I haven’t had the chance to go yet! There is also an NHS doctor’s surgery and a school on the site.

Commuting to work

On a good day I can get to work door to door in 30 minutes on the DLR. This is in stark contrast to the hour long slog through the Tokyo rush hour that I used to endure. The DLR is amazing – daylight throughout, mobile phone signal all the way (unlike the Tube) and no drivers. I spend about 80 GBP a month on pay as you go tickets via my auto-top up Oyster card (1.50 each way) – this is cheaper than the Zone 3-2 travelcard, which is over 90 GBP per month. If you work from home even one day a week, the travelcard doesn’t make sense.

In Japan, commuting costs are paid for by your employer, not you, as quite rightly the cost of getting to work is a necessary, deductible business expense. Not so much luck in the UK. If you decide to buy or rent a house in Sussex, say Brighton, you will have to pay an eye watering 460 GBP per month out of your own pocket for the privilege of getting to work on the worst train in Britain that was late every day for a year. No thank you. For those that say renting is “throwing money away” – this annual 4,800 GBP is definitely tossing money down the drain, or could at least be put towards the rent or a mortgage of somewhere closer to work.

Renting through Get Living London

When I first made enquires into renting in London I was absolutely appalled by the state of the market – companies like Foxtons appear to be almost deliberately misleading in the fact there is no way of knowing up front how much it will cost to move into somewhere when you view an ad as the total rental cost does not include fees. Between “Admin Charges”, “Contract charges”, “Check in fees” and all sorts of other nonsense that of course vary between rental agencies, there is no way to actually properly compare the price of listings on places such as Zoopla and Rightmove. This is likely by design. Scotland has outlawed rental agency fees, and even airlines are forced to show all hidden costs upfront in the advertised price to protect consumers. 

ZJLQST9593ZJLQNRQ[NN5376NRQ[-temp-img-contact1

The Get Living London management office

Get Living London is not your standard landlord, but is part of the growing Private Rental Sector (another private rental company in other London locations is Fizzy Living). They own the buildings you are renting. There is no middleman taking a cut. And with Get Living London – there are NO FEES to move in. At all. No check in fees, no admin fees, no debit card fees, no inventory fees, nothing. You pay the rent and the deposit and that is it.

Lets compare how much this actually changes the effective cost over an example 12 month tenancy agreement, where someone moves in with you after six months and thus needs to get added to the tenancy agreement:

  Foxtons (source) Get Living London
Administration Fee for creating the tenancy agreement 420 GBP 0 GBP
Admin Fee for adding someone to the tenancy agreement 210 GBP 0 GBP
Checking out 150 GBP “Inventory Check Out Fee” 0 GBP
Total fees for the year 780 GBP 0 GBP
Cost per month spread over 12 months: 65 GBP 0 GBP

The fees alone at Foxtons would make your rent the equivalent of an extra 65 pounds a month in this example. Who knows what this value is for other rental agencies.

What are you getting for that 0 pounds a month at Get Living? Very good service from my experience so far – I emailed the dedicated property manager about our heating the other day and he phoned me back in about 3 minutes. Try getting that sort of service from your amateur Buy To Let landlord.

Lets look at the flat

I love the place. It is modern, with underfloor heating, an awesome “winter garden” balcony area and an en-suite even in two bedroom flats. Plus, Get Living London do not charge any extra for a furnished flat – the furnishings are pretty awesome and were very welcome after moving halfway around the world. My only gripe would be that its apparently not possible for them to take, say, a bed away, so you’ll have to find storage for the bits you don’t need yourself.

IMG_0923

An example of some of the furnishings – plus the friendly chap who showed us round.

There is no boiler and no gas mains (so no British Gas to deal with) – the heating and hot water is supplied via East London Energy who “constructed a centrally-managed energy centre that produces all of the areas heating and hot water requirements and distributes it to homes and businesses via a network of highly insulated pipes” (or so I’m told). The kitchen hobs are therefore induction. Electricity has been super cheap so far, at about 30 GBP per month. In Japan it cost three times as much because of the air conditioning we needed.

The technology

All the East Village flats are served by Hyperoptic broadband. This means:

  • 1 Gbps Fibre To The Premises – (not to a cabinet up the road and a dodgy bit of 1960s copper between you and the box like BT claim their “fibre rollout” is)
  • 1 Gbit Ethernet cabling throughout the flat
  • A router is provided but you can switch your own in  – there is a pure Ethernet jack in the wall that dishes out public IPv4 addresses
  • No landline (there is a VoIP service available)
  • No BT line rental required (saving you about 15 GBP a month!)

I thought my broadband in Japan was good at 100Mbps, but the 1Gbps that I get from Hyperoptic here is absolutely nuts (and this is going through a Thunderbolt Ethernet connector and a router. I’ve seen it faster but I think I am saturating the upstream on the test servers in London):

1487742_10100112836579161_304752227367329868_o

Note that Get Living London residents get a free 20Mbps service from Hyperoptic, with the 100Mbps and 1Gbps costing 10 GBP and 20 GBP a month respectively. Even the free 20Mbps tier saves you at least 30 pounds a month that you’d otherwise need in a home wired by BT (ISP charge plus line rental).

Overall

Living here is awesome – the location is perfect for work, my family loves the area, the facilities are brilliant and the cost is very reasonable when you factor in how much I save in commuting charges; let alone rental fees, copper phone line rental fees and other nuisance costs that should just not exist today. Compared to the nightmares I had of moving back to the UK – old 60s terraced council “housing stock”, begging BT for 4Mbps ADSL, an expensive awful commute, being shafted by letting agents – it’s been a wonderful surprise. For anyone working in East London and looking to rent, I don’t think you can find somewhere better.

If you have any questions about living in East Village or renting through Get Living London, drop me an email and I’ll be happy to respond.