Difference between revisions of "Buildbot Network"
m (add OS X to list) |
(Update for playbook changes.) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 2: | Line 2: | ||
[[User:Stuarta|stuarta]] 13:35, 3 March 2014 (UTC) | [[User:Stuarta|stuarta]] 13:35, 3 March 2014 (UTC) | ||
− | MythTV uses an extensive set of | + | MythTV uses an extensive set of buildworkers, running different operating systems, as well as different compilers. The aim of this is to validate all changesets do not affect our ability to build on the different platforms. |
The intention is to ensure that MythTV will build and run on all the current distro flavours, and in particular on the long term stable variants. eg. | The intention is to ensure that MythTV will build and run on all the current distro flavours, and in particular on the long term stable variants. eg. | ||
Line 21: | Line 21: | ||
== Build Master == | == Build Master == | ||
− | You can look at the progress of current builds or the history of the most recent builds by visiting [https://code.mythtv.org/buildbot BuildMaster]. I'd recommend | + | You can look at the progress of current builds or the history of the most recent builds by visiting [https://code.mythtv.org/buildbot BuildMaster]. I'd recommend the console page. |
− | == Setting up a build | + | == Setting up a build worker == |
− | Setting up a build | + | Setting up a build worker is a relatively simple process. If you have a server capable of running a virtual machine or three, then offers of buildworkers are always welcome. Please contact the developers via IRC '''#mythtv on Libera Chat''' - irc://irc.libera.chat/#mythtv. |
=== Basic VM configuration === | === Basic VM configuration === | ||
* 1x CPU | * 1x CPU | ||
− | * 2Gb RAM | + | * 2Gb RAM min |
* 16Gb OS Disk | * 16Gb OS Disk | ||
* 50Gb /home | * 50Gb /home | ||
Line 43: | Line 43: | ||
=== Automated Method (Recommended) === | === Automated Method (Recommended) === | ||
+ | (For CentOS first install epel-release)<br> | ||
Install the ansible, ansible-extras (if a separate package on your distro) and git packages, then clone the MythTV ansible repository | Install the ansible, ansible-extras (if a separate package on your distro) and git packages, then clone the MythTV ansible repository | ||
$ git clone https://github.com/MythTV/ansible.git | $ git clone https://github.com/MythTV/ansible.git | ||
− | + | Change into the directory where the playbooks were checked out to and run | |
− | + | ./mythtv.yml --limit=buildworker | |
− | This will install all the packages required, as well as configuring ccache and setting up the startup script to start the | + | This will install all the packages required, as well as configuring ccache and setting up the startup script to start the buildworker when the server starts. All that is left to do is configure the buildworker. Continue from the step "Connecting to the build network" |
=== Manual Method === | === Manual Method === | ||
− | Here is some information on setting up | + | Here is some information on setting up buildworker by hand |
* [[Buildslave Debian]] | * [[Buildslave Debian]] | ||
Line 61: | Line 62: | ||
* [[Buildslave Fedora]] | * [[Buildslave Fedora]] | ||
− | You should also create a | + | You should also create a buildworker user, and configure ccache to be allowed to use 10Gb of cache '''ccache -M 10G''' |
==== Autostart on boot ==== | ==== Autostart on boot ==== | ||
Line 67: | Line 68: | ||
''NOTE: Only required if you used the manual installation method'' | ''NOTE: Only required if you used the manual installation method'' | ||
− | Configuring the | + | Configuring the buildworker to autostart on system boot is a very simple step. Create a script '''~/bin/start-buildworker.sh''' with the following contents if you are using buildbot < 0.9 |
#!/bin/bash | #!/bin/bash | ||
Line 73: | Line 74: | ||
/usr/bin/buildslave stop | /usr/bin/buildslave stop | ||
exec /usr/bin/buildslave start | exec /usr/bin/buildslave start | ||
+ | |||
+ | Or this if you are using buildbot >= 0.9 | ||
+ | |||
+ | #!/bin/bash | ||
+ | cd ~/mythtv | ||
+ | /usr/bin/buildbot-worker stop | ||
+ | exec /usr/bin/buildbot-worker start | ||
Notes: | Notes: | ||
− | * The stop is not a mistake. The stop causes the | + | * The stop is not a mistake. The stop causes the buildworker to cleanup any old PID files that are present which would otherwise prohibit the buildworker from starting |
− | Then '''chmod +x ~/bin/start- | + | Then '''chmod +x ~/bin/start-buildworker.sh'''. |
− | Next edit crontab to start it at boot time. As the | + | Next edit crontab to start it at boot time. As the buildworker user run '''crontab -e''' and add the following line |
− | |||
− | |||
+ | @reboot /home/buildworker/bin/start-buildworker.sh | ||
== Connecting to the build network == | == Connecting to the build network == | ||
− | For this you will need to talk to the developers on IRC again | + | For this you will need to talk to the developers on IRC again. |
You will be provided with the following pieces of information | You will be provided with the following pieces of information | ||
− | * your | + | * your buildworker's name |
− | * the password assigned to your | + | * the password assigned to your buildworker |
* the hostname and port number of the buildmaster, i.e. buildbot.mythtv.org:9989 | * the hostname and port number of the buildmaster, i.e. buildbot.mythtv.org:9989 | ||
− | === Configure the | + | === Configure the buildworker === |
− | + | Run the 'buildworker' command as follows for buildbot < 0.9 | |
− | # su - | + | # su - buildworker |
$ mkdir mythtv | $ mkdir mythtv | ||
$ buildslave create-slave mythtv buildbot.mythtv.org:9989 SLAVENAME PASSWORD | $ buildslave create-slave mythtv buildbot.mythtv.org:9989 SLAVENAME PASSWORD | ||
− | |||
− | + | Or like this for buildbot >= 0.9 | |
− | |||
− | + | # su - buildworker | |
+ | $ mkdir mythtv | ||
+ | $ buildbot-worker create-worker mythtv buildbot.mythtv.org:9989 WORKERNAME PASSWORD | ||
− | + | Please make sure you edit info/host and info/admin in ~buildworker/mythtv so we know some information about your buildworker and your contact details. | |
− | + | NOTE: The startup script installed by the automated method will automatically populate info/host at startup | |
− | |||
− | + | buildworker needs to be started if not already running by either reboot, or by running the following as the buildworker user | |
− | + | ~/bin/start-buildworker.sh |
Latest revision as of 18:35, 20 September 2022
Contents
Buildbot Network
stuarta 13:35, 3 March 2014 (UTC)
MythTV uses an extensive set of buildworkers, running different operating systems, as well as different compilers. The aim of this is to validate all changesets do not affect our ability to build on the different platforms.
The intention is to ensure that MythTV will build and run on all the current distro flavours, and in particular on the long term stable variants. eg.
- Debian Stable
- Ubuntu LTS
- Fedora
- FreeBSD
- OS X
- RHEL/Centos6 is not an option due to the Qt version being too old.
Architecture Support:
- i386
- x86_64
- arm (currently armhf, armv6, armv7hl)
Build Master
You can look at the progress of current builds or the history of the most recent builds by visiting BuildMaster. I'd recommend the console page.
Setting up a build worker
Setting up a build worker is a relatively simple process. If you have a server capable of running a virtual machine or three, then offers of buildworkers are always welcome. Please contact the developers via IRC #mythtv on Libera Chat - irc://irc.libera.chat/#mythtv.
Basic VM configuration
- 1x CPU
- 2Gb RAM min
- 16Gb OS Disk
- 50Gb /home
Notes:
- 50Gb /home is sufficient to hold at least 3 different builds as well as the whole 10Gb ccache
Installation
Install the operating system you are planning to use.
Automated Method (Recommended)
(For CentOS first install epel-release)
Install the ansible, ansible-extras (if a separate package on your distro) and git packages, then clone the MythTV ansible repository
$ git clone https://github.com/MythTV/ansible.git
Change into the directory where the playbooks were checked out to and run
./mythtv.yml --limit=buildworker
This will install all the packages required, as well as configuring ccache and setting up the startup script to start the buildworker when the server starts. All that is left to do is configure the buildworker. Continue from the step "Connecting to the build network"
Manual Method
Here is some information on setting up buildworker by hand
You should also create a buildworker user, and configure ccache to be allowed to use 10Gb of cache ccache -M 10G
Autostart on boot
NOTE: Only required if you used the manual installation method
Configuring the buildworker to autostart on system boot is a very simple step. Create a script ~/bin/start-buildworker.sh with the following contents if you are using buildbot < 0.9
#!/bin/bash cd ~/mythtv /usr/bin/buildslave stop exec /usr/bin/buildslave start
Or this if you are using buildbot >= 0.9
#!/bin/bash cd ~/mythtv /usr/bin/buildbot-worker stop exec /usr/bin/buildbot-worker start
Notes:
- The stop is not a mistake. The stop causes the buildworker to cleanup any old PID files that are present which would otherwise prohibit the buildworker from starting
Then chmod +x ~/bin/start-buildworker.sh.
Next edit crontab to start it at boot time. As the buildworker user run crontab -e and add the following line
@reboot /home/buildworker/bin/start-buildworker.sh
Connecting to the build network
For this you will need to talk to the developers on IRC again.
You will be provided with the following pieces of information
- your buildworker's name
- the password assigned to your buildworker
- the hostname and port number of the buildmaster, i.e. buildbot.mythtv.org:9989
Configure the buildworker
Run the 'buildworker' command as follows for buildbot < 0.9
# su - buildworker $ mkdir mythtv $ buildslave create-slave mythtv buildbot.mythtv.org:9989 SLAVENAME PASSWORD
Or like this for buildbot >= 0.9
# su - buildworker $ mkdir mythtv $ buildbot-worker create-worker mythtv buildbot.mythtv.org:9989 WORKERNAME PASSWORD
Please make sure you edit info/host and info/admin in ~buildworker/mythtv so we know some information about your buildworker and your contact details. NOTE: The startup script installed by the automated method will automatically populate info/host at startup
buildworker needs to be started if not already running by either reboot, or by running the following as the buildworker user
~/bin/start-buildworker.sh