Kubla:Deployment

From MozillaWiki
Jump to: navigation, search

Kubla » Deployment

Pre-deployment Checklist

  • Server prerequisites
    • php5
    • mysqli
    • mbstring extension (yum install php-mbstring)
    • gd extension (yum install php-gd)
  • Python dependencies:
    • pysvn (no package, have to install manually)
    • MySQLdb (yum install MySQL-python)
    • cse (no package, have to install manually)
    • PHPSerialize

Setting up mozilla.com sites

Setting up Kubla

  • Add LDAP auth to apache. Your vhost should look similar to:
<VirtualHost kubla.mozilla.com:443>
   ServerName kubla.mozilla.com
   ServerAdmin webmaster@kubla.mozilla.com
   DocumentRoot /data/kubla.mozilla.com
   php_value memory_limit 64M
   SSLEngine On
   <Directory /data/kubla.mozilla.com>
       AllowOverride All
       AuthType Basic
       # Not localizable :(
       AuthName "Kubla Login: Use your LDAP username and password"
       AuthBasicProvider ldap
       AuthLDAPBindDN uid=binduser,ou=logins,dc=mozilla
       AuthLDAPBindPassword xxxxxxxxxxxxxxxxxxxxx
       AuthLDAPURL ldap://ldap.mozilla.org/dc=mozilla?mail
       AuthzLDAPAuthoritative Off
       Require valid-user
   </Directory>
</VirtualHost>


  • Setup Kublad
    • cp scripts/kublad.conf-dist scripts/kublad.conf
      • Fill in appropriate values. Add a 'listenPort' value if you need to change the default port (8778)
    • run python scripts/kubald.py --verbose and make sure the daemon stays running (check the log file if it exits). Please think through permissions at this stage and make sure this is running as the appropriate user!
    • Add https://hostname:port/heartbeat to nagios. This will return a 200 normally, if the daemon detects something amiss, it will return a 500.
    • Anytime you start kublad, make sure the trunk and prod paths are completely up to date. kublad can keep them up to date, but it doesn't go back over time and update old files.
  • Setup the SVN commit hook
    • Copy scripts/svn_hooks/kubla-post-commit.py to your SVN hooks/ directory
    • Copy scripts/svn_hooks/kubla-post-commit.conf-dist to your SVN hooks/ directory and remove the -dist.
    • Fill in appropriate values in kubla-post-commit.conf

Post-deployment Checklist

  • (note: this is currently broken due to httpauth) Create a cron job (I'd suggest at least every hour), similar to:
cd /data/kubla.mozilla.com/
/usr/bin/php /data/kubla.mozilla.com/cron.php