Changes

Jump to: navigation, search

Fedora-ARM,Dogfood - koji Hub

2,930 bytes removed, 09:17, 13 January 2011
no edit summary
== Project Description ==
The Fedora-ARM koji system uese HongKongIRAQ,an x86_64 system, as the Koji hub.
The Fedora-ARM project to use ARM system as the Koji hub(this is called "Eating own dogfood" in the industry)
== Project Details ==
'''First stage'''
* '''Koji Authentication Selection'''
Setting Up a Koji primarily supports Kerberos and SSL Certificate authentication. For basic koji command line access, plain user/pass combinations are possible. However, kojiweb does not support plain user/pass authentication. Furthermore, once either Kerberos or SSL Certificate authentication is enabled so that kojiweb will work, the plain user/pass method will stop working entirely. As such plain user/pass authentication is a stop gap measure at best unless you intend to never setup a fully functional kojiweb instance.Build System
The Kerberos credentials of the initial admin user will be necessary Koji components may live on separate resources as long as all resources are able to bootstrap the user databasecommunicate.To understand koji configuration is an important in project.
For SSL authentication, SSL certificates for the xmlrpc server, for the various koji components, and one for the admin user will need to be setup'''KOJI Configuration'''
1.[http://fedoraproject.org/wiki/Koji/ServerHowTo#Koji_Authentication_Selection Setting up * SSL Certificates for and authentication]via certificates* Creating a database in PostgreSQL and importing a schema* Working with psql* Apache configuration* Koji web and Koji hub
2.[http://fedoraproject.org/wiki/Koji/ServerHowTo#Setting_up_Kerberos_for_authentication Setting up Kerberos for authentication]
So,Release 0.1 results here [http://ycshon.blogspot.com/2010/11/sbr-600-project-release-01.html in my blog]
'''Second stagePackages'''
* Koji DatabaseOn the server (koji-hub/koji-web)
* httpd* mod_ssl* postgresql-server* mod_python (>= 3.3.1.Create Databasefor Kerberos authentication)
yum install postgresqlOn the builder (koji-serverbuilder)
2. Once installed you will then need to initialize the Database with the following command:* mock* rpm-build* createrepo
service postgresql initdbOn the yum repository creation and maintenance (kojira)
3.Start On the Postgresql service with:Bootrapping the Koji build environment
service postgresql start* Importing packages and preparing Koji to run builds* External Repos and preparing Koji to run builds
4== Project Plan == Goals for each release: '''release 0. At this point 1 - Koji Certificates '''  '''setting up SSL Certificates for Authentication'''  * Certificate generation* Generate CA* Generate the Postgresql server is installed koji component certificates and operational provided no errors were reported with the database initializedadmin certificate* Copy certificates into ~/.koji for kojiadmin   '''release 0.2 - PostgreSQL and koji hub''' '''release 0.2-1''' '''1.PostgreSQL Server'''
The next steps is to create a user named “koji”, set up Postgresql * Install PostgreSQL* Initialize PostgreSQL DB* Setup User Accounts* Setup PostgreSQL and populate the schema:* Authorize Koji-web and Koji-hub resources* Make auth changes live* SSL Certificate authentication* Give yourself admin permissions
useradd koji
passwd -d koji
su - postgres
createuser koji
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles?(y/n) n
createdb -O koji koji
logout
su - koji
psql koji koji < /usr/share/doc/koji*/docs/schema.sql
exit
* Koji Hub Configuration'''release 0.2-2'''
It was agreed that all parts of our Koji build system would reside on IRAQ.After successfully installing and configuring Postgresql the next step is the Koji Hub'''2.In order for the Koji Hub to work Apache should be installed as well as a few additional modules.Run the following command as root:hub'''
yum install * Install koji-hub httpd mod_ssl mod_python* Required Configuration* Optional Configuration* SELinux Configuration* Koji filesystem skeleton
Then edit the Apache conf file – ‘/etc/httpd/conf/httpd.conf’ and change the “MaxRequestsPerChild” to 100.
On IRAQ these setting were already in place as Apache was running and configured.
Next edit the ‘/etc/koji* 0.3 -hub/hub.conf’ file and add the following lines:DBName = kojiDBUser = kojiDBHost = localhostKojiDir = /mnt/kojiLoginCreatesUser = OnKojiWebURL = http://iraq.proximity.on.ca/kojiSince we are using SSL for authentication, also add'''Koji Web'''
DNUsernameComponent = CNProxyDNs = "/C=CA/ST=Ontario/O=Seneca CDOT/OU=/CN=kojiweb/emailAddress="'''release 0.3-1'''
And in the ‘/etc/httpd/conf'''1.d/kojihub.conf’ uncomment the following lines:kojiweb '''
<Location /kojihub>* Install Koji-WebSSLOptions +StdEnvVars* Required Configuration</Location>* Optional Configuration
Using the '''2. Koji certificates, we need to add the following lines to ‘/etc/httpd/conf.d/ssl.conf’, under the section ‘VirtualHost _default_:443′:Builder'''
SSLCertificateFile /etc/pki/koji/certs/kojihub.crt* Install kojidSSLCertificateKeyFile /etc/pki/koji/certs/kojihub.key* Required ConfigurationSSLCertificateChainFile /etc/pki/koji/koji_ca_cert.crt* Optional Configuration (SSL certificates)SSLCACertificateFile /etc/pki/* Add the host entry for the koji/koji_ca_cert.crtbuilder to the databaseSSLVerifyClient require* Add the host to the createrepo channelSSLVerifyDepth 10Even though SE Linux is not currently in use * A note on IRAQ,capacityit may be in the future. In order to allow Apache to connect to the Postgresql database run the following command as root:* Start Kojid
setsebool -P httpd_can_network_connect_db 1To allow Koji to work, a skeleton filesystem needs to be created and the ownershipchanged so Apache can write to it as required'''3. The following commands were executed:kojira'''
mkdir -p /mnt/koji/{packages,repos,work,scratch}* Install kojirachown -R apache.apache /mnt/koji* Required ConfigurationThen edited * Optional Configuration* Add the '/etc/koji.conf' file and changed user entry for the following lines:kojira user* Start Kojira
;url of XMLRPC server
server = http://iraqong.proximity.on.ca/koji
;url of package download site
pkgurl = http://iraq.proximity.on.ca/packages
;path to the koji top directory
topdir = /mnt/koji
;configuration for SSL athentication
;client certificate
cert = ~/.koji/client.crt
;certificate of the CA that issued the client certificate
ca = ~/.koji/clientca.crt
;certificate of the CA that issued the HTTP server certificate
serverca = ~/.koji/serverca.crt
After this is competed, the final step is the addition of the user and builder accounts. First add the kojira account and grant repo privileges with the following command( this should be done before running kojira for the first time) :
su - kojiadmin
koji add-user kojira
koji grant-permission repo kojira
Then add as many builders as required using the following commands editing where required (this should also be done prior to running kojid on each host):'''release 0.3-2'''  '''2. Test kojiweb''' * User account* Build packages
koji add-host arm-001-001 arm
koji add-host arm-001-002 arm
koji add-host arm-001-003 arm
== Project Plan ==
Goals for each release:
* 0.1 - '''Koji Certificates '''
Koji Hub setup - Certificates/security
* 0.2 - '''Koji Hub setup and Koji Database'''
Koji Hub Setup- Configuration
To setup PostgreSQL for use with Koji
* 0.3 - '''Koji Web'''
Build software with koji hub
== Project News ==
19,November I set up Koji Database.
26,November I set Setting up Postgresql server for Koji hub Configurationpart 1
6,Dec Setting up Postgresql server for Koji part two
 
16,Dev setting up Koji hub and Koji web,
== Resources ==
[http://fedoraproject.org/wiki/Koji/ServerHowTo#PostgreSQL_Server PostgreSQL_Server]
 
[http://fedoraproject.org/wiki/Koji/ServerBootstrap importing packages and preparing Koji to run builds]
 
[http://fedoraproject.org/wiki/Koji/ExternalRepoServerBootstrap External Repos and preparing Koji to run builds]
1
edit

Navigation menu