Skip to content

Commit

Permalink
vagrant: add a windows box for wincred dev/test
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Jun 13, 2019
1 parent 28db4cc commit 7e20bfc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
27 changes: 24 additions & 3 deletions vagrant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This directory contains Vagrant images for use in development and testing.
Using
-----

### Fedora (Gnome desktop)

**Pre-Reqs:**

1. Install vagrant
Expand Down Expand Up @@ -38,7 +40,26 @@ cd /src
go test -v ./...
```

TODO
----
### Windows 10

**Pre-Reqs:**

1. Install vagrant

**Launch**:

- [ ] A Windows Vagrant VM for testing wincred.go
```sh
cd vagrant/windows
vagrant up
```

`git` and `go` will be installed via the chocolately package manager.

A GUI will open up. Login and open cmd or powershell.

The root of the project will be mounted to `C:\src`

```sh
cd C:\src
go test -v .
```
24 changes: 24 additions & 0 deletions vagrant/windows/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Vagrant.configure("2") do |config|
# https://app.vagrantup.com/StefanScherer/boxes/windows_10
config.vm.box = "StefanScherer/windows_10"
config.vm.box_version = "2019.05.22"

config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = 2048
vb.cpus = 2
vb.customize ["modifyvm", :id, "--vram", "128"]
vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
end

# install chocolately pkg manager
config.vm.provision "shell", privileged: true, inline: <<-SHELL
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
SHELL

config.vm.provision "shell", inline: "choco install -y git"
config.vm.provision "shell", inline: "choco install -y golang"

# mount the project into c:\src
config.vm.synced_folder "../..", "/src"
end

0 comments on commit 7e20bfc

Please sign in to comment.