Add the beaker.repo file that Red Hat provided for you on the machine(s) that will be running your Scheduler and Lab Controller. The following should be done as root.
Disable other repos to ensure that packages are installed from the beaker repo.
Install the dependencies
$ yum -y install rpm-build python-devel TurboGears python-TurboMail
$ yum -y install mod_wsgi python-decorator python-tgexpandingformwidget python-xmltramp
Install Beaker server.
$ yum install beaker-server
Beaker supports MySQL,MSSQL,Oracle,MaxDB,PostgreSQL, and SQLite. For this tutorial,we will use MySQL. First, make sure MySQL server is installed, and configure the daemon to run at startup.
$ yum install -y mysql-server MySQL-python
$ chkconfig mysqld on
$ service mysqld start
Create a database, and grant access to beaker user. You can put the database on the local machine, or on a remote machine. In the example below, the database is hosted on the local machine.
$ echo "create database beaker;" | mysql
$ echo "grant all on beaker.* to 'beaker'@'localhost' IDENTIFIED BY 'beaker';"| mysql
Now let's initialise our DB with tables. We'll also create an admin account called admin with password testing.
Beaker requires a transactional DB. If using a Database that default to something else (i.e MySQL defaults to MyISAM), either the default table type for the database needs to be changed (to InnoDB in MySQL's case) or the user will have to convert the tables to a transactional DB after running beaker-init.
You can change the default storage engine for mysql by editing the file /etc/my.cnf and adding the following line in the [mysqld] section.
default-storage-engine=INNODB
$ beaker-init -u admin -p testing -e admin_email_address
We are now ready to start the Beaker service. Make sure you have the following line in your /etc/httpd/conf.d/wsgi.conf and that it is uncommented.
LoadModule wsgi_module modules/mod_wsgi.so
First make sure apache is on and configured to run on startup.
$ sudo chkconfig httpd on
$ sudo /sbin/service/httpd start
We need to switch SELinux off.
$ setenforce 0
Due to permission issues, we need to delete the log file before we start Beaker for the first time. Otherwise Beaker will not run properly.
$ sudo rm /var/log/beaker/server*.log
Start Beaker and configure it to run on startup.
$ sudo chkconfig beakerd on
$ sudo /sbin/service beakerd start
The new lab controller also needs a user account. Login at:
http://BeakerServer.example.com/bkr/users/new
Login: Should be the host/FQDN (FQDN is the fully qualified domain of the lab controller).
Display Name: Should be just FQDN.
Email adrress: The email address should be root@FQDN.
Password: If you are not using Kerberos authentication, you will need a password here.
Save the form and we are done with the Inventory side for now.