Line 1: |
Line 1: |
| + | {{Note box|This howto is for building your own koji build farm. |
| + | For how to use the koozali.org build farm, please see [[Koji Usage]]}} |
| + | |
| Official Koji documentation can be found at: https://docs.pagure.org/koji/ | | Official Koji documentation can be found at: https://docs.pagure.org/koji/ |
| | | |
Line 13: |
Line 16: |
| Major Koji components: | | Major Koji components: |
| | | |
− | * hub | + | * hub (koji-hub) |
− | * web server | + | * web server (koji-web) |
− | * build servers | + | * builders |
− | * build daemon | + | * build daemon (kojid) |
− | * Dnf|Yum repository creation and maintenance daemon | + | * Dnf|Yum repository creation and maintenance daemon (kojira) |
| | | |
| You need at least the one server which can perform all functions, or split it into a hub, web plus 1+ build servers. | | You need at least the one server which can perform all functions, or split it into a hub, web plus 1+ build servers. |
Line 24: |
Line 27: |
| | | |
| * hub - which will run the hub, web and dnf|Yum repository daemon | | * hub - which will run the hub, web and dnf|Yum repository daemon |
− | * build server - there can be multiple of these | + | * builders - there can be multiple of these |
| | | |
− | All of these servers will be based on bare Rocky 8 - minimal install, servers.
| + | For our purposes, all of these servers will be based on bare Rocky 8 - minimal install, servers. |
| | | |
| == Install == | | == Install == |
Line 47: |
Line 50: |
| </syntaxhighlight> | | </syntaxhighlight> |
| The install-koji-farm.sh script will accept multiple parameters<syntaxhighlight lang="bash"> | | The install-koji-farm.sh script will accept multiple parameters<syntaxhighlight lang="bash"> |
− | install-koji-farm.sh [web=<web FQDN> | build=<build FQDN> | debug] | + | install-koji-farm.sh [web=<web FQDN> | build=<build FQDN> | scm=<scm ip or name>:/* | debug] |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
| * web=<FQDN> - defaults to hub FQDN | | * web=<FQDN> - defaults to hub FQDN |
− | *build=<FQDN> - multiple allowed. | + | *build=<FQDN> - multiple allowed |
| + | *scm=<IP or Name of SCM>:/* - multiple allowed |
| *debug - will list each line executed, plus lots of other gunk (very noisy) | | *debug - will list each line executed, plus lots of other gunk (very noisy) |
| | | |
Line 66: |
Line 70: |
| The web interface will be available via http://<your hub server>/koji | | The web interface will be available via http://<your hub server>/koji |
| | | |
− | === Bootstrap === | + | === Build Targets === |
− | This will have created 6 targets with various build tags to use | + | This will have created 6 build targets with various build tags to use |
| | | |
| * dist-sme10-os (dist-sme10-os-build) | | * dist-sme10-os (dist-sme10-os-build) |
Line 75: |
Line 79: |
| * dist-sme12-os (dist-sme12-os-build) | | * dist-sme12-os (dist-sme12-os-build) |
| * dist-sme12-contribs (dist-sme12-contribs-build) | | * dist-sme12-contribs (dist-sme12-contribs-build) |
| + | There is a hierarchy inheritance structure for each release (see 10, 11 & 12), where the basic settings are inherited (e.g. yum or dnf, centos:7 or rockylinux:8 bootstrap image for mock) as well as which external repositories to use (e.g. centos7/el7 versions or rocky8/el8 versions) |
| + | |
| + | + dist-sme<release>-os |
| + | |
| + | ++ dist-sme<release>-os-build |
| + | |
| + | ++ dist-sme<release>-contribs |
| + | |
| + | +++ dist-sme<release>-contribs-buikl |
| + | |
| + | ++ dist-sme<release>-addons |
| + | |
| + | ++ dist-sme<release>-testing |
| + | |
| + | ++ dist-sme<release>-updates |
| + | |
| + | ++ dist-sme<release>-updates-testing |
| | | |
| How to build etc. will be covered in the 'to be written' koji usage page...... | | How to build etc. will be covered in the 'to be written' koji usage page...... |
| | | |
− | ===Additional Build Servers=== | + | ===Additional Builders=== |
| | | |
| You can add additional build servers later, via<syntaxhighlight lang="bash"> | | You can add additional build servers later, via<syntaxhighlight lang="bash"> |
Line 89: |
Line 110: |
| koji-add-user.sh <User Name> [ permission=<permission> | debug ] | | koji-add-user.sh <User Name> [ permission=<permission> | debug ] |
| </syntaxhighlight> | | </syntaxhighlight> |
− | This will add them into the db and generate ssl CLI and browser keys, which will be bundled up in a tgz file at /etc/pki/koji/bundle/koji-<User Name>-bundle.tgz.
| + | Where <permission> could be "admin". |
| | | |
− | This bundle should be copied and extracted into their home (~) directory and will create a .koji directory containing config and keys. | + | This will add the user into the koji db and generate ssl CLI and browser keys, which will be bundled up in a tgz file at /etc/pki/koji/bundle/koji-<User Name>-bundle.tgz. |
| + | |
| + | This bundle should be copied and extracted into their home (~) directory and will create a .koji directory containing config and keys.This can be on a remote machine with the koji client installed. |
| <syntaxhighlight lang="bash"> | | <syntaxhighlight lang="bash"> |
| cd ~ | | cd ~ |
| tar -zxf koji-<User Name>-bundle.tgz | | tar -zxf koji-<User Name>-bundle.tgz |
| koji moshimoshi | | koji moshimoshi |
− | </syntaxhighlight>{{Warning box|Beware - demons lurk here}} | + | </syntaxhighlight> |
| + | |
| + | === Bootstrap === |
| + | The setup of the repos used for building SME10, SME11 & SME12 are all included in the install script, but a brief description of what has been setup seems sensible. |
| | | |
− | ===The long way === | + | ==Install - The long way (Beware: Demons lurk here) == |
− | This is just left here to help understand what is in the scripts (which may have changed since this was written) | + | {{Warning box|This has been left here to help understand what is in the scripts (which may have changed since this was written)}} |
| | | |
| =====Hub/Web Server===== | | =====Hub/Web Server===== |
Line 467: |
Line 493: |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | ====Koji Build Servers==== | + | ====Koji Builders==== |
| For this exercise I only created 1 build server. You can have as many as you like... | | For this exercise I only created 1 build server. You can have as many as you like... |
| | | |
Line 510: |
Line 536: |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | =====Build Server setup===== | + | =====Builder setup===== |
| You'll need to set up your network: You can do this during the install or post install (ensure network activated, IP address, FQDN, Gateway, DNS) | | You'll need to set up your network: You can do this during the install or post install (ensure network activated, IP address, FQDN, Gateway, DNS) |
| | | |
Line 560: |
Line 586: |
| systemctl start kojid | | systemctl start kojid |
| </syntaxhighlight> | | </syntaxhighlight> |
| + | [[Category:Developer]] |
| + | [[Category:Infrastructure]] |