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

update Readme

add macos update options
parent d4b72f38
Pipeline #2492 canceled with stages
......@@ -5,21 +5,44 @@ If you want to develop and test your R packages, build R packages binaries under
> __This project is only for developpement and testing. For other use you must have Apple equipment.__
## What is doing ?
> Create a VirtualBox under MacOS Catalina 10.15 with R (>= 4.0.0) and Rtools + some dependencies. And register it as a GitLab-Runner.
[[TOC]]
[[_TOC_]]
## The Idea
![Project pipeline windows R](images/GitLab_Runner_pipeline_R.png)
__ The main purpose of this project is to automate the creation of a R environment under MacOS to use it as a GtiLab-Runner in CI/CD pipelines.__
Here is the steps :
1. __Get__ a VirtualBox Machine from [VagrantCloud](https://app.vagrantup.com/) (a box) under MacOS, generated by [Packer](https://www.packer.io/). More information [here](https://forgemia.inra.fr/gaev/packer/macos).
2. __Initializing__ and configuring the VM using [Vagrant](https://www.vagrantup.com/). See [VagrantFile](VagrantFile) template.
3. __Provisioning__ and configuring the VM using [Ansible](https://ww.ansible.com). See [ansible\_provisioning/playbook.yml](ansible\_provisioning/playbook.yml) and scripts in [ansible\_provisioning/files/](ansible\_provisioning/files/) :
- Update Mac OS (optional)
- Install R-4.0-branch (>= 4.0.0) / lastest stable version
- Install gfortran 10.2 [R tools chain](https://github.com/fxcoudert/gfortran-for-macOS/releases)
- Install static libs (R packages libs dependencies) [https://mac.r-project.org/libs-4/](https://mac.r-project.org/libs-4/)
- Install some R packages
- Install GitLab-Runner for artifacts (lastest version)
- Install MacTex (lastest version)
- Install XQuartz (v2.7.11)
4. __Generating__ a new Vagrant box
5. __Registering__ this new VM as a GitLab Runner (snapshot version)
## Dependencies
A bare metal or a virtual machine (with nested virtualization on the hypervisor activated) as a server with dependencies installed. Apple equipement.
### Systems
### System
* VirtualBox (>= 6.1.14)
* Vagrant (>= 2.2.10)
* Ansible (>=2.2.1.0)
* sshpass (1.06)
* GitLab-Runner (>= 10.0.0)
* [VirtualBox](https://www.virtualbox.org/) (>= 6.1.14)
* [Vagrant](https://www.vagrantup.com/) (>= 2.2.10)
* [Ansible](https://www.ansible.com/) (>=2.2.1.0)
* sshpass (>= 1.06)
* [GitLab-Runner](https://docs.gitlab.com/runner/install/) (>= 10.0.0)
### GitLab Runner
......@@ -29,7 +52,7 @@ To register the virtualbox runner create here, called _MACOSCR4_.
```bash
gitlab-runner register \
--non-interactive \
--name MACOSCR4
--name MacOSCR4
--url <Gitlab_URL> \
--registration-token <registration-token> \
--executor "virtualbox" \
......@@ -53,8 +76,8 @@ tags:
Every things happen in the [.gitlab-ci.xml](.gitlab-ci.xml) file.
Mainly the [VagrantFile](VagrantFile) set up a virtual machine from Vagrant Cloud [GAEV/MacOS\_Catalina](https://app.vagrantup.com/GAEV/boxes/MacOS_Catalina) box.
Files in [provisioning/](provisioning/) are playbooks for Ansible that will install/configure R, Rtools [https://mac.r-project.org/](https://mac.r-project.org/), packages and dependencies, MacTeX, Xquartz and GitLab-Runner.
After the virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing the existing virtualbox machine "MACOSCR4").
Files in [provisioning/](provisioning/) are playbooks for __Ansible__ that will install/configure R, tools [https://mac.r-project.org/](https://mac.r-project.org/), packages and dependencies, MacTeX, Xquartz and GitLab-Runner.
After the Virtual Machine creation and configuration, it registered as a new__ gitlab-runner__ (by replacing the existing virtualbox machine "MACOSCR4").
## Locally
......
#!/bin/bash
echo "Running updates... May reboot severals times"
softwareupdate -i -a --restart
......@@ -6,6 +6,11 @@
tasks:
- name: ping
ping:
#- name: Update MacOS
# script: files/update-macos.sh
#- name: reboot after update
# reboot:
# reboot_timeout: 3600
- name: Install R and dependencies
script: files/install-r.sh
- name: Install R packages and dependencies
......
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