Verified Commit a37404f7 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

README.md: add README.md

parent f501d0b1
# GitLab Runners
This repository contains scripts to launch GitLab Runners for your group.
Once configured, GitLab runners are called by the GitLab server to perform computations (package, building, test, etc) on you code, after each commit. Runners are not executed on the server but on remote computer accessible by the network.
This repository contains various scripts to initialise a GitLab Runner, to register it for your group with the GitLab server, and to launch it.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine
### Prerequisites
You need the registration token for your group from the GitLab server.
For this go to your group page, **settings**, **CI/CD** and **Runners settings**. For the LBMC group, this correspond to the following url :
[https://gitlab.biologie.ens-lyon.fr/groups/LBMC/-/settings/ci_cd](https://gitlab.biologie.ens-lyon.fr/groups/LBMC/-/settings/ci_cd)
Cloning this repository:
```sh
git clone git@gitlab.biologie.ens-lyon.fr:LBMC/gitlab_runner.git
```
### Installing
First, we need to build a custom container of the gitlab-runner with the following command.
```sh
sudo mkdir -p /srv/gitlab-runner/config
gitlab_runner/docker_init.sh
```
This will build the `gitlab_runner` container with the certificate of the [gitlab.biologie.ens-lyon.fr](https://gitlab.biologie.ens-lyon.fr/) website installed.
This container, will be the process that register and manage the GitLab runners on your computer.
To run safely the runners themselves, we are going to instantiate new container, for each runners.
For example to have a runner for `R` development :
```sh
r_dev/docker_init.sh
```
The `gitlab_runner` container will be able to launch a runner within the `r_dev:3.5.1` container.
## Registering a Runner
To register a runner you need to use the `*_runner_register.sh` scripts.
For a `r_dev:3.5.1` runner, edit the `r_dev_runner_register.sh` file to add your group token.
Specify the tag and the name of the runner and register it with the following command:
```sh
./r_dev_runner_register.sh
```
You can check the runners registered in the **CI/CD** settings of your group.
## Launching your Runners
To launch your runners execute the following command:
```sh
./runner_launch.sh
```
To check the GitLab runner status:
```sh
docker ps
```
## Sopping your Runners
To stop your runners, execute the following command:
```sh
./runner_stop.sh
```
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://gitlab.biologie.ens-lyon.fr/pipelines/nextflow/tags).
## Authors
* **Laurent Modolo** - *Initial work*
See also the list of [contributors](https://gitlab.biologie.ens-lyon.fr/pipelines/nextflow/graphs/master) who participated in this project.
## License
This project is licensed under the CeCiLL License- see the [LICENSE](LICENSE) file for details
Supports Markdown
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