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

add LICENSE

parent d211b66d
This diff is collapsed.
# Windows 10 Virtual Machine, R environment, as GitLab runner
# Windows 10 Virtual Machine, R environment, as GitLab Runner
If you want to develop and test your R package, build an R package binary under/for windows automatically, this is the right place.
If you want to develop and test your R packages, build R packages binaries 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.
> Create a VirtualBox under windows 10 with R (Version >= 4.0.0) and Rtools + some dependencies. And register it as a GitLab Runner.
[[_TOC_]]
## Dependencies
### System
### Systems
* VirtualBox (>=6.0.0) and extension Pack
* VirtualBox (>=6.1.14) 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 (>= 10.0.0)
### 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.
A bare metal or a Virtual Machine with nested Virtualization on the hypervisor activated as a server with dependencies installed.
Use GitLab-Runner to register a _shell_ runner. _gitlab-runner_ user have to get access to _vboxmanage_, _vagrant_ and _ansible_.
To register the virtualbox runner create here, called _WIN10R4_.
```bash
gitlab-runner register \
--non-interactive \
......@@ -32,13 +36,33 @@ gitlab-runner register \
--virtualbox-disable-snapshots = false \
--virtualbox-base-snapshot = "bootR4"
```
To use this runner, add in your .gitlab-ci.yml jobs:
```
tags:
- windows
- R4
```
## Principle
Every things happen in the [[.gitlab-ci.xml]] file.
Every things happen in the [.gitlab-ci.xml](.gitlab-ci.xml) file.
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.
Mainly the [VagrantFile](VagrantFile) set up a virtual machine from Vagrant Cloud [GAEV/win10](https://app.vagrantup.com/GAEV/boxes/win10) box (a windows10 professional evaluation version with vbBoxGuestAditions).
Files in [provisioning/](provisioning/) are playbooks for Ansible that will install/configure R, Rtools, packages, MiKTeX, Pandoc and GitLab-Runner.
After the virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing the existing virtualbox machine "WIN10R4").
## Locally
To set up the VM (called windows10R4) locally (on your computer), you just need to run :
```bash
vagrant up
vagrant snapshot bootR4
vagrant halt
```
## Customization
* To add R packages : edit file [ansible\_provisioning/files/install-r-packages.sh](ansible\_provisioning/files/install-r-packages.sh) and add systems libraries and R packages to install.
* Make artifacts work on your GitLab instance : edit file [ansible\_provisioning/files/install-gitlab-runner.sh](ansible\_provisioning/files/install-gitlab-runner.sh) and change the gitlab URL and IP.
* Custom VirtualBox : edit file [VagrantFile](VagrantFile) and modify parameters in virtualbox provider.
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