gaoluinn

scríbhinní ⁊ deocháin do chuallucht na Gaelainne

Cáiteach: A Simple Deployment Framework for Centrally Managing Ubuntu Workstation Localisation on Small Networks, with Emphasis on Irish, Scottish Gaelic, Manx Gaelic, Welsh, Cornish and Breton

Author: Mícheál Ó Lochlainn, Áras Shorcha Ní Ghuairim, Acadamh na hOllscolaíochta Gaeilge, Ollscoil na hÉireann, Gaillimh.

Published: 4th February 2015.

Updated: 17th April 2015.

Keywords

Ubuntu, Linux, Irish, Gaelic, Scottish, Manx, Welsh, Cornish, Breton, Celtic, localisation, globalisation, translation, internationalisation, language, network, management.

Introduction

This article introduces the Cáiteach Ubuntu GNU/Linux localisation management framework. It covers enough of the bare bones so that anyone with reasonable technical skills should be able to get it working and play with it. With that said, I've tried to make it as accessible to non-techies as I can.

(Cáiteach is pronounced to rhyme, roughly, with 'cart hook' as spoken in proper, posh, respectable RP English, but with the 't' like the one in 'tune' and ending in a nice un-voiced velar fricative. There are one or two teach-yourself-how-to-learn-to-speak-Irish/Gaelic-phrase books that tell you to pronounce the Irish 'ch' like it was an English 'k'. Ignore their fundamental locution.)

The Cáiteach framework, which is a work in progress, is a light-touch tool for automating the localisation of multiple Ubuntu workstations from a central server on small networks — between 5 and 250 machines, we'll say — so that you don't have to walk around installing rakes of language packs on them one at a time, as if it was 1987. Cáiteach supports all the (Insular) Celtic languages and locales. It lets you install one or more of the available localisations, then it activates whichever one you selected to be the main user interface language and sets the locale as appropriate. (Installing a user interface localisation, switching it on and then telling the machine what locale to use are three different things.) Cáiteach could easily be adapted to support any other language or group of languages that Ubuntu has localisations for.

Cáiteach is a very simple tool. It doesn't re-define the fundamental infrastructure of pure mathematics, if you follow me, so I'm reluctant to even use terms like 'framework', 'client' and 'server'. But with that said, it is organised into a rigid, defined, extensible structure and it does implement client/server functionality so I can't really see a good reason to avoid the vocabularies.

None of Ubuntu's Celtic language localisations is complete yet; so Cáiteach fills the gaps, following standard Ubuntu practice, with one or more fallbacks. For the Celtic languages these are English, French and — because Cáiteach supports the Welsh-speaking communities of Argentina, just like it does the L1 speech communities of Scottish Gaelic in Canada — Spanish.

Although it could be used to localise workstations that are already in use, Cáiteach is really designed to be deployed on newly-commissioned machines, right from the start. It'll probably work away fine if it is installed on existing production machines but I have no testing at all done on this. It depends on how you have them set up.

So how does it work? You set the Cáiteach server up, once, on any Samba/CIFS or SMB server you have spare (that is, any old server that makes data shares available over a network in the form of Windows-type folders) simply by copying a couple of files into a network share. Then you run the Cáiteach client installer on all the Ubuntu machines you want to localise. Between them, the client and the server install the user interface localisations and configure the locales. When that's done, Cáiteach will shut up and never bother you again, although it can be used to do more 'light-touch' installations and configurations, with most of the systems administrator's work being done just the once, on the server itself.

Of course, Samba/CIFS/SMB isn't really the boy to handle these sorts of conversations between clients and servers, at least not on its own. It does what Cáiteach needs it to do but it is not secure enough. This is at the top of the to-do list.

One thing: Ubuntu's very own website (accessed on 20th January 2015) tells us that there's precious little documentation covering locales, either in books or on the web. Having put down dozens of hours working on the automated, programatic control of Ubuntu's user interface (that is, not clicketty-clicking with the mouse and letting the pretty pictures do the job), and I still banging my head against the wall looking for some of the answers, and I can definitely say that they're right. So I do know that there are gaps in Cáiteach's functionality.

Deploy Cáiteach

System requirements

I used Ubuntu Server 14.04 LTS in testing. As for the workstations, there's every chance that Cáiteach will work fine on older versions of Ubuntu Desktop but I have no testing done on anything before 14.04.

Download Cáiteach

Set up the Cáiteach server

Make a note of the server's IP address. You'll need it when you install the clients.

Create a network share called riarachan-larnaithe on the server. This, and everything in it, should be world-readable but nothing should be writable.

The directory freastalaí, that you extracted from the tar.gz or zip archive, contains three files:

Copy these into the riarachan-larnaithe share. And that's it; you have the server set up.

No competent sys admin needs to be told this but it is worth pointing out for the benefit of any non-techies who might be reading. Computer and network security aren't about one-size-fits-all solutions to a single problem. They're more about strong and weak links in wholemeal spaghetti chains. One of the most important of these links is servers that manage other machines; Windows Domain Controllers, for example, or Mac OS X Open Directory Servers. For all its simplicity, Cáiteach has the same kind of you-will-obey-me control: any machine slaved to a Cáiteach server will keep saying 'yes, master' no matter that server tells it to do.

There are rakes of ways — and none of them having anying to do with Cáiteach — that someone who has a laugh that starts with an alveolar nasal might crack a Samba server. If they do, and they notice that Cáiteach's there and they work out what it does, then they'll be able to do what they like with every single workstation on the network that has the Cáiteach client installed on it.

The point is that, like every server, the Samba server where Cáiteach lives is a potential attack front. And no more than any other server it should be constantly patched, updated, watched and cared for. And kept in a locked, secure room. And backed-up regularly. And left with all the users logged out, especially root. And protected by long, complex passwords. That you don't write down with a felt-tip pen, on a post-it note that you stick to the side of the monitor.

Install the Cáiteach client

Do the following for each workstation that you want to install Cáiteach on.

The directory cliant, that you extracted from the tar.gz or zip archive, contains one file:

This is the Cáiteach client installer file. Copy it to the workstation, and you logged into a sudo-enabled account. (It is up to yourself where to save the file. The desktop'll be fine.)

This file is just a Bash script, so open up a terminal, navigate to wherever you saved the Cáiteach installer and fire in:


sudo bash "Suitáil Cáiteach (cliant)"

The first thing the installer does is ask you which of the Celtic languages you want it to talk to you in during installation. This doesn't have to be the same as the language that you're going to install.

(A good, but diminishing, share of the translations used by Cáiteach during installation, especially the one- and two-word jobs, were done by myself and my friends the dictionaries. Irish is the only Celtic language I have and I haven't much access to speakers of the other ones so some of these translations are incomplete for the moment and, as with Ubuntu Linux itself, they fall back on (British) English and (French) French to fill the gaps. Dictionary-based translation by non-speakers often ends up like someone who's never driven anything bigger than a Hillman Imp taking a six-axle artic for a spin so yes I know; there might be a few rough edges. I'm filing them down bit by bit. Although out of respect for our Celtic cousins, I did not resort to a certain famously unreliable on-line translation gadget that's loved by thick and/or lazy people who need to produce written material in some minority language but who can't be bothered to actually write it in that language even though they're (supposed to be) able to speak it, or to find a competent speaker to help them if they can't.

Update (13th February 2015): As of version 0.25.1 beta, the Cáiteach client installer has a full Manx Gaelic translation. Thanks and kudos to Chris Sheard, Yn Chyndaader Gaelgagh, and to Adrian Cain, Yn Ghreinneyer, both of Culture Vainnin. Ta mee kianglt booisal daue.

Update (20th April 2015): And as of 0.25.2 beta, it has a full Welsh translation also. Thanks and kudos to Rhos Prys. Thanks also to Tegau Andrews and Delyth Prys. All of Uned Technolegau Iaith, Canolfan Bedwyr, Prifysgol Bangor. Diolch yn fawr iawn.

Now. Then the installer checks to see if Cáiteach is after being installed on the workstation already. If it is, the installer will stand on the brakes and give you the option to either quit or to wipe out the existing installation and install again.

Then it will ask you for the bare IP address of the server, with no leading or trailing slashes.

After that, it will ask you to select the primary user interface language and locale that you want to install to the workstation. The options are:

I made gd_CA and cy_AR up myself since I needed codes for Canadian Scottish Gaelic and Patagonian Welsh and they don't seem to exist 'officially'. The (en) and (fr) are just hints for the user and haven't a bit to do with any formal notation.

(It is possible that some people might find one or two of these locale codes objectionable or even diabolically offensive. Please don't blame me for the ISO 639‑1_ISO 3166‑1 notational standard. If you want to understand the reasoning, see this overview of ISO notation.)

Anyway; chose a language / locale and then leave the workstations alone for a while.

Ready for road

Start the workstations up again. They should be all up to date and localised, with their user interfaces in the language you specified and their locales set to your territory. If users want to change the UI language for their own desktops they can do it manually in System Settings. (I'll add functionality to Cáiteach out in the time to manage this centrally, and to provide lockdown also.)

As things stand now, Cáiteach won't do anything else unless you add new machines to your network and install the client on them. So if all you want is a one-off localisation you can just use it the once and when it is finished it shouldn't bother you again. It definitely won't hog resources. But there is scope to do more with it.

The creeping unknown

In the world of technology, there's a thing called feature creep and it is A Very Bad Thing Altogether. When I started work on Cáiteach, I only wanted it to do one thing: install and activate the Irish language user interface localisation of freshly-installed Ubuntu workstations that were already set to the Irish locale.

Not wanting to re-invent the wheel, it occured to me that I should start with a tool I already had for localising individual machines. This is a cosmopolitan affair that installs all the Celtic languages so it seemed as well to keep that functionality in Cáiteach so as to make it useful in other Celtic countries. So that was the first feature crept.

Then it occured to me that I should give the sys admin the option of either installing the whole Pan-Celtic Extravaganza or just the localisations for their own languages.

Then it occured to me that since all the Celtic language localisations are incomplete to one extent or another, and depend on a fallback language to fill in the gaps, I'd have to make sure the full British English localisation was installed to service Irish, Scottish Gaelic, Manx Gaelic, Welsh and Cornish. (Even British English is a localisation, and you have to actively install if you have boots and bonnets rather than hoods and trunks. There doesn't seem to be any Irish English localisation at all or I'd have installed that too.)

Then it occured to me that I'd have to make sure the full French localisation was available to service Breton. So that was another creep to make sure that Cáiteach would just work anywhere in the Celtic world...

... except it wouldn't, entirely, because it occured to me that I'd have to make sure the (Latin American) Spanish localisation was installed as the fallback for Patagonian Welsh. Then there's Canadian Scottish Gaelic, which is a bit more complicated because the traditional L1 Gaelic language communities in that country seem to be located in broader areas where French dominates English but I haven't had the time yet to find out for sure. So rather than making blind anglophonic, mono-cultural assumptions I added the option to fallback on either English or French. (And yes, it might be argued that L1 Scottish Gaelic in Canada is nearly extinct and that few or none of its remaining speakers have true first language fluency and how many of them run networks of Ubuntu machines anyway so what's the point?… There is a point of course, but anyone who needs it explained to them is never going to understand it.)

Then it occured to me that I intended to use Cáiteach to localise workstations when they're first commissioned. Unless they have a very, very good reason not to, the first thing any competent techie does after he or she installs an operating system is to update it. For the sake of security updates alone, it made sense to have Cáiteach update the workstations before it did anything else.

That was when it occured to me that Cáiteach was after creeping her way into becoming a framework, even if only a very basic one, since she was now running a short but ordered series of passes, each of which did one strictly defined job. At the moment, 'short' means 'two' but having gone that far it was as well to tweak the design to make it easy to drop in more passes, for either installation or configuration, as and when they're needed. The possibilities wouldn't be endless but there are still plenty of them.

Not a finished prouduct

At she stands now, Cáiteach has some simple but useful functionality and didn't do anything alarming during testing. I'm happy to deploy some of my own Ubuntu machines with it, on my own networks, but I wouldn't use it in production yet. It is more a first working version of a work in progress than a finished product. Call it a maturing beta.

Take Cáiteach for a test drive

If you decide to play with Cáiteach for yourself, there's one thing to watch out for. Some species of laptop, maybe also desktop, don't get along at all with shutdown -r; under Ubuntu at least. So at the end of each pass they just sit there and hang when Cáiteach tells them to restart themselves. If that happens just wait a few seconds, 'till you're sure they're after freezing, and switch them off and on manually. You could try searching something like 'ubuntu hangs on reboot', 'ubuntu hangs on restart' or 'ubuntu hangs on shutdown -r' but this seems to be one of those simple problems that no one has a straight solution for. I've had some luck with these suggestions but milage varies an awful lot from machine to machine.

The Cáiteach to-do list

And finally: What's the point? Aren't there plenty of real Linux management tools around already?

There are of course, and if it is a serious, production, enterprise-grade management framework that you need then you should be looking at something like Puppet or Monsieur le Chef, or at Ubuntu's own Landscape because, to be blunt, Cáiteach will be as much use to you as ten fags and no light. None of these were designed on a clean sheet of paper specifically to support the Celtic languages though. And they can cost a few bob: have a look at Landscape's pricing and at Puppet's. (Pages accessed on 22nd January 2015. I looked for Chef's, out of fairness, but it failed me find it.) And even if some of them are offered in free, reduced-feature or limited-seat versions they're still like a 103-piece orchestra with a mezzo-soprano, two blaster beams and Keith Moon guesting on drums.

Sometimes all you want is one man on a box, and he playing a simple hornpipe.