tex-framework/content.tex

67 lines
2.6 KiB
TeX
Raw Normal View History

\section{Introduction}
Gitlab-ci uses so called runners to execute the build jobs defined in the build
job file of a repository. A runner is a seperate tool and can be installed on
any machine. The type of connection is configurable. The intentions of these concept are:\\
2016-02-20 16:48:57 +00:00
\begin{itemize}
\item{remove (build) environmental dependency from ci server}
\item{multipe runners to parallize multiple builds}
2016-02-20 16:48:57 +00:00
\end{itemize}
The Runner has to be installed on a machine with a proper environment (compiler,
...) installed for the dedicated project it is used for. Figure \ref{fig:gitlab-runner-interaction} illustrates
the interaction of a local workstation, the gitlab(-ci) server and the
gitlab-ci-multi-runner.
\begin{figure}
\begin{center}
\input{gitlab-runner.tex}
\caption{Gitlab-ci - runner interaction}
\label{fig:gitlab-runner-interaction}
\end{center}
\end{figure}
\section{Installation of gitlab-ci-multi-runner}
The Installation of the runner depends on the operating system of the host and
is described here: \hyperlink{https://docs.gitlab.com/runner/install/}{\texttt{https://docs.gitlab.com/runner/install}}
\section{Installation of a dedicated runner}
\subsection{Prerequisites}
To install a dedicated runner prerequisites has to be fullfilled:
2016-02-20 16:48:57 +00:00
\begin{itemize}
\item{Url of gitlab ci coordinator}
\item{Registation token of that server}
\item{Tags - if the build job defines tags to identify runners}
2016-02-20 16:48:57 +00:00
\end{itemize}
These two informations can be gathered at the runners section of the project's
gitlab repository the runner is installed for. That section is accessible using:\texttt{<gitlab-url>/<project-path>/runners}\\
\textbf{Example:}\\
\texttt{https://novgit05.novero.com/agricola/agricola/runners}
\subsection{Register}
Open a shell an type: \texttt{gitlab-ci-multi-runner register}. An interactive
shell opens and requests some inputs (see prequisites).
\lstsetdefault
\begin{lstlisting}
user@dabbld01:~$ sudo gitlab-ci-multi-runner register
Running in system-mode.
Please enter the gitlab-ci coordinator URL
(e.g. https://gitlab.com/):
https://novgit05.novero.com/ci
Please enter the gitlab-ci token for this runner:
<secret-token>
Please enter the gitlab-ci description for this runner:
[dabbld01]:
my-runner
Please enter the gitlab-ci tags for this runner (comma
separated):
Please enter the executor: shell, docker+machine,
docker-ssh+machine, kubernetes, docker, docker-ssh,
parallels, ssh, virtualbox:
shell
Runner registered successfully. Feel free to start it,
but if it's running already the config should be
automatically reloaded!
\end{lstlisting}
\subsection{Start as service}
Open a shell an type: \texttt{gitlab-ci-multi-runner start}
2016-02-20 16:48:57 +00:00