README.md 1.64 KB
Newer Older
Jean-Francois Rey's avatar
Jean-Francois Rey committed
1
# Windows 10 Virtual Machine, R environment, as GitLab runner
Jean-Francois Rey's avatar
Jean-Francois Rey committed
2

Jean-Francois Rey's avatar
Jean-Francois Rey committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
If you want to develop and test your R package, build an R package binary under/for windows automatically, this is the right place.  

> Create a VirtualBox under windows 10 with R and Rtools + some dependencies.  And register it as a GitLab Runner.

## Dependencies

### System

* VirtualBox (>=6.0.0) and extension Pack
* Vagrant (>=2.2.10)
* Ansible (>=2.2.1.0)
* pywinrm (>=0.3.0) compatible with Ansible Python version (defualt is 2)

### GitLab Runner

A bare metal or a Virtual Machine with nested Virtualization on the hypervisor activated as a server.  
Install GitLab-Runner and register a _shell_ runner. _gitlab-runner_ user have to get access to _vboxmanage_, _vagrant_ and _ansible_.  
Register a virtualbox runner call win10R4.  
```bash
gitlab-runner register \
	--non-interactive \
	--name win10R4
	--url <Gitlab_URL> \
	--registration-token <registration-token> \
	--executor "virtualbox" \
	--tag-list windows,R4 \
	--ssh-user vagrant \
  --ssh-password vagrant \
	--virtualbox-base-name "WIN10R4" \
	--virtualbox-disable-snapshots = false \
	--virtualbox-base-snapshot = "bootR4"
```
Jean-Francois Rey's avatar
Jean-Francois Rey committed
35

Jean-Francois Rey's avatar
update    
Jean-Francois Rey committed
36
## Principle
Jean-Francois Rey's avatar
Jean-Francois Rey committed
37
38
	
Every things happen in the [[.gitlab-ci.xml]] file.  
Jean-Francois Rey's avatar
update    
Jean-Francois Rey committed
39

Jean-Francois Rey's avatar
Jean-Francois Rey committed
40
41
42
Mainly the [[VagrantFile]] set up a virtual machine from Vagrant cloud _GAEV/win10_ (a windows10 professional evaluation version with vbBoxGuestAditions).  
Files in [[provisioning]] are playbooks for ansible that will install/configure R, Rtools, packages, MiKTeX, Pandoc, gitlab-runner.  
After the virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing the existing virtualbox machine "WIN10R4").
Jean-Francois Rey's avatar
update    
Jean-Francois Rey committed
43

Jean-Francois Rey's avatar
Jean-Francois Rey committed
44