Sciology = Science + Technology

Religious Programming (Eclipse; AJAX; SOA; Mashups; XP + SCRUM).

Archive for April, 2008

MoinMoin setup in easy steps

Posted by sureshkrishna on April 25, 2008

Wikis are a nice way to collaborate in an organizational environment. There are several wikis available in the market and thanks to the wikimatrix, which makes it easy to decide. Recently i did an exercise to install and upgrade the MoinMoin wiki. Listed are ALL the important steps that one can use to SUCCESSFULLY install and upgrade a wiki.

The infrastructure is a pretty simple. Windows XP, Apache Server, Intranet Environment, Latest Python and MoinMoin. I hope the following steps are very simple and enables everyone installing on Win XP and Apache to have a smooth setup process.

Note : This is not meant to have comprehensive setup instructions. For full help and installation instructions please look into the http://www.moinmo.in

Pre-Requisites

  • Download latest MoinMoin [http://www.moinmo.in/MoinMoinDownload]
  • Download latest UnZip/Zip SW [http://www.rarlab.com/download.htm]
  • Download latest Python [http://www.python.org]
  • Download latest EditPlus [http://www.editplus.com]
  • Download latest Apache Server [http://httpd.apache.org/download.cgi]

Example Paths

  • Python Installation : C:\WikiSetup\Python252
  • MoinMoin Installation : C:\WikiSetup\moin-1.6.3
  • Utilities Instance : C:\WikiSetup\MyCompanyMoinMoin
  • MyWiki : C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki

Install Python

  • Install Python
  • Set the system path to Python.exe. This is not necessary, but helps you to execute python from everywhere.
  • Goto the cmd and type python. Python starts and shown the version.
    • python -V
    • Exit this by Ctrl+Z and then Enter key.

Install Apache Server

  • Make sure after the installation the server is started. This can be tested by launching the IE/FF/SF/.. and goto URL http://localhost. The browser should say “It Works!”.
  • If needed the server port can be changed to something that you like and safe. e.g. 1111, 2222 or 9999

Install MoinMoin

  • cd C:\WikiSetup\moin-1.6.3
  • python setup.py –quiet install –prefix=”C:\WikiSetup\MyCompanyMoinMoin” –record=install.log
  • Look for any errors in <C:\WikiSetup\moin-1.6.3\install.log>. If this has errors, go for a coffee and try again.
  • Wether the installation is successful or not can be checked as follows. On the command prompt type “python” and then “import MoinMoin”.
  • This should not produce any messages and it just comes out.
    • C:\WikiSetup\moin-1.6.3>python
    • Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
    • Type “help”, “copyright”, “credits” or “license” for more information.
    • >>> import MoinMoin
    • >>>
  • Note : It is not necessary to change ANY of the configuration or files from the original MoinMoin installation <C:\WikiSetup\moin-1.6.3>.
  • Change the file <C:\WikiSetup\MyCompanyMoinMoin\share\moin\server\moin.cgi> to insert the MoinMoin library path.
    • #!C:\WikiSetup\Python252\python.exe
  • Path of the directory where wikiconfig.py is located.
    • # YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
    • # sys.path.insert(0, ‘/path/to/wikiconfig’)
    • sys.path.insert(0, r’C:/WikiSetup/MyCompanyMoinMoin/share/moin/config’);
    • # Path to MoinMoin package, needed if you installed with –prefix=PREFIX
    • # or if you did not use setup.py.
    • ## sys.path.insert(0, ‘PREFIX/lib/python2.3/site-packages’)
    • sys.path.insert(0, r’C:/WikiSetup/MyCompanyMoinMoin/Lib/site-packages’)

Create the myCompanyWiki Instance

  • Create the directory “myCompanyWiki” under C:\WikiSetup\MyCompanyMoinMoin
    • cd C:\WikiSetup\MyCompanyMoinMoin\share\moin
    • xcopy data C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki\data /E
    • xcopy underlay C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki\underlay /E
    • copy config\*.* C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki\*.*
    • copy server\*.* C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki\*.*
  • Configuring wikiconfig.py
    • sitename = u’My Company Wiki’
    • logo_string = u’<img src=”/wiki/common/mycompany.png” alt=”My Company Logo”>’
    • page_front_page = u”FrontPage”
    • data_dir = ‘C:/WikiSetup/MyCompanyMoinMoin/myCompanyWiki/data’
    • data_underlay_dir = ‘C:/WikiSetup/MyCompanyMoinMoin/myCompanyWiki/underlay’
    • url_prefix_static = ‘/wiki’
    • allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage', ]
    • # If you will not be running a Wiki farm (if you’re not sure what this means, then you probably won’t be), make sure to delete the farmconfig.py file from the C:\Moin\mywiki directory, or else moin.cgi will most likely give off various errors (including one about not being able to find a configuration file) and will ultimately fail to start up properly
  • Configuring moin.cgi. Change the moin.cgi to contain the following lines of script.
    • #!C:\WikiSetup\Python252\python.exe
    • sys.path.insert(0, r’C:/WikiSetup/MyCompanyMoinMoin/myCompanyWiki’);
    • sys.path.insert(0, r’C:/WikiSetup/MyCompanyMoinMoin/Lib/site-packages’)
  • Configuring Apache httpd.conf. Add exactly as shown below. Nothing more nothing less.
    • Its common to have the 80 port already ruinning. Or in some of the corporates this is taken by the Anti-Virus programs. So i would suggest to have your own port for Wiki.
    • Listen xxx.xxx.xxx.xxx:1234
    • The Alias is used to point all the static content like, images, css etc…
    • Alias /wiki/ “C:/WikiSetup/MyCompanyMoinMoin/share/moin/htdocs/”
    • Script Alias points to the newly created Wiki Instance. This kicks up the entire Wiki as i understand.
    • ScriptAlias /myCompanyWiki “C:/WikiSetup/MyCompanyMoinMoin/myCompanyWiki/moin.cgi”
    • Following directories need to accessible by the server
    • <Directory “C:/WikiSetup/MyCompanyMoinMoin/share/moin/htdocs/”>
      • AllowOverride None
      • Options None
      • Order allow,deny
      • Allow from all
    • </Directory>
    • <Directory “C:/WikiSetup/MyCompanyMoinMoin/myCompanyWiki/”>
      • AllowOverride None
      • Options None
      • Order allow,deny
      • Allow from all
    • </Directory>
  • Add following css content in C:\WikiSetup\MyCompanyMoinMoin\share\moin\htdocs\modern\css. This might help you to have some kind of good looking headers. Of course you can change this style if you dont like.
    • h1, h2, h3, h4, h5, h6 {
      • background-color:#E7E7E7;
      • border-style:none;
      • border-width:thin;
      • font-family:sans-serif;
      • margin-bottom:8pt;
      • margin-top:2pt;
      • font-size:150%;
      • padding-left:0.4%;
      • width:99.6%;
    • }

Check Wiki Instance

  • start/restart the apache server with the desired port
  • enter the url http://xxx.xxx.xxx.xxx:1234/myCompanyWiki This should show the startpage of the Wiki

Data Migraiton :

Data migration might be necessary, if you have existing wiki and you would want to enhance the wiki engine and data. Sometimes this could be the most painful process in the entire wiki setup (at least for me).

  • # Before doing the migration, please check if the MoinMoin module is available to command prompt.
  • # Copy the data directory from the existing wiki installation.
  • ‘your\old\MoinMoin\Wiki\data’ to C:\WikiSetup\MyCompanyMoinMoin\Lib\site-packages\MoinMoin\script\old\migration
  • # And start running all the scripts. All means ALL. If you encounter any errors make sure that you correct all of them.
  • # Migrate Post 5.3 Data :
  • C:\WikiSetup\MyCompanyMoinMoin\Lib\site-packages\MoinMoin\script\moin.py –config-dir=C:\WikiSetup\MyCompanyMoinMoin\myCompanyWiki –wiki-url=http://xxx.xxx.xxx.xxx:1234/myCompanyWiki/ migration data

HTML Dump

Many a times we want to export some of the pages or all of the wiki pages as documentation to the developers, sales or to the customers. This HTML Dump works handy in these cases. This feature is a fresh breath in life (i was using MoinMoin 1.2.1 before i migrated).

  • C:\WikiSetup\MyCompanyMoinMoin\Lib\site-packages\MoinMoin\script\moin.py –config-dir=C:\tmp\MOINWIKI\share\moin\matrix –wiki-url=http://xxx.xxx.xxx.xxx:1234/myCompanyWiki/ export dump –target-dir=C:\tmp\myWikiDataDump
  • Once the Dump is done. Copy the *.* from “C:/WikiSetup/MyCompanyMoinMoin/share/moin/htdocs” to “C:\tmp\myWikiDataDump“. This would apply all the “css” to the htmls.

User Access Control

The Wiki i setup, works in an intranet. I would like to have all the users to have the read, write, revert and delete access. Only the SuperUser has the admin capability. So my configuration is as follows.

  • superuser = [u"sureshkrishna", ]
  • acl_rights_before = u”sureshkrishna:read,write,delete,revert,admin”
  • acl_rights_default = u”All:read,write,delete,revert”

References:

  • Wiki For you : http://sureshkrishna.wordpress.com/2008/03/04/wikis-for-your-organization
  • MoinMoin Download : http://www.moinmo.in/MoinMoinDownload
  • MoinMoin Installation : http://www.moinmo.in/HelpOnInstalling
  • MoinMoin Configuration : http://www.moinmo.in/HelpOnConfiguration
  • MoinMoin Administration : http://www.moinmo.in/HelpOnAdministration

Posted in Uncategorized | Tagged: , , , , , | No Comments »

Why should you Jazz ?

Posted by sureshkrishna on April 4, 2008

Jazz is a technology platform from IBM. Its based on the client-server technology and manages the source management, build tools and promotes the team collaboration. Once of the great aspect of this platform is that its built with Team Collaboration in mind. Well… this makes a lot of difference in the corporate and product development environment.

Not to get confused, IBM Rational Team Concert is the first product based on the Jazz Platform. Team Concert is based on Eclipse and related technologies. By basing the Team Concert on Eclipse proves “Eclipse as a Platform“. Team Concert is available for free to download and play with. Not sure if Rational would want to make money in future and also how the licensing mechanism works for the Jazz and Team Concert for the enterprises.

I am truly impressed with the workshop that me and Peter Kirschner (a colleagues of mine from Robert Bosch, Germany) attended at EclipseCon2008. Starting with the presentation of Erich Gamma, Jean-Michel, Kai-Uwe Maetzel and John Wiegand gave a very good overview of the Platform and ideas behind it. Soon after EclipseCon, i downloaded and started playing with it. My colleagues at Bosch says he gets response in matter of minutes. But i have a different opinion. Perhaps i am JUST a developer.

All the corporates that i worked for have similar problems. Especially i worked for the tool development departments and you can see the same patterns every where. We have Process, Methods and Tools departments and they always were three DIFFERENT departments. Developers always wanted to have Simple Processes, Unified Methods and Integrated Tools. But this never happens. It is good to have different people to concentrate on different problems, but at the same time they need to collaborate to solve these problems. I am sure, for many of the readers the bell rings… :)

Software development needs different facets to fit in a co-ordinated way. Requirements Management, Design, Project Management, Source Management, Issue Management, Process Management, Build Tools and Collaboration are some of the aspects of the software development. The biggest challenge for any corporate is to have an integrated platform where all the processes and tools come together.

Process Integration

From the organization point of view, its necessary to integrate the Process, Methods and Tools. However till now it was not possible to have several methods and tools integrated into a single environment. Its not because of technology, but because we need a framework/platform that supports this kind of integration.

After attending the Jazz workshop and once i played with Jazz a little bit, this platform seems to be a PLAUSIBLE solution for some of the unsolved problems in software development. It has an easy to setup a Team Repository, can assign users to this repository with the security permissions, etc… For me it looks like they picked up best of the breed features into the Jazz’s Source Control system. Some of the similar concepts like changelists from Perforce, powerful branching, merging and multi-site functionality from Clearcase and what i love is the concept of branching, merging are all transparent to the developer. You need to concentrate on the REAL work. Like development, release trains, fixing bugs, etc… and not how to branch for a new release version and how to merge into the main branch ….. all these tasks are managed (apparently) by Jazz platform.

Team collaboration is amazing. I really liked the example conversation to setup a project, that Erich presented at the EclipseCon2008.  The problem is universal… find the projects you want to checkout, find the repository path, see if you have permission to the repository, find if you can get specified projects, how to build the projects, which are the dependent modules, which jars should i build before i do anything……..the list is endless. How cool would it be if all the above tasks are taken by your development environment. Of course, we have been doing software development and system development all the while by spending time, communication effort and finally frustration when nothing works.

As a project manager, its is very logical that i might not use heavy development tools. So you have the web interface to get a complete overview and detailed artifacts about the project. The web interface is sophisticated with the AJAX functionality and as i have seen, its quite responsive. Different charts, reports on the individual team level and project level can be obtained.

The entire work flow at the development time can be controlled with the help of the process templates. We want to eliminate all possible errors in the initial stages so that verification and review process can be reduced. A developer might not keep a comment before he commits a piece of code, code can not be checked in unless it is reviewed by senior developer, etc… In my previous experiences, we managed all these rules with the help of perl / shell scripts at the source control side. This is a nice capability of the Jazz to be able to integrate the Process Management in to the environment.

Jazz ??

The above picture probably is what i believe that Jazz could do. I really see this as a potential enterprise infrastructure for software development. I am hoping that this project would bring out a lot of happy smiles though i am little skeptical about the licensing mechanism.

Many of you would have had similar problems i mentioned and i hope you might find Jazz to be a potential solution. I would love to hear interesting points from you. By now, i hope you know “Why you should Jazz ?”.

Posted in Uncategorized | Tagged: , , , | 1 Comment »