As of Windows 10 Anniversary Update, there was the inclusion of an awesome new tool that allowed users to have their very own Bash terminal on Windows without needing to run a Linux image in a hypervisor. This new tool was called the Windows Subsystem for Linux, which shipped with it’s own copy of a Canonical sanctioned variant of Ubuntu 14.04. The differences between it and a normal Ubuntu installation to any experienced Linux user would probably identify a couple of things that stuck out as being different. First item up is that the Kernel details listed Microsoft, second item up is that a lot of the linux utilities would either not return the right information, or just outright fail. Ansible for example is one such tool that I use and didn’t work under this new subsystem because semiphores were not entirely supported yet.

What Microsoft did was essentially create their own kernel in what they call a “pico-process”, which is essentially a proxy between Linux kernel calls to the Windows kernel’s implementations (or using bridges for things that didn’t quite match up. This environment, even with the terminal window on the screen, doesn’t use up any system resources – until a command is executed. It’s pretty cool and as of this blog post, entirely negated the use VirtualBox for me to run Fedora locally to get a fully functional Bash terminal.

As of Windows 10 Creators Update, the proxy-kernel has been updated and pretty much supports everything I could imagine wanting to run now, without any issues. Along with the kernel updates was an update to the Ubuntu image that you could use, which is now Ubuntu 16.04. The one thing I don’t like about the whole thing is this lock-in to using Ubuntu, when I’m pretty much a fanboy of the RedHat ecosystem – from RHEL, CentOS, Amazon Linux, and to Fedora. But now there’s a way to not only use this subsystem with a different Linux distribution, you can use it with multiple distributions.

 

Getting Updated Ubuntu Image – Suggested way

This will literally nuke everything you have in the existing Ubuntu environment. Be sure to backup everything you care about NOW, before running the following command.

  1. Close any existing Bash terminal windows you may have open
  2. Execute the following two commands
C:\> lxrun /uninstall /full /y
C:\> lxrun /install

Ensure that you enter in the username and password of choice after the last command that you’ll use going forward with that environment.

 

Getting Updated Ubuntu Image – Easy way

This will keep everything you have in place and do an in-place upgrade, but Microsoft doesn’t suggest it. It would be a good idea to backup things anyways even though you should theoretically be safe here.

$ sudo do-release-upgrade

I guess if you’re fine with Ubuntu, then you’re done. Have fun, see you again in another year when I decide to blog again.

If you’re not fine with Ubuntu like I am, then we have some more work to do…

 

Another Distribution – Downloading

The README for the GitHub project we just cloned shows the following images and tags are available as of August 18th:

  • debian – 8.5, 8, jessie, latest | jessie-backports | oldstable | oldstable-backports | sid | stable | stable-backports | stretch | testing | unstable | 7.11, 7, wheezy | wheezy-backports | rc-buggy | experimental
  • ubuntu – 12.04.5, 12.04, precise-20160707, precise | 14.04.5, 14.04, trusty-20160802, trusty | 16.04, xenial-20160809, xenial, latest | 16.10, yakkety-20160806.1, yakkety, devel
  • fedora – latest, 24 | 23 | 22 | 21 | rawhide | 20, heisenbug
  • centos – latest, centos7, 7 | centos6, 6 | centos5, 5 | centos7.2.1511, 7.2.1511 | centos7.1.1503, 7.1.1503 | centos7.0.1406, 7.0.1406 | centos6.8, 6.8 | centos6.7, 6.7 | centos6.6, 6.6 | centos5.11, 5.11
  • opensuse – 42.1, leap, latest | 13.2, harlequin | tumbleweed
  • mageia – latest, 5
  • oraclelinux – latest, 7, 7.2 | 7.1 | 7.0 | 6, 6.8 | 6.7 | 6.6 | 5, 5.11
  • alpine – 3.1 | 3.2 | 3.3 | 3.4, latest | edge
  • crux – latest, 3.1
  • clearlinux – latest, base

This will only download a Docker repository image of a distribution you’re interested in. It does not install it, that’s another step. You can run this multiple times for the distributions you’re interested in, if you choose.

  1. Install Python3 in your Windows environment (not inside the Linux subsystem) and include it in your PATH.
  2. Open a command or PowerShell Prompt
  3. Execute the following command
git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git
  1. Move into the git directory
  2. Rename the hook_postinstall_all.sample.sh file to hook_postinstall_all.sh
  3. Execute the following command using the appropriate tags defined above
python get-prebuilt.py [docker_image_identifier]:[image_version]

 

Another Distribution – Installing

Now we’re going to switch into the distribution we want and just downloaded.

  1. Close any existing Bash terminal windows you may have open
  2. Execute the following command
python install.py [docker_image_identifier]:[image_version]
  1. Open the Bash terminal by launching the  “Bash on Ubuntu on Windows” link in the start menu again
  2. Execute the following command:
dnf --version

 

Another Distribution – Switching

You can repeat the download and install steps multiple times, for each distribution you’re interested in. The last install ran makes the subsystem of that distribution, but each install performed on the machine stays, and it makes a note of each installation performed. Which makes this next step much awesome and so wow.

$ python switch.py
usage: ./switch.py image[:tag]

The following distributions are currently installed:

  - amazonlinux:latest
  - fedora:latest
  - ubuntu:trusty

To switch back to the default distribution, specify ubuntu:trusty as the argument.

The downside is that you aren’t able to have multiple distributions active at the same time, but switching like this is still pretty awesome.

Well, now that I’ve shared that information, I’m going to go clear up 80gb of disk space by removing VirtualBox and it’s assorted images.

For more information, see the blog post from Microsoft here and the README of the project you just blindly cloned to your machine and arbitrarily ran commands from because a blog post referenced it.

I’ve been working on a side project at home the last few days to snipe hard to find restaurant reservations and came across a weird issue I’ve never experienced before while using the .NET framework.

The API I’m calling to find these opportunities returns a DateTime value in the format “2016-11-21T23:00:00-05:00” which could be read as “November 21st, 2016 11:00pm (EST)”. Now while we’ve read the “-05:00” as the timezone offset which equates to the Eastern Time Zone, it appears the .NET framework in the DateTime.Parse() method, takes that as a hint to adjust the value relative to the local timezone instead to “November 22nd, 2016 4:00am”. Can’t imagine any restaurant that is hard to get is open at 4am in the local time.

While on my laptop (using EST) it was working just fine, deploying this to say… an Azure instance (using UTC) introduces just enough frustration to want to kick puppies and pop a small child’s balloon in passing.

I’ve seen it for years in the intellisense popup in Visual Studio without ever looking at it, and now I know why it’s there. The lifesaving DateTimeOffset type works just like the DateTime type, but when fed the value I needed parsed instead sees the timezone value as an offset (thus the type’s name), not an adjustment hint.

 

Hopefully you see this before you do anything horrible to a young canine or child. For the record, doing either is mean. Asshole.

If you’ve ever had problems trying to target particular .NET frameworks, this cheat sheet put together by @bradwilson@onovotny, and myself a while ago might help. I’m not going to go into depth on about what PCLs are what targeting means with the new frameworks – I think Oren Novotny did a great job over on his blog with his articles…

Below is a static image of it at the time of this blog posting, or you can see the live version which will reflect updates shared here on OneDrive. I suggest opening it in the full fledged Excel as vertically rotated columns don’t render in the online version. If you see any updates that are needed, you can contact me on Twitter @William_Holroyd.

Continue reading

Getting started on a microservice adoption isn’t trivial given the challenge of migrating existing data, merging with other data sets, keeping yourself in a ‘known good state’, and the new requirement of honoring contracts long after you’ve moved onto a new way of doing something. At least it’s just a technical problem that can easily be changed and monitored over the course of it’s implementation. I covered some options to start that half of the work in my prior microservice article and isn’t a goal here.

The real challenge comes in the other half of the work to lay the foundation for the microservices effort – the path to a DevOps supporting culture – which is our goal for this sub-section of the “working towards microservices” series. It’s the hardest half of the two parts given that it’s a business problem that can’t be easily changed or monitored – it requires changing the organization’s culture. Unlike computers which change their logic processing with a deployment, humans are pretty stubborn when confronted with new information, or conflicting ideas and thoughts.

You can’t directly change the culture just like you can’t directly change a person’s personality. You can change the culture indirectly by modifying behavior through the implementation of an intrinsic motivation and reward system, or working towards the implementation of a social-norm culture.Continue reading

There has been a lot of noise in the UNIX/Linux world recently when a presentation was made at the last Bay Area FreeBSD Users Group meetup where a couple of guys have patched the most recent FreeBSD release with a bunch of services like the Mach IPC, launchd, notifyd, asld, and libdispatch  that are heavily used by Apple and the Darwin kernel. This “science project” as they have called it is NextBSD – taking it’s name from the NeXT components that eventually became part of OS X and the Darwin kernel.

The video of the meeting is available here.

The goal as I’ve been able to understand at this point isn’t an entire fork of FreeBSD, but a parallel development that utilizes FreeBSD as it’s core – just changes to how it’s compiled, essentially how Fedora Core is well.. a core to RHEL/CentOS. Not only are there inclusions of components found in the Darwin kernel, but they also hope to incorporate pieces of HardendBSD as well for security reasons.

Continue reading

I’m about a week late to publishing this article, but better than never.

Just as I expected to NOT hear at BUILD 2015 conference’s keynote in San Francisco, there would be no announcement on a release date for Windows 10. It looks as though the release schedule for Windows 10 remains the same as it’s been the last few times. A late July code freeze and bug bash with an RTM date in the late part of the month, followed by a few weeks before MSDN or general availability.

Visual Studio has finally moved from a Community Technical Preview to a Release Candidate, which I’d expect to see probably see two release of given the time left before going RTM. Given that Roslyn has also just released a second Release Candidate with a “go-live” license, it means it’s language complete and now officially supported by Microsoft in a Production environment.

Below is the latest information on the 10074 build, or take a look at the official announcement up on the Windows blog, which includes some sample commands for Cortana and the expanded list of markets that the Windows Store is now available.

Features included in the update:

  • General user experience improvements including a new Live Tile animation for Start in addition to some performance and stability improvements for Live Tiles. Work to better support high DPI displays, and support multiple monitors with different DPI so components scale correctly regardless of DPI. Aero Glass from Windows 7 has made a comeback of sorts through a little A/B test with this build – 50% will see normal transparency on the Start menu and taskbar while the other 50% will see a blur effect on the Start menu and taskbar (like frosted glass).
  • Improvements to Continuum and simplified taskbar. When you close an application in Tablet mode, it will take you back to the Start screen instead of the desktop as you would expect when using a tablet. You will see general polish on snapping, and the shared divider between two snapped windows now let’s you adjust the size.
  • Multi-tasking improvements around Alt-Tab, Task-View, and Snap Assist. Snap Assist also now supports the ability to close a window during Snap Assist.
  • Updates for the Music and Video Preview apps (both at v3.6.999.0) has some UX improvements including a more immersive Now Playing experience with a true full screen mode. With the Video Preview app you can download movies, TV shows, and TV seasons and check progress, pause, resume, cancel the download. You can also download, delete, and even re-download videos as many times as you want on up to three devices (they’re planning to increase the number of devices you can download content too). Closed captioning for purchased content now appears. 
  • New default Windows sounds.
  • Visual refresh for Cortana that makes the experience feel more ingrained into the overall Windows experience. Start and Cortana are now more tightly integrated. As you start to search for an app from within Start, Cortana can seamlessly take over and bring back the right result. The new Windows split view control has been added to Cortana’s left rail, offering quick access to key Cortana functionality like the Notebook, Reminders or Feedback on how Cortana’s doing. This split view control helps anchor Cortana to the rest of the Windows UI and provides navigation consistent with many other Windows first party applications.
  • New and updated experiences in Cortana powered by Bing Instant Answers. Cortana will aim to answer your question while you’re still typing.
  • The Xbox app for Windows 10 has been updated (your version number should be 4.4.9014.0 or higher) with new features like Game DVR for PC games, screenshots, a Live Tile, user profiles, and real-name sharing. Oh and the drivers for Xbox controllers are now included with Windows 10, so you no longer have to download and install controller drivers on Windows 10. For more on this month’s Xbox app for Windows 10 update as well as the new Avatars app – read this blog post.
  • Windows Store Beta improvements which is now a blue tile instead of grey. Xbox Live games should be working and so are in-app purchases. Apps you purchased on a PC running Windows 8.1 will now show up in the Store Beta on Windows 10 as owned (and vice-versa). They’re also expanding the Store Beta beyond the previous 41 markets.
  • Discovering features and apps in Windows 10 through easy “bite-sized” learning and discovery experiences. This ranges from tips and tricks on the Lock screen, to helping users discover high quality apps through Start, the Lock screen and Cortana.

Issues fixed in this build:

  • You can now launch Win32 (desktop) apps from the Start menu again.
  • You should be able to download music in the Xbox Music and Music Preview apps.
  • When you minimize an app playing audio, it should continue playing in the background.

Issues introduced in this build:

  • Developers cannot enable Developer Mode in the Settings app for installing and testing apps on this build. We’ll enable this in an upcoming build. In the meantime, you will need enable your device for development using the Group Policy Editor.
  • There is an issue in this build preventing some games from playing in full screen mode. We’re working to get a fix out via WU as soon as possible.
  • The People app continues to crash. We’re planning to release an update for the People app through the Store Beta that fixes this.

There is apparently also a new dark mode that can make parts of the OS even darker than the personalization features allow you to today. For the most part, it turns the pane backgrounds in the Settings app to black. To give it a spin…

  1. Open the Registry Editor
  2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize
  3. Create DWORD key: SystemUsesLightTheme
  4. DWORD Value = 0
  5. Reboot the computer

If you wish to revert to the light theme, just toggle the DWORD value to ‘1’ and reboot.

In the work that I’ve done recently for evangelizing the principles behind our DevOps movement, it was interesting to hear the question of how microservices has anything to do with DevOps at all. It seems my blogging and marketing within the company is working as neither concept was widely known at the time I had started there and now people are getting to get the concepts well enough to know the difference.

They are very much correct in stating that microservices is an architectural concern and not something that DevOps dictates or even talks about. Even today, I am still marketing both DevOps and microservices in almost the same breath in most conversations. I have changed my messaging a to remove the confusion and put more emphasis on what each aims to resolve.Continue reading

I was kind of put off by this update because it was only incremented by 1 whereas the desktop version can easy jump double-digits between builds. I was originally expecting a big new build, but the idea behind this particular update is to restore some of the functionality that was severely limited or hampered in the previous build. There are no new features in this build and was meant strictly to return functionality to the users that have decided to risk it all and go with a technical preview on their day-to-day primary phones.

For those of you with a Lumia 520 phone, you can now get this build. The 10051 was temporarily suspended for that particular model amid reports that a small number of users were having issues trying to roll their phones back to Windows Phone 8.1. The issue causing the failures was the way in which the Windows Phone Reset Tool was re-flashing these devices. Microsoft has released an update to the Windows Phone Reset Tool that should get those impacted by the issue up and running. More information on that is available here.Continue reading

Thanks to AMD’s president and CEO Lisa Su on their latest earnings call last week, she said that the release date for Windows 10 is sometime in late July. Having worked at Microsoft, this isn’t really big news since that is when they usually do it unless it slips to August for whatever reason. There is always a time gap between when they release RTM and when it’s available internally, to MSDN subscribers, and to the general public. The part that hasn’t been covered is if that’s the RTM release date, where we normally wouldn’t see the bits for a few weeks afterwards, or if RTM is actually earlier than that, and this is one of the other availability dates. I’m leaning towards the earlier release date when they call it good for shipping and producing the official binaries.

Windows and Visual Studio have usually always gone hand-in-hand together for release and availability as well given that one is the official tooling to develop on the other and they need some sort of lock-step development plan. It may not be the same days, could be as much as a couple of weeks apart given Windows is larger code-base. Either way, we’re getting close to getting the newest versions of both Windows and Visual Studio soon.Continue reading

Before you get further into this blog post and wonder why it may seem a little off, this is my first blog post about the Windows 10 builds for phones. There has only ever been one prior build for Windows 10 and phones, but I didn’t cover it as the Lumia 920 I have wasn’t in the supported devices list. I didn’t have any indication of when they might happen, so I skipped it. I only like doing a review for things I’ve actually laid my hands on.

The Lumia 920 I have had the latest updates applied to it from the developer preview program for 8.1 where application developers can get the latest updates directly from Microsoft rather than waiting for carriers to make it available to users. The version you see on my phone’s About screen may reflect a newer version as a result.Continue reading