Tags:
create new tag
, view all tags

Automatic TWiki Deployment

2017-12-06 - 20:11:36 by HaraldJoerg in Deployment
This year I haven't done any TWiki development, but I've done a bit of testing, bug reporting/hunting/fixing, and taking care of support questions. While doing that, quite often I would have liked to create a fresh TWiki installation with a defined set of properties. These properties are not only what's written in TWiki's LocalSite.cfg, but also platform properties: On which operating system and under which Perl version TWiki is running, which versions of which CPAN modules are installed, which Apache version and which Apache modules are in place, and so on.

My SVN checkout area isn't really fit for this. The area is all, but not a "fresh install". At any time, I might find some random plugins pseudo-installed, some random site settings, and some random test users and topics, depending on what was on my mind the previous week. Also, I have every Debian package installed that I have considered interesting at some point in time, many not even remotely related to TWiki. Running unit tests on this machine is just fine, but for integration and application tests this machine is too far away from any reasonable production setup. I have no intention to uninstall stuff or to change the Debian version just to run some tests, or even to change the distribution. And finally, it's usually "SVN HEAD", and not 6.0.2 as released.

Manually creating yet another virtual machine to set up a fully functional TWiki server following TWiki:TWiki.TWikiInstallationGuide takes too much time. But wait: Tasks like these can be automated with Ansible and Vagrant: Ansible takes care for the configuration stuff, and Vagrant for the creation of virtual machines.

Eventually, I got the first things working. Here's my setup:

  • My development and "control" machine is running the "stable" release of Debian.
  • I use Oracle Virtualbox for running test machines.

So today, if I issue the command ansible-playbook -i inventory twiki_cgi.yml -v, I can lean back and wait... for about 90 seconds, and then TWiki 6.0.2 is up and running, on a virtual machine that didn't even exist before. So far, I can chose between Debian Jessie, Debian Stretch and Ubuntu Xenial, they come with the Perl versions 5.20, 5.24, and 5.22, respectively.

As time permits, I plan to:

  • Separate my "local" parameters so that the rest of the stuff can be shared (to somewhere Codev, probably). This is almost done.
  • Write, or collect, some documentation about the software requirements and configuration items. Ansible and Vagrant both come with a learning curve, but only a few basics are required if you just want to to run the stuff.
  • Create automated tests to run against these machines with a web client (sort of "application tests" or "acceptance tests").
  • Add "patch sets" to these machines
  • Add the feature to install arbitrary sets of extensions
  • Run performance comparisons between different web servers (as a start: Apache/mod_cgid, Apache/mod_perl, starman/PSGI)
  • Perhaps add more Linux distributions to the set, for example those which ship "incomplete" Perl (like the Red Hat family)

Phew. This might indeed take some time smile

Comments

.

Topic revision: r1 - 2017-12-06 - HaraldJoerg
 

Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Help
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.