Commit fb392960 authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

update Readme

parent 043fbd6b
......@@ -11,8 +11,12 @@ Gen-VM:
script:
- vboxmanage controlvm windows10R4 poweroff || true
- vboxmanage unregistervm --delete windows10R4 || true
- vagrant up
- vagrant up > vagrantup.log
- vagrant snapshot bootR4
- vagrant halt windows10R4
artifacts:
paths:
- vagrantup.log
Deploy-VM:
tags:
......
# Windows 10 Virtual Machine + R environment
# Windows 10 Virtual Machine, R environment, as GitLab runner
> create a Virtualbox under windows 10 with R and Rtools + some dependencies.
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"
```
## Principle
We use a Vagrant box _GAEV/win10_ (from vagrant cloud) that is a windows10 professional test version with vboxaGuestAditions.
Every things happen in the [[.gitlab-ci.xml]] file.
Vagrant create and provision (via ansible) the virtualbox.
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").
After virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing an existing one).
......@@ -5,6 +5,7 @@ Write-Output "Downloading Gitlab Runners Last Version"
## download last relase name
$url = "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe"
$output = 'C:\GitLab-Runner\gitlab-runner.exe'
New-Item -Path 'c:\' -Name "GitLab-Runner" -ItemType "directory"
$wcR = New-Object System.Net.WebClient
Write-Output "Downloading $url"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment