Create Setting up Build Machines authored by Sebastian Pape's avatar Sebastian Pape
# Windows Build Machines
Setting up a Windows build machine consists of a few steps:
1. Install the Unreal Engine
2. Install the gitlab runner service and register a gitlab runner. Prefereably a shared runner. Use executor `shell`. Use the tags `windows` and `unreal-4.21`(replace version number) for the runner. Make sure to specify a user for the `gitlab-runner install` call, such that the service is not running as admin afterwards.
3. Configure the gitlab runner. For this open the config.toml file and add the following lines (change path to unreal engine folder):
```
executor = "shell"
environment = ["UE_ENGINE_FOLDER=F:/UnrealEngine/UE_4.21/Engine"]
shell = "powershell"
```
4. Start/Restart the gitlab runner service
---
# CentOS Build Machines
Setting up a CentOS build machine consists of a few steps:
1. Set up the gitlab runner according to the instructions of gitlab. Do not register a runner yet.
2. Switch to the Gitlab-Runner user account you have created
3. Download/Clone the Unreal Engine source code
4. Go to the `/Engine/Plugins/Runtime/` and remove the `nDisplay` folder
5. In the empty folder clone the nDisplay repository and remove its .git folder with with
```
git clone https://devhub.vr.rwth-aachen.de/VR-Group/ndisplay.git ./nDisplay
rm -rf ./nDisplay/.git
```
6. Go back to the root folder of the downloaded Unreal Engine. Run the following commands to build the engine (will take about 1h):
`Make sure to NOT run this commands as root. The engine refuses to build as root. Use a less priviledged user instead.`
```
./Setup.sh && ./GenerateProjectFiles.sh && make
```
7. Register a gitlab-runner. Preferably a shared runner. Use executor `shell`. Use the tags `centos` and `unreal-4.21` (replace version) for your runner.
8. Configure this runner by adding the following lines to the config.toml (locate it by gitlab-runner verify) and replace the path with your engine installation
```
environment = ["UE_ENGINE_FOLDER=/home/gitlab-runner/dev/Unreal_4_21/UnrealEngine/Engine"]
```
9. Start/Restart the gitlab runner service
---
# CentOS Deploy Machines
Setting up a CentOS deploy machine consists of a few steps:
1. Set up the gitlab runner according to the instructions of gitlab.
2. Register a gitlab-runner. Preferably a shared runner. Use executor `shell`. Use the tags `centos` and `networkdeploy` for your runner.
3. Set up ssh keys for the access to the cluster via the following commands
```
ssh-keygen -f ~/.ssh/cluster_access_av006de -q -P ""
ssh-keygen -f ~/.ssh/cluster_access_vrdev -q -P ""
```
4. The generated public keys can be viewed via the following commands. Note them.
```
cat ~/.ssh/cluster_access_av006de
cat ~/.ssh/cluster_access_vrdev
```
5. Append the first key to the `/home/av006de/.ssh/authorized_keys` file on the cluster and the second key to the `/home/vrdev/.ssh/authorized_keys` file.
6. To not allow full access to the cluster from the deploy machine, prepend the `vrdev` key in the `authorized_keys` file with the following command:
```
command="/home/av006de/bin/rrsync ~/UnrealCIDeploy/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding
it should look like
command="/home/av006de/bin/rrsync ~/UnrealCIDeploy/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAAB...
```
7. To not allow full access to the cluster from the deploy machine, prepend the `av006de` key in the `authorized_keys` file with the following command:
```
command="/home/av006de/bin/rrsync ~/demos_UNREAL/CI/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding
it should look like
command="/home/av006de/bin/rrsync ~/demos_UNREAL/CI/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAAB...
```
8. Note that the prepend commands are different
9. Create a folder directory which is used for syncing with the cluster folder. For this you could use the a structure with `~/dev/unreal_current_deployment/vrdev` and `~/dev/unreal_current_deployment/av006de`.
10. Configure the gitlab runner to use this structure by adding the following lines to the config.toml
```
environment = ["VRDEV_UNREAL_DEPLOY_FOLDER=/home/gitlab-runner/dev/unreal_current_deployment/vrdev", "CAVE_UNREAL_DEPLOY_FOLDER=/home/gitlab-runner/dev/unreal_current_deployment/av006de"]
```
11. Start/Restart the gitlab runner service
\ No newline at end of file