Wednesday, February 06, 2013

Redmine migration tips and tricks

At work we have a really ancient instance of Redmine (0.8.4) married to a mysql database. Since Redmine has already gone through 1.x versions and is now at 2.x - I decided it was time to move on - at the same time I moved the instance to a new machine running nginx and mysql server 5.1. I followed these instructions to get Redmine behind an nginx instance. * I produced a mysql dump of the old instance and moved it over to the new server. * I then generated the secret token (in older versions it is "rake generate_session_store" and in 2+ it is "rake generate_secret_token") * After that I ran the normal "rake db:migrate RAILS_ENV=production" on an empty database (make sure you created the database in Redmine and the redmine user and granted the privileges to the database to the said user!) I did the last step to be able to get the "users" table from the 2.x+ Redmine version which adds a "salt" column to the table - this salt is used to hash the passwords. This table will only have one use upon a fresh install - the "admin" with the default "admin" password which is properly hashed and stored. After this was done I proceeded to launch the mysql client and drop and recreate the Redmine database and re-grant all the privileges. The next step is to load the dump from the 0.8.4 database and run the migrate script again ("rake db:migrate RAILS_ENV=production" and re-generate the token as above). The mysql database now has the "old" 0.8.4 data that has been migrated. However, you will NOT be able to log in since the migration script does not know how to use the salt to recreate the hashed passwords properly. Use the users table you dumped from the fresh 2.x+ install that has the "admin" user and its credentials and associated salt in it to replace the migrated user's table's "admin" hashed_password and salt fields. Exit mysql client, restart nginx and point your browser to the instance - it should all work now!

Wednesday, November 28, 2012

Loving Windows 8 (ashamed to admit)

Sometimes "completely new" is good. I have been using and programming computers for 25 years now since my first Commodore 64. I have used NetBSD, FreeBSD, all sorts of Linux on all sorts of architectures. Have administered multi cpu Tru64 machines, HPUX etc. At work I use a Mac (unwillingly - I still cannot understand why they cost so much). A year ago just for fun I purchased a Windows 7 based ExoPC tablet. Nothing spectacular really, however, it does have a touch screen, 64 GB SSD and 2 GB of RAM and a pretty fast Atom cpu. The thing was not particularly usable until one day I decided to put Windows 8 on it - since that day my tablet and I have been inseparable! It's like it got a new lease on life and I finally "got" the "tablet thing". Windows 8 is just fast, intuitive and I love the tiles. The keyboard is intelligent and the perfect size. Heck, I am typing this blog entry on it. I never thought I would say this but I actually started using Internet Explorer over Chrome too. I love how IE integrates, the tabs etc. Thank you Microsoft for a job well done. You (finally) got it right.

Monday, January 16, 2012

Life and death

Someone somewhere is fighting for their life, lying down, taking slow and painful breaths, thinking about the final moment. Their eyes are sad, maybe peaceful, they may be scared. Even if it is a dog, it is still a living being and it knows when its life is on the line.

Tuesday, December 13, 2011

Texas weather

So, we finally made the move to Texas (Austin area) in October 2011. Florida was rainy, wet etc. Texas had its biggest drought in 100+ years. Well, we moved here and guess what? It has been freaking raining almost every single day! 5+ inches and counting. I am so sick of this damn weather crap, it's not even funny... Actively wishing and thinking of going back to Florida, at least the ocean was close by...

Signed,
Pissed off in Texas

Saturday, August 27, 2011

Nice introduction to GIT

These days knowing how to program and then knowing how to program in a certain language is paramount if you are a software engineer (obviously). Equally important is knowing how to use source versioning tools. Having a github account can almost serve as a resume for quite a few software shops. Thus, learning tools like Git and how to use websites like github optimally will increase your chances of employment...

Here is a nice Git introduction - tutorial...It is linked to from the beginner pages of github anyways ;)

Monday, August 16, 2010

Checking in

A lot has happened since we got back from GA. We went for a horse back riding trip to Wyoming's Wind River Valley with Ed Dabney and 18 other people. Ed trailered our horses up there, we flew into Jackson Hole and then drove to Dubois where we met the convoy (yes, it was a convoy of eight horse trailers!). We spent a wonderful week in the wilderness just hanging out with everyone, riding in the some of the most beautiful scenery this country has to offer. Slept in an ultra light two person REI tent with a zero-degree sleeping bag. The temps were in the 40s during the night and high 70s and low 80s during the day. Humidity was low (yes!). WY is an "open carry" state which allowed me to wear my Ruger Vaquero 45 LC single action in a holster in plain view! That feeling alone is awesome!

The camp had primitive facilities, no running water, just a pit toilet that was amazingly clean.

After WY we spent a night in Dubois - this town is beautiful western town. The next day we drove to Jackson Hole, rented a one-way car from Hertz and drove down to Albuquerque. We initially reserved a full-size vehicle but because the Jackson Hole location was privately owned, they did not want to part with their full size new car and instead offered a Corolla with 50K miles on it or a brand new tiny Yarris. We took the Yarris and that puppy held up great! Drove through Rock Springs, WY on to Cheyenne to meet I-25 down through Colorado and into New Mexico. Stopped a bit in Ft Collins, CO which has a beautiful downtown full of restaurants, bars and shops.

The drive through CO was uneventful except a huge rain storm close to Trinidad. After that we rode into NM and rain followed us for a while. Drove through Raton, NM which is very scenic. One observation through NM is the amount of mobile homes, many of them in disarray!

We spend the night in Albuquerque, making sure we had dinner in our favorite restaurant - the "Flying Star". The next morning we went on south on I-25 down to Truth or Consequences and then on to Hillsboro. Hillsboro is the start of the Gila Natl Forest, it is a quaint town with population of about 150. Has two cafes (ate a great lunch at one of them), a gallery and a post office. It is about 40 miles from Silver City (our destination) but the road winds through the Gila Forest and some quite scary switchbacks in the mountains. It took about an hour and a half to cross the 40 miles! Silver City was alright, it is an old mining town with a lot of history and a historic downtown. About 10,000 people live in it and it has all the services of a bigger town, including chain restaurants and a Walmart. It also has a "drag" downtown where we saw a bunch of Latino folks drive around looking all "gangsta" and playing loud music out of their cars.

5 miles north of SC is the community of Pinos Altos - there is a historic Opera House (still functioning!), an old saloon and a museum in town. Worth a visit.

At the end we looked at a property in Mimbres, about 30 minutes away from SC in the Mimbres Valley. This house was on 2.5 acres and its back gate opened into the natl. forest!

All in all, a great trip!!! Can't wait to move out West.