This is an old revision of the document!
First we need to install a Windows machine, obviously. A very light weight windows version (and free) can be found at this link. You may need to register first, but that's free and mostly painless.
You can install this version of Windows on top of KVM using any ubuntu version >= Ubuntu 14.04. Installation steps are simple, just follow the wizard.
Windows Hyper-V Server 2012 is basically a stripped down version of windows with no GUI (well almost, as the Windows GUI is baked into the kernel). When you first login, you should see something like this:
Don't panic, we should still have access to everything we need.
To make our lives easier, lets get remote desktop working. This will allow clipboard sharing:
This will enable remote desktop. Now let's disable the firewall (you don't really need it for testing). In the black cmd terminal type:
netsh advfirewall set allprofiles state off
You should now be able to connect to your Windows machine via your favourite RDP client. On Ubuntu systems, my personal preference is Remmina, but any client should work.
Chocolatey is awesome. Why it's not default in windows is beyond me. In essence its a Windows version of a package manager like apt-get or yum. So let's have us a little bit of chocolate. First lets get a PowerShell prompt. Working on Windows after so many years of using Linux, I have found that PowerShell is a more friendly tool than cmd, as it is better suited to my muscle memory. It has things like ls, mkdir, mv, rm aliased to powershell commandlets. Granted the options differ, but at least in their simplest forms, you get to use familiar commands. So let's open up a PowerShell terminal:
You should now have something like this:
In that terminal, copy and paste the following command:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Congrats, you now have chocolatey installed. Here is a list of packages available in the chocolatey repository
Its time to install the various scm binaries needed by go, and also version 1.2.1 of Go to mirror the version used in Ubuntu 14.04. Follow the instructions on the following link.
Apparently, the windows version of mongod comes with SSL disabled on windows. You basically have two options to get SSL support on windows:
You can get a precompiled version of mongod.exe here.
To download it via PowerShell type in the following command in the PowerShell prompt:
If you have not already done so, install 7zip:
choco install -y 7zip
You will also need the Visual Studio redistributable package for mongo to work:
choco install -y vcredist2013 choco install -y vcredist2008
Get a copy of OpenSSL for Windows:
Start-BitsTransfer http://slproweb.com/download/Win64OpenSSL-1_0_1L.exe .\Win64OpenSSL-1_0_1L.exe
Now let's extract mongo:
& "C:\Program Files\7-Zip\7-Zip.exe" x mongo.zip
You should have a a mongod.exe file. Lets check if it actually works:
You should have the mongo version. If you get errors of any kind regarding SSL, downgrade the OpenSSL version to an earlier one.
Lets create a folder for it first:
Copy mongod.exe to it:-35
cp mongod.exe C:\bin\
Add C:\bin to path:
$env:PATH += ";C:\bin" setx PATH $env:PATH
At this point, if you followed the steps here you should already have a golang setup with a local copy of the juju repository.
Navigate to that folder:
cd $env:GOPATH\src\github.com\juju\juju go test ./...
Thanks for tagging along, I really appreciate it. As a sign of my appreciation, the following commands can be run inside a PowerShell session to install firefox:
(new-object System.Net.WebClient).DownloadFile("https://download.mozilla.org/?product=firefox-35.0.1-SSL&os=win&lang=en-US", "$HOME\firefox_installer.exe") cmd.exe /C call $HOME\firefox_installer.exe /SILENT
Or the package management way:
choco install -y firefox
And to launch it:
& 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
You may now enjoy the simple pleasures in life once more, like giving a quick Google or downloading an MSI installer right from the comfort of your own blue-on-black free version of Windows Server