Redmine…field

Tuesday, October 20th, 2009

Redmine then.

So what’s that then i hear you cry…ok well maybe not but you’re probably still interested. Redmine is an alternative project planning, issue tracking, wiki type tool to Trac. We’ve been using Trac in the office for a few years now, i installed v0.10 about two years ago. Up until now, that’s been fine, it’s offered everything we wanted. (See http://trac.edgewall.org/)

But we’ve outgrown it, as with many things, so we’ve turned to Redmine (http://www.redmine.org/) which has many better features, such as:

  • Multi-project support
  • Cross project tickets
  • Ticket dependancy and relations
  • SVN/Wiki BLAME (puts the name of the person who edited of each line of code/wiki next to it)
  • Built in LDAP auth support – with field configuration (ie configure that uid=username etc, so it will work with AD and native LDAP)
  • Time management and planning – including worked hours, gantt chart and more.
  • Lots of good plugins – including, graphing, costing (budgets), ticket reminder (Whiner – emails a reminder to a user if they haven’t worked on an assigned ticket in a set period), code review (annotation) and more

So that’s Redmine, what about the installation. To evaluate the system i set up a basic ESXi 4.0 VM running CentOS 5.3. It was installed mostly from this guide http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/

This went mostly smoothly, i skipped the steps of setting up SVN (but did this later on). It wasn’t all plain sailing though there were a few issues -

MySQL Sock

(unable to find /tmp/mysql.sock) To solve this simply edit redmine/config/database.yml to inset the new socket location. You need to edit this file anyway, but that’s covered by the install guide. Here’s the final config (username and password obscured for obvious reasons)

production:
 adapter: mysql
 database: redmine
 host: localhost
 username: ourdbuser
 password: ourdbpassword
 encoding: utf8
 socket: /var/lib/mysql/mysql.sock

For our system (CentOS) the location of the MySQL socket was at /var/lib/mysql/mysql.sock.

Email configuration, is in email.yml also in the config directory

production:
 delivery_method: :smtp
 smtp_settings:
 address: ourmailserver.internaldomain
 port: 25
 domain: ourdomain.co.uk
#    authentication: :none
#    user_name: daemonuser
#    password: daemonpassword

That’s for a mailserver which doesn’t require authentication, this will be the case for most people. If you do need it you can specify plain and secure as authentication types, as well as uncommenting those 3 lines obviously.

Trac Migration:

Simples!? Well, you’d think so. Firstly i had issues installing sqlite2 on the system alongside sqlite3 which apparently they will both work side-by side. Anyway, our new CentOS system was stuck with sqlite3, but our Trac DB is in sqlite (2) format on NetBSD. This means that i was unable to direclty import the sqlite2 database into Redmine as i couldn’t compile the sqlite2 ruby gem.

Trac as of v0.11 started using sqlite3 so provided upgrade instructions, which would have been fine on their own (see http://trac.edgewall.org/wiki/0.10/TracUpgrade) (Command

sqlite trac2.db .dump | sqlite3 trac.db

What i did here was instead redirect the dump to a file which i copied onto the new Redmine server and imported that way, using these commands

#Execute on trac v0.10 server
sqlite trac.db .dump > tracdump.dmp

#Execute on Redmine sqlite3 server
cat tracdump.dmp | sqlite3 trac.db

Then use the trac migration instructions here http://www.redmine.org/wiki/1/RedmineMigrate

I modified the command,

#Original command
rake redmine:migrate_from_trac RAILS_ENV="test"

#Modified
rake redmine:migrate_from_trac RAILS_ENV="production"

This imported the Trac db directly into the project, you will need to supply the location to the trac envrionment (full envrionment not just the DB so do a trac hotcopy to get a full version, but convert and overwrite the trac.db file in /tracroot/db/trac.db)

The trac backup command is

/usr/pkg/bin/trac-admin /usr/pkg/share/trac/tracproject hotcopy /root/tracbakup

That’s for NetBSD installations, on your system trac-admin is likely to be lcoated elsewhere and your trac project location will be where ever you set it up to be.

Subversion integration:

I had an issue here where it refused to load the repo properly. First of all i had created a new local repo then imported the SVN dump file from our production SVN server

#SVN Dump
svnadmin dump /path/to/reponame > /tmp/reponame.dump

#SVN Create
svnadmin create /path/to/reponame

#SVN Restore

svnadmin load /path/to/reponame < /tmp/repo1.dump

I then configured Apache with mod_dav_svn to act as the SVN server, secured against LDAP with the following config

<Location /svn>

 DAV svn
 SVNPath "/var/svn/repo/"
 AuthType Basic
 AuthName "Subversion repository"
 AuthBasicProvider ldap
 AuthzLDAPAuthoritative   On
 AuthLDAPURL              ldap://ldapserver.local:389/ou=People,dc=ourdomain,dc=co,dc=uk

 AuthLDAPBindDN cn=admin,ou=People,dc=ourdomain,dc=co,dc=uk
 AuthLDAPBindPassword adminpassword
 AuthLDAPGroupAttributeIsDN on

 Require ldap-group cn=Dev,ou=Groups,dc=ourdomain,dc=co,dc=uk
 Require group cn=Dev,ou=Groups

 </Location>

That config just lives in httpd.conf (or under ssl.conf if you wish) and states that the repository at /var/svn/repo is to be served as /svn via HTTP to anyone in the Dev group of LDAP (where Dev is a ListOfUniqueNames) It specifies the credentials to bind to LDAP with (admin).

That done we can configure Redmine, this is done through the UI, go to the web interface which should hopefully be running and log in with admin/admin. If you’ve imported Trac then you’ll already have a project set up in which case go to Settings > Repository. Fill out the obvious details, if you don’t allow public read-only access then you need to specify a user which at minimum can read-only.

This probably won’t work for you as the system won’t have permission to create the config directories in the default location /root/.subversion/  So follow the bottom of the Redmine CentOS install guide carefully. I also ran a command which fetched the commit history manually so that the credentials were saved and i could accept any certificates which were presented.

So that’s it more or less. A couple of small hints,

To enable cross-project ticket references go to global Administration > Settings > Issue Tracking and tick ‘Allow cross-project issue relations’. For LDAP auth go to Administration > Settings > Authentication  Then at the bottom right hand corner there is a small ‘LDAP Authentication’ link Click this and then ‘New Authentication Mode’ to fill out the details.

One of the neat things about Redmine is the ability to specify which LDAP fields correspond to username, firstname, lastname and email. Which is very useful as AD stores the usename in one field wheras POSIX users are stored differently.

I hope that help’s someone, i’m going to attempt to blog more of my work IT stuff like this (nothing sensitive obviously) as i know i was googling a lot to find answers to my questions!

Why no blog?

Friday, May 1st, 2009

I feel like i should explain why i haven’t been blogging recently, why, i don’t know… Anyway, i’m in the final year of my degree at Salford University and between now and the end of May i have 3 exams, 2 presentations and a dissertation deadline. So it’s fair to say i’m quite busy. I don’t really have time for much of anything apart from work at the moment. But in June i’ll be back in a nice office job and so i will have plenty of time in the evenings to devote to interesting projects which i can then blog about.

In the meantime, i discovered an excellent project for Vista Media Centre in the form of MediaBrowser – www.mediabrowser.tv it’s essentially a plug in which manages movies, pulling metadata from local and remote sources (the open source TV and Movie DB’s). But, the big difference between this and most open source projects – it actually looks nice, with iTunes style ‘cover-flow’ browsing.

As well as metadata, it can make use of mediainfo.dll to extract technical details from the files, so will display within the UI it’s resolution, aspect ratio, sound type, codec etc. It’s also the first open source project i’ve contributed to, now that is a big thing for a developer. The first time you get annoyed with some software and your solution is to download the source code, fix and compile rather than submit a bug report feels very good. Granted it was a simple bug, but nonetheless, i worked around it.

That’s it for now, i’ll be back in June, after i’ve moved house.

An explanation methinks….

Sunday, October 12th, 2008

So it appears i have been away a long time, not so true, my current webhost (000webhost) decided to delete my account for ‘inactivity’ despite having the site set as my homepage so it always gets hits. Obviously they are demanding i log into my online control panel every so often – if i don’t, they just delete the account – without asking or reminding me.

In 8 months it will be back on a self hosted line, i may even have a dual line – 2x 24Meg Be* perhaps? We’ll see how it goes. For now the site may randomly disappear from time to time but i will do my best to restore it quickly.

The lack of blog is more due to being busy – first i was commuting from manchester to the wirral every day for work, now i’m snowing myself under with final year project work – it’s a very exciting and interesting project but shhh i can’t say much more now.

That said, i’ve spent the last 4 days watching House M.D. back to back so i think it’s time i got off my ass and did some work. I have some interesting personal projects lined up so as i complete those i will try and post the details of what i did and how i did it.

My lounge now contains a rather nice 24U server rack (fully enclosed, full depth, all black with blue trim and a smoked glass door) which was a bargain at £50, although driving it back from Huddersfield in my car was not fun to say the least and an experience i will not be repeating.

That will do for now, everything is more or less ok. TTFN.

Lack of Blog

Wednesday, August 29th, 2007

Sorry for the lack of blogging recently – i havn’t really been up to all that much. I have made some headway on my monitoring controller though, just ordered a load more components from RS tonight.

Some stuff is going to have to be re-done (or re-worked, not entirely re-done) but it shouldn’t be too tricky now i know what im doing and have all the right components! Will update soon with some pics i think.

I should write some more about the 2k3/exchange migration, so here goes:

I’m now runnign two exchange servers, my one in the wirral is MX 10 so is reached first, any mail for the rest of the family is autoforwarded to @lewthwaite.no-ip.org so it will go directly to the server at home and be accepted. The server at home is MX 20 for @lewty.org.uk so should my server be down it will go to home, outlook at my end collects my mail via pop3 for any of my mail which ends up on the home server.

It would appear exchange does NOT collect POP mail from other accounts on your behalf?� unless you use a 3rd party connector – which is expensive. This in contrast to somthing like Scalix which will do all this clever stuff for you.

Monitoring a go-go

Monday, June 25th, 2007

It’s been full speed ahead on the monitoring controller this week, been fitting all of the nice Neutrik sockets in. I did have to buy a new hole saw as mine old one could take no more punishment unfortunatly. To fit the pots on the front of the unit i need a 10mm HSS drill bit – B&Q wanted over ?8 for one! I got straight onto ebay and paid ?1.50 including postage.

In the future i’ll order from screwfix when i can – they’re far cheaper than B&Q and Wickes don’t seem to sell anything that i want. Once the sockets and controls are installed i’ll get on with the circuity, some of which may have to wait until funds are available for more supplies.

I took a trip round to Ledwood Tech today to say hello and go through what they do and what i’ll be involved with. It looks like it’ll be a fun year, or at least i hope it will be. I start on monday so will check in then with an update, though i may well be starting a private ledwood blog, only available to me and my tutor as part of my placement work.

Anyways, i’ll get going, cheerio for now.

Catch up

Saturday, April 14th, 2007

Thought i’d best blog, as i havn’t in a while. Not all that much has been happening, i’m back at uni and sorted out more stuff to go in the ‘big free box’ – i dont want any of it but i would like it to be used by someone rather than be thrown away (so feel free to come and have a ratch through it).

I’ve set up the client end of the OpenVPN link to home, now off hamachi, it seems ok and at least doesnt rely on Hamachi servers for resilience, so all being well this will be a permant solution – had a few problems with routing but thats because the server is pushing routes for the local network and all the firewall rules were wrong! No matter, all sorted now and its working fine.

I’ve given my flat a bit of a clean (more antibacterial cleaning products) as it was a complete tip when i got back – my flatmate had left stuff everywhere. Kitchen and bathroom floors want bleached but other than that, it’s fairly tidy.

It would also appear that it’s all kicked off RE the SU, i went onto the forum this morning (not signed in as i refuse to – i’m having nothing to do with the SU anymore) and there is a while host of deleted threads – including my little tiff with accomodation services, it would appear one of the users was verbally abusive to the accomodation staff and was arrested because of it (a tad extreme i thought – what happened to a nice sit down and warning – most people are fairly reasonable, but i spose its this sue-everyone culture we live in thats come across from America), but isn’t the only thing to have happened in what is fast becoming a long line of dispute between the students and accomodation services – i think it’s only a matter of time before the students break away and are running their own ‘union’ (isn’t that the basic premise of the actual SU anyway?) but who will obviously have no responsibility to the university.

It all just seems very silly, fair enough, verbal abuse (or any form of abuse) isn’t really acceptable, but it’s a little petty to get the police involved when its a bit of online name calling and not face to face, i mean to say, i probably had worse at school as a kid through bullying! Hence the old adage, “Sticks and stones may break my bones but words shall never hurt me”

I don’t know, i’m just staying out of it and i’m never going to go back into halls at this university again, it’s just one thing after another it’s rediculous – and it’s obviously not just me that it’s personal with!

As a side note, they attempted today (Saturday) to take a direct debit accomodation payment (which i expressly did not permit them to do under any circumstances) two days before loan day (though the loan has gone onto the account already, but dated monday) so obviously the payment bounced! What a joke, they paymen will go in, via debit card, on Monday when the payment clears, although my university SIS account says that i don’t owe them any money at all so i’m tempted just to leave it until they say they want it. Not my problem if they say my account is correctly balanced, it leaves me ?600 up.

Re-arranged the car pc in the car – its now velcro’d to the back of the rear seats and seems fairly stable, although the PSU for the USB hub is making lots of noise, but with my 10% off CPC until the end of April i’ll be getting some 3A regulators which means i can take straight off ~12v that is the car which means it should be nice and quiet, same for the wireless AP too.

Somthing really weird happened last night when i got back from Asda, i parked the car, put the windows up, took the keys from the ignition and got out the car – it’s at this point i realised the engine was still running – when i had the keys in my hands! Somthing weird was going on – i put the keys back in and tried to run the starter again (makes that nasty noise when you do) and turned the key back – engine stopped this time. It’s worrying to say the least, i hope it doesn’t happen again!

Thats all for now, as new things happen (which im sure they will given that im back at uni) i’ll get them posted up. TTFN folks!

Website Downtime

Friday, March 23rd, 2007

My apologies people! The website has suffered some downtime since wednesday but we’re back up rock and rolling. The outage was due to a power cut in the…ahem… ‘datacentre’ and the webserver didn’t turn itself back on again. But i didn’t lose any e-mail other than during the approx 4 hours of downtime, thats all dealt with seperately.

So, i’m back home again for the holidays, got quite a bit of uni work to do, plus i’m at work work and i’ve got to find time to catch up with friends during all that, so i think its going to be a busy time.

I did however get the chance to fit powered USB to the car, there is a hub in the glovebox powered from the inverter in the boot and it carries non-essential stuff (ie. windows doesnt complain if it loses it even though its supposed to be hot-plug…yeah..pull the other one).

Probably won’t have time to do any interesting stuff in the near future so the blog may go blank for a bit, but if somthing comes up i’m sure i’ll get it written.

Website and e-mail may be on and offline for a while in the next few weeks as im upgrading the firewall/gateway to somthing better, plus i need to put more RAM into the webserver.

Woo! Balanced input stages

Saturday, March 17th, 2007

Ok, so i know there are better ways to spend a saturday night but i did get the balanced input stage of my monitoring controller working! I must be tired as i’ve been having so many muppet moments today! Firstly, the reason i was blowing up the chips the other day was because i had the power wired in backwards as i was convinced i’d got the colour coding wrong – seems i had that right. So then, plugged it in, no blown chips, no dodgy voltages on input or output stages. Plugged in a source, fired up a software sig gen and away we went…

Or so i thought… it works but for some reason clipped at about 1v p-p inpu..why? well i hadn’t actually plugged it in again…..

So got it all together and woohoo it works, sat here listening to music through it right now, good healthy level, can’t see any clipping on the scope, i can’t really test bandwidth properly, and CMR is tricky also – but it does work i just dont know how well.

Shoving an input to only hot gives a -6dB reduction on the output which is correct.

Attached is a pic in it’s current state, at the moment it ain’t pretty but the 3 connectors on the back look nice! Even if they’re not Neutrik….

Will have to order some more connectors – need quite a few in various guises. So watch this space, now i’ve got some confidence in actually building something which works it may move forward quite rapidly!

http://www.lewty.org.uk/blog/wp-content/uploads/2007/03/p3170001.JPG for imagery

First Blog

Sunday, March 11th, 2007

Ok so i’ve just set up this damn thing and the theme isnt right and it doesnt match my site…grumble grumble but i thought it was about time i blogged my projects so here they will be presented, catogorised of course. Nuff said really…