wiki:CobblerWebInterface
Last modified 2 years ago Last modified on 11/05/11 21:04:34

Cobbler web interface

Cobbler 0.7.X and later has a highly customizable WebUI which is powered by mod_python. The instructions assume Cobbler 1.0.0 or later.

Cobbler WebUI screenshot

You can:

  • View all of the cobbler objects and the settings
  • Add a system, distro, profile, or system
  • Delete any of the same
  • Run the equivalent of a "cobbler sync"
  • Edit kickstart files (if in /etc/cobbler or /var/lib/cobbler/kickstarts)

You can't (yet):

  • Auto-Import media
  • Auto-Import a rsync mirror of install trees
  • Do a "cobbler reposync" to mirror or update yum content
  • Do a "cobbler validateks" (yet?)

So basically, the WUI is extremely helpful, but for basic bootstrapping you'll need the CLI. And maybe occasionally for rare command sequences.

Who logs in and what they can access is up to you. See CustomizableSecurity if you're very curious, but most people will want the default options -- this will evolve more in future releases.

Basic Setup

  1. You must have installed the cobbler-web package
  1. Your /etc/cobbler/modules.conf should look something like this:
[authentication]
module = authn_configfile

[authorization]
module = authz_allowall
  1. Change your default password!

Cobbler authenticates all Web UI logins through cobblerd, which uses a configurable authentication mechanism. In modules.conf above, you've chosen to use the authn_configfile module, which uses digest files, so you'll want to edit the digest file that module uses to set up your users.

Add remote users by running the following:

htdigest /etc/cobbler/users.digest "Cobbler" $username

You will want to run this for the $username cobbler to replace the default username, or otherwise add a new account and delete the "cobbler" line from the file.

You're using authz_allowall for authorization, which means any user with a username/password has full control over cobbler actions. For more details, see CustomizableSecurity. Most likely those settings are fine for starters.

  1. If this is not a new install, your Apache configuration for Cobbler might not be current.
cp /etc/httpd/conf.d/cobbler.conf.rpmnew /etc/httpd/conf.d/cobbler.conf
  1. Now restart Apache and Cobblerd
/sbin/service cobblerd restart
/sbin/service httpd restart
  1. If using SELinux, you may also need to set the following if you don't have it configured as such already:
setsebool -P httpd_can_network_connect true

This is so that the WebUI can connect with the CobblerXmlrpc to make everything work.

  1. Cobbler 2.2.x has a requirement for mod_wsgi which when installed via EPEL will be disabled by default. If you try to start httpd you will see the following:
    Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration
    

You can enable this module by editing /etc/httpd/conf.d/wsgi.conf and un-commenting the LoadModule wsgi_module modules/mod_wsgi.so line.

  1. It's set up! Now visit the following URL and log in with the password you provided above.
https://bootserver.example.com/cobbler/web
  1. Should you ever need to debug things, see the following log files:
/var/log/httpd/error_log
/var/log/cobbler/cobblerd.log

Rewrite Rule

If you would like to force access to the WebUI through https, you can use the following rewrite rule (for instance, at the bottom of ssl.conf):

### Force SSL only on the WebUI
<VirtualHost *:80>
   <LocationMatch "^/cobbler/web/*">
       RewriteEngine on
       RewriteRule ^(.*) https://%{SERVER_NAME}/%{REQUEST_URI} [R,L]
   </LocationMatch>
</VirtualHost>

You're Done

Play around with the Web UI and you should find it to be very self explanatory. The WebUI contains tooltips and explanations for every field you can edit and is intended to be fairly self explanatory. For things that are not, it contains links to additional documentation -- including the Cobbler manpage documentation in HTML format.

Credits

The Web UI was developed by Al Tobey and Michael DeHaan, with CSS/graphics from Máirín Duffy (who did the main Cobbler home page). We hope you like it. As usual -- for questions, ping et-mgmt-tools@… or stop by #cobbler on irc.freenode.net

Attachments