Editing OpenSuse Build Service/Installation
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
== Networking Overview == | == Networking Overview == | ||
- | The Front End ( | + | The Front End (fe) machine provides two major services: |
* the webui on build.obs and | * the webui on build.obs and | ||
* the API on apo.obs; | * the API on apo.obs; | ||
It is also a useful holding point for the download service on download.obs | It is also a useful holding point for the download service on download.obs | ||
- | The Back End ( | + | The Back End (be) machine provides the backend services including the schedulers, source server and repo server. The repo server (used by the workers to get required rpms) also doubles as the download server via a reverse-proxy on the fe. |
<source lang="bash"> | <source lang="bash"> | ||
Line 47: | Line 47: | ||
</source> | </source> | ||
- | Create some | + | Create some xen volumes |
<source lang='bash'> | <source lang='bash'> | ||
lvcreate -L 10G VG_data -n fe_root | lvcreate -L 10G VG_data -n fe_root | ||
Line 62: | Line 62: | ||
</source> | </source> | ||
- | Prepare an | + | Prepare an opensuse minimal image: |
<source lang='bash'> | <source lang='bash'> | ||
ROOTFS=/data/11.2min/image-root | ROOTFS=/data/11.2min/image-root | ||
Line 142: | Line 142: | ||
== Installing the Backend == | == Installing the Backend == | ||
- | On this host we need also to setup | + | On this host we need also to setup openSuse Tools repository: |
<source lang='bash'> | <source lang='bash'> | ||
cd /etc/zypp/repos.d/; | cd /etc/zypp/repos.d/; | ||
Line 154: | Line 154: | ||
zypper in obs-server obs-signer obs-utils createrepo dpkg nfs-client | zypper in obs-server obs-signer obs-utils createrepo dpkg nfs-client | ||
# obs-server brings these other packages as dependency. This is just for you to notice which packages are needed for Backend installation | # obs-server brings these other packages as dependency. This is just for you to notice which packages are needed for Backend installation | ||
- | # createrepo & dpkg are only | + | # createrepo & dpkg are only reccomends |
- | # | + | # nfs client is needed as we use an nfs share for host/be interchange |
</source> | </source> | ||
Configure Scheduler architectures | Configure Scheduler architectures | ||
Line 163: | Line 163: | ||
</source> | </source> | ||
- | /usr/lib/obs/server/BSConfig.pm needs to point to correct server names corresponding to source server, where workers are going to download the source, and the repository server, where RPM repos are going to be | + | /usr/lib/obs/server/BSConfig.pm needs to point to correct server names corresponding to source server, where workers are going to download the source, and the repository server, where RPM repos are going to be shered to users. |
<source lang='bash'> | <source lang='bash'> | ||
vi /usr/lib/obs/server/BSConfig.pm | vi /usr/lib/obs/server/BSConfig.pm | ||
Line 174: | Line 174: | ||
</source> | </source> | ||
- | Configure services as | + | Configure services as deamons |
<source lang='bash'> | <source lang='bash'> | ||
chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner | chkconfig --add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner | ||
Line 191: | Line 191: | ||
For version 1.7 there are a new services. You can start them as well: | For version 1.7 there are a new services. You can start them as well: | ||
* '''obswarden''' | * '''obswarden''' | ||
- | It checks if build hosts are | + | It checks if build hosts are dieing and cleans up hanging builds |
* '''obssigner''' | * '''obssigner''' | ||
It is used to sign packages via the obs-sign daemon. You need to configure | It is used to sign packages via the obs-sign daemon. You need to configure | ||
it in BSConfig.pm before you can use it. | it in BSConfig.pm before you can use it. | ||
* '''obsservice''' | * '''obsservice''' | ||
- | + | The is the source service daemon. OBS 1.7 just comes with a download | |
service so far. This feature is considered to be experimental so far, | service so far. This feature is considered to be experimental so far, | ||
but can be already extended with own services. | but can be already extended with own services. | ||
Line 240: | Line 240: | ||
</source> | </source> | ||
- | == Installing the | + | == Installing the Frontend (WebUI and API) == |
- | Start with a minimal | + | Start with a minimal Suse install and then add Tools repository where OBS 1.7 is available. |
<source lang='bash'> | <source lang='bash'> | ||
cd /etc/zypp/repos.d/; | cd /etc/zypp/repos.d/; | ||
Line 255: | Line 255: | ||
</source> | </source> | ||
- | '''Setup | + | '''Setup Mysql''' |
- | + | Mysql server needs to be installed and configured to start as deamon | |
<source lang='bash'> | <source lang='bash'> | ||
chkconfig --add mysql | chkconfig --add mysql | ||
rcmysql start | rcmysql start | ||
</source> | </source> | ||
- | Setup a secure installation, if it's the first time starting | + | Setup a secure installation, if it's the first time starting mysql |
<source lang='bash'> | <source lang='bash'> | ||
/usr/bin/mysql_secure_installation | /usr/bin/mysql_secure_installation | ||
</source> | </source> | ||
- | The frontend instance holds 2 applications, the | + | The frontend instance holds 2 applications, the api and the webui. Each one need a database created |
<source lang='bash'> | <source lang='bash'> | ||
mysql -u root -p | mysql -u root -p | ||
Line 282: | Line 282: | ||
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
</source> | </source> | ||
- | Configure your MySQL user and password in the "production:" section of the | + | Configure your MySQL user and password in the "production:" section of the api config: |
<source lang='bash'> | <source lang='bash'> | ||
vi /srv/www/obs/api/config/database.yml | vi /srv/www/obs/api/config/database.yml | ||
Line 292: | Line 292: | ||
password: ************ | password: ************ | ||
</source> | </source> | ||
- | Do the same for the webui. It's configured, by default to use | + | Do the same for the webui. It's configured, by default to use sqlite, but since we're configuring the cluster for production environment, let's bind it to mysql: |
<source lang='bash'> | <source lang='bash'> | ||
Line 313: | Line 313: | ||
You can check the migration was successful verifying the “migrated” message at the end of each statement. | You can check the migration was successful verifying the “migrated” message at the end of each statement. | ||
- | '''Setup and configure lighttpd for the | + | '''Setup and configure lighttpd for the api and webui''' |
- | You need to setup the correct hostnames to where webui, | + | You need to setup the correct hostnames to where webui, api and repo server are going to point to |
<source lang='bash'> | <source lang='bash'> | ||
vi /etc/lighttpd/vhosts.d/obs.conf | vi /etc/lighttpd/vhosts.d/obs.conf | ||
Line 364: | Line 364: | ||
include_shell "cat vhosts.d/*.conf" | include_shell "cat vhosts.d/*.conf" | ||
</source> | </source> | ||
- | Also, the modules "mod_magnet", "mod_rewrite" and | + | Also, the modules "mod_magnet", "mod_rewrite" and fastcgi need to be enabled by uncommenting the corresponding lines in /etc/lighttpd/modules.conf: |
<source lang='bash'> | <source lang='bash'> | ||
vi /etc/lighttpd/modules.conf | vi /etc/lighttpd/modules.conf | ||
Line 417: | Line 417: | ||
</source> | </source> | ||
- | ligthttpd user and group need to be the | + | ligthttpd user and group need to be the onwer of api and webui dirs (as well as log and tmp): |
<source lang='bash'> | <source lang='bash'> | ||
chown -R lighttpd.lighttpd /srv/www/obs/{api,webui} | chown -R lighttpd.lighttpd /srv/www/obs/{api,webui} | ||
Line 426: | Line 426: | ||
The other 14 hosts on the cluster are reserved to be used as workers, where package builds are going to place. | The other 14 hosts on the cluster are reserved to be used as workers, where package builds are going to place. | ||
- | The same | + | The same openSuse Tools repository addition must be done for each worker. |
<source lang='bash'> | <source lang='bash'> | ||
cd /etc/zypp/repos.d/; | cd /etc/zypp/repos.d/; | ||
Line 467: | Line 467: | ||
pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part4 | pvcreate /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part4 | ||
- | Now | + | Now creat the OBS VG for the host xen worker: |
vgcreate OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part1 | vgcreate OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part1 | ||
vgextend OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part2 | vgextend OBS /dev/disk/by-id/dm-name-360060e8005478600000047860000398c_part2 | ||
Line 490: | Line 490: | ||
qemu-svn | qemu-svn | ||
- | In order to run arm binaries in the | + | In order to run arm binaries in the xen chroot we need to ensure the initrd inserts binfmt_misc |
in /etc/sysconfig/kernel, set | in /etc/sysconfig/kernel, set | ||
DOMU_INITRD_MODULES="xennet xenblk binfmt_misc | DOMU_INITRD_MODULES="xennet xenblk binfmt_misc | ||
Line 498: | Line 498: | ||
On the backend machine edit /usr/lib/build/xen.conf to use the correct initrd | On the backend machine edit /usr/lib/build/xen.conf to use the correct initrd | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
[[Category:OpenSuse build service]] | [[Category:OpenSuse build service]] |
Learn more about Contributing to the wiki.