Machines and Container ====================== This section contains information about the machines and containers that are used to host the services that are needed to run the CPF build-pipeline. Machine Setup ------------- This section describes which machines, virtual machines and docker images are used to provide the development infrastructure for the CppCodeBase project. Currently the setup includes the native Debian machine \c Feldrechengeraet. This native machine runs three docker containers and a virtual Windows 10 machine. The pipeline requires a windows based build-slave for Jenkins which is currently implemented as a virtual machine. This machine has been configured manually and then a backup was made. The backup is stored on the DatenBunker machine in the \c /share/Knitschi/SystemBackups/CurrentBuildKnechts directory. The medium-term goal is to remove the need for stored virtual machines and replace them with containers or "blank" virtual machines plus scripts that will do the machine setup. This is supposed to improve the "documentation" of the state of the build-machines because all the scripts that define them are contained in the repository. Setting up the involved docker containers on Linux only requires the execution of the \c setupDockerContainer.sh script that can be found in the \c Infrastructure/DockerImages directory of the CppCodeBase. Starting The Linux Docker Containers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Currently the following machines are implemented as Linux based docker containers. - \b Documentation-Server: Hosts the html pages that are generated by the build pipeline. Currently this is the Doxygen documentation and a report from the OpenCppCoverage tool. - \b Jenkins-Master: The machine that runs the Jenkins master and which is accessed to observer the build-pipeline. - \b Jenkins-Slave-Linux-0: The machine on which the actual builds of the Linux parts of the pipeline are done. To set these machines up, one needs a debian machine that has docker and git installed. Then the CppCodeBase repository needs to be checked out in order to get the scripts. One also needs to create a directory that will act as the home directory of the jenkins-master and is shared between the host and the container. Currently this directory is hardcoded to \c /home/knitschi/jenkinsmastercontainer which may need to be transformed to an script argument later. The \c Infrastructure/DockerImages folder ccbContains the \c setupDockerContainer.sh script which does all the work. Running it will require an working ssh connection to \c Datenbunker machine in order to setup the connection from the \c jenkins-master to the \c Datenbunker. \bug Network issues after running setupDockerContainer.sh Setting up the docker container changes the network settings of the host. This may cause the the \c setupDockerContainer.sh script to fail when run multiple times in a row because connection to the internet can not be made. Restarting the machine on which the script is run will solve the problem. The Windows Slave ^^^^^^^^^^^^^^^^^ There is a virtual machine that is used as a build-slave for the parts of the pipeline that must be build on Windows. The machine runs the OpenSSH server that is shipped with Windows. All the tools that are needed for running the CPF pipeline jobs are installed manually. The Jenkins Build Server ------------------------ * The server is setup in the \c jenkins-master container. Manual changes to the server via the web-interface are lost when the \c setupDockerContainer.sh is re-run. This includes updates to plugins and jenkins itself. Therefore non-experimental changes must be implemented by changing the files in the \c Infrastructure/DockerImages directory. * The web-page of the jenkins-server is here. * There is a post-commit hook that starts the pipeline. * The pipeline script builds the \c pipeline target on Linux and Windows in two configurations each. * The pipeline script collects html output of the pipeline and copies it to a web-server. Git --- The Git repository is hosted on the DatenBunker machine in the directory \c /share/GitRepositories/CppCodeBase. The repository has a post-commit-hook that triggers the CppCodeBase_Build_Pipeline job on the Jenkins server. \todo Buy a more powerfull build-machine to reduce the overall pipeline time.