User Tools

Site Tools


This is an old revision of the document!

Running Juju-Core tests on Windows

Installing a base windows system

First we need to install a windows machine obviously. A verry light weight windows version (and free) can be found at this link. You may need to register first, but that's mostly painless and its free.

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.

Post install steps

Windows Hyper-V server 2012 is basically a stripped down version of windows with no GUI (well almost. 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.

Enable RDP

To make our lives easier, lets get remote desktop working. This will allow clipboard sharing:

  1. select option 7
  2. type in “E” and then hit enter
  3. select 2 and hit enter

This will enable remote desktop. Now lets 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 favorite RDP client. On Ubuntu systems, my personal preference is remmina, but any client should work.

Installing Chocolatey

Chocolatey is awesome. Why its not default in windows is beyond me. In essence its a windows version of a package manager like apt-get or yum. So lets 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 then 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 lets open up a powershell terminal:

start powershell

You should now have something like this:

In that terminal, copy and paste the following command:

iex ((new-object net.webclient).DownloadString(''))

Congrats, you now have chocolatey installed. Here is a list of packages available in the chocolatey repository

Installing scm and golang

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.

Installing SCM systems and golang

Getting a SSL enabled version of mongod.exe

Apparently, the windows version of mongod comes with SSL disabled on windows. You basically have 2 options to get SSL support on windows:

  1. Buy the paied version
  2. compile your own

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 7zip

You will also need the Visual studio redistributable package vor mongo to work:

choco install vcredist2013
choco install vcredist2008

Get a copy of OpenSSL for Windows:


Now lets unarchive mongo:

"C:\Program Files\7-Zip\7-Zip.exe" x

You should have a a mondog.exe file. Lets check if it actually works:

.\mongod.exe --version

You should have the mongo version. If you get errors of any kind regarding SSL, downgrade the OpenSSL version to an earlyer one.

Adding mongod to your $PATH

Lets create a folder for it first:

mkdir C:\bin

Copy mongod.exe to it:

cp mongod.exe C:\bin\

Add C:\bin to path:

$x = $env:PATH
$env:PATH = "C:\bin;$x"
setx PATH $env:PATH

Running the juju tests

At shis 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\\juju\juju
go test ./...
juju-testing.1423159928.txt.gz · Last modified: 2015/02/05 20:12 by gsamfira