GitLab is customized using GitLab's admin interface. Some options can ony be
gitlab.yml. For such situations, use the Web terminal's
and create a file named
/app/data/gitlab.yml. This way custom configurations
will be preserved across updates and will also be backed up.
By default, GitLab allows external people to sign up. This can be disabled to restrict use only to Cloudron users as follows:
GitLab > Admin area > Settings > Features > remove the check mark "Sign-up enabled"
GitLab Runner for CI¶
GitLab CI involves installing one or more GitLab Runners. These runners carry out tasks as instructed by the main GitLab installation. When installing a runner, you have to select the project tags to which the runner will respond and the type of tasks ("executor") it can carry out. For example, there is a Shell executor, Docker execuctor etc.
Once GitLab runner is installed, you have to add the runner in GitLab. When adding the runner in GitLab, you can decide how GitLab schedules tasks in the runner ie. if the runner is exclusive to a project ('Specific Runner') or shared between projects ('Shared Runner) or specific to a group ('Group Runner').
Cloudron's GitLab package can be used with GitLab Runner as follows.
First create a new server and install GitLab Runner on it following the instructions at GitLab docs. In short:
# For ubuntu curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash sudo apt-get install gitlab-runner
Get the token listed in GitLab under
https://<gitlab.domain.com>/admin/runners(under shared runners section).
Register the runner with the token from the above step
``` root@localhost:~# sudo gitlab-runner register Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): https://gitlab.cloudron.xyz Please enter the gitlab-ci token for this runner: xzdZgdsXq5uSFCyAK7pP Please enter the gitlab-ci description for this runner: [localhost]: Shell Jobs Runner Please enter the gitlab-ci tags for this runner (comma separated): Whether to lock the Runner to current project [true/false]: [true]: false Registering runner... succeeded runner=xzdZgdsX Please enter the executor: docker, docker-ssh, shell, ssh, virtualbox, docker-ssh+machine, parallels, docker+machine, kubernetes: shell Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
The Runner should now be listed under
Now push a .gitlab-ci.yml to your project to start using the runner.