Deployment

From Kiwix
Revision as of 03:43, 21 January 2015 by Macofe (talk | contribs) (typos found with languagetool.org)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Deployment means the installation of Kiwix by one or more people on many computers. This can be kiwix or kiwix-serve, computers may have the same or different operating systems ; hardware can also be non-homogenous. But within a deployment the content deployed is the same, this is more or less one version of Kiwix with the same predefined content.

Introduction

Currently, a lot of things are already possible and that is why we have already successful deployments. The problem is that:

  1. Not trivial to do
  2. Not everything is possible

If you want to deploy Kiwix, you need to prepare a "package" (or a way to get) :

  • Kiwix the software (for one or many HW & OSes)
  • Content, so the ZIM files
  • The full text search index
  • The library which links kiwix, content and index together.
  • Optionally a solution to install that (Windows installer, scripts, ...)

To copy this things to each computers the best ways are:

  • LAN (optionally wireless)
  • USB storage (flash or HD)
  • DVD

File should be copied and eventually installed.

Status

Please read following pages to be familiar with the solution we already have to prepare such things:

Remark: Currently Kiwix is not able anymore to be spread as Windows portable version with content. During the library rewriting the availability to get library file with ZIM and search index relative paths were removed. This is a regression which need to be fixed.

Details

Kiwix Software

Kiwix is a software which does not need an install process: you may just copy the mandatory files somewhere and run it. Installation does mainly create a few icons, move the software in a "standard" place on the HD and propose also an easy way to remove it afterwards.

But we do not have static version of Kiwix for GNU/Linux, so this is not possible here to have a portable version because either to compile the software or to get the perfect package for your distribution. So we need to push the packaging in well used distributions and prepare static version of the most common architectures.

MacOS version also works as portable. One would need to create a package (DMG) with content & index for that to be completely portable though.

On Windows, it works partially. The problems are a few critical bugs and the fact that we do not have a version for x86_64.

Content

Content, as a format, is really portable and we don't see a problem on this side.

The problem is more the limitations of the file systems, especially FAT32 (mainly used for USB keys) which does not allow file over 4GB. Kiwix has no problem to deal with splited files which should simply follow a specific norm in their naming. File can not be splited with Kiwix itself, the user need an external tool like "cut" on linux.

Search index

Search index are perfectly portable from one OS to the other and from one file-systems to an other (files are still not to big to be a problem on FAT32). The only one issue I see is that often people complains about name of the index which are not really user-friendly (it is the ZIM file id + ".index") so they do not really know for which content is an index.

Library

The library is the core element to know where is what? The library knows everything about content, indexes. Without the library Kiwix has no idea about all the data he can deal with.

Kiwix is able to deal with multiple files, at the start tries following:

  • It tries to list and open in readonly mode library files in ../data/library (on linux ../../share/kiwix/data/library). This is where to store the library if you want to make a portable Kiwix or on a installed version. So information about these content can not be changed by the user.
  • and it opens the library.xml in the user profile in read/write mode.

The library.xml file can be written by Kiwix itself (but this is transparent for the user) or by a tool called kiwix-manage which was created recently. The problem is that kiwix-manage is still as a stub and works to setup online feed library.xml but not more. kiwix-manage also works only on Windows. kiwix-manage is also a command line tool, so not really trivial to use.

Most of the problem with the library file, is that values need to be modified to match a portable usage. The main modifications to do are changing the paths (for content and ZIM file) and also make them relative.

Installer

As Kiwix runs well (at least should) as portable version, installers are not mandatory. But If you want to provide all users on a computer, a well integrated software solution and maybe also benefit von the system upgrades, managments tools, etc... This is better to install it.

For Windows, we have an installer which is not bad. This is a binary done with the help of NSIS. This binary is able to install Kiwix and custom content. The installer is like a sophisticated copier, it just copy files from specific directories where the software and the content are to the target directory. The installer works on a portable version of Kiwix and you simply need to but the content you want in the "data" directory and this will be installed. To make it short, you do not need to rebuild an installer for each type of content.

On Linux, the standard way to install a software is the package and I think this should not be different, that means that I don't think this would be a good idea to make a install script for a portable static compiled version of Kiwix. So, here the challenge is to start including Kiwix in distro's package repositories. That also means that the question is still open for the content: how to install content on Linux? Maybe a script called kiwix-install-content would be useful?

On Mac, We are following the platform guidelines: a portable app that you can drag anywhere on the disk.

Distribution approaches

They are many possible way to distribute file:

  • Everything in one directory (this is what already exists) and this can be copied everywhere. This is the more simple but works only for Win
  • Packages plus simple scripts for Linux. We could also think about packages downloading an installing content over a LAN base on P2P.

But for almost all of these approaches, the challenge is to build the "base package":

  • What if do not have internet and need component which are not local?
  • How to do that, HOWTO, GUI to make that?
  • A lot of people want to make portable what they have on their computer. Is that the good way of doing?
  • Should we provide a WEB GUI somewhere online able to build such a package and propose it to download?

Future

I think there are two ways:

  • Simple: Prepare a good documentation and do a little bit software development so that computer friendly people get a change to make deployment (~ 40 hours of dev and 20 hours of doc)
  • Sophisticated: Make a clickodrom extension for Kiwix that everyone may use... No idea how to do that exactly and how much time it would cost.

In both cases, an action plan *must* be prepared to get an exact list of what need to be done.

Current bugs & features requests

  • (NORMAL) 64 bits version of Kiwix for Windows
  • (NORMAL) People need an easy solution to cut ZIM files to make them portable
  • (NORMAL) Add Kiwix to Debian package repository
  • (NORMAL) Add Kiwix to Fedora package repository
  • (MINOR) index with user friendly name

See also