/opt/redmine/redmine-x.y.z
, where x.y.z
is the version number. I chose such location to be able to easily switch back to the previous version of Redmine in a case of upgrade failure.
However, such approach introduced a need to copy all the user and state data, such as logs, from the old version to the new one during the upgrade. And, there are quite a lot of such data. So, to simplify this process, I decided to modify the Redmine file structure a little.
User and state files are not (and should not be) altered during the Redmine upgrade process, so we can move them to the /opt/redmine
directory (i.e., the parent one) and just create symlinks to these files under the corresponding Redmine version directories.
The following steps should be done only once and won’t be needed during further upgrades.
Before proceeding, it is better to stop Redmine to prevent these files from being modified during restructuring (what can lead to loss of new data):
$ sudo service apache2 stop
Now, move files
and log
subdirectories from the Redmine root directory (i.e., redmine-3.2.0
) to /opt/redmine
(i.e., to the parent directory).
After that, create files
and log
symlinks in the Redmine root directory (execute these commands while being inside that directory):
redmine-3.2.0~$ ln -sf ../files files redmine-3.2.0~$ ln -sf ../log log
Now, in /opt/redmine
create the redmine
symlink, that will point to the current Redmine version (i.e., to the previous version, for now):
redmine~$ ln -sf redmine-3.2.0 redmine
Then, modify your Apache configuration, so it will point to this symlink instead of the real directory:
<VirtualHost *:80> RailsEnv production DocumentRoot /opt/redmine/redmine/public <Directory "/opt/redmine/redmine/public"> Allow from all Require all granted </Directory> </VirtualHost>
Now, you can start Redmine again, as the next steps won’t affect its work. But, you can also leave it stopped, until we complete the whole upgrade process.
It’s the time to fetch the new 3.3 release from the official Redmine website (run the following under the /opt/redmine
directory):
redmine~$ wget http://www.redmine.org/releases/redmine-3.3.1.tar.gz
And, unpack it:
$ tar -xzf redmine-3.3.1.tar.gz
After this, the new directory redmine-3.3.1
will appear in /opt/redmine
. Go there and replace files
and log
directories with symlinks to appropriate directories in /opt/redmine
:
redmine-3.3.1~$ ln -sfn ./files files redmine-3.3.1~$ ln -sfn ../log log
Now, it’s the time to copy the following files from the old Redmine to the new one (use cp
or any other command, that you prefer):
config/configuration.yml config/database.yml config/initializers/secret_token.rb db/schema.rb
Next, we need to copy plugins
and themes
to new Redmine. But, before doing this, be sure to check, that all the themes and, especially, plugins support the Redmine version, you are about to copy them to (i.e., Redmine 3.3.x in this case). If you are sure, that all plugins and themes of the old version are compatible with the new one, copy corresponding subdirectories from the following locations of the old Redmine to the same locations of the new one (copy only those subdirectories under public/themes
, which do not exist in new Redmine – i.e., skip native themes):
plugins/ public/plugin_assets/ public/themes/
After that, you can install new versions of the plugins and themes, old versions of which do not support Redmine 3.3.x.
Now, this is the moment, when you need to stop your Redmine again, if you have it running. Then, we need to make our redmine
symlink to point to the new version of Redmine:
redmine~$ ln -sfn redmine-3.3.1 redmine
The next step is what’s in the official upgrade guide: You need to run bundle
to make sure, that all the dependencies are installed (do this under the Redmine root directory):
redmine-3.3.1~$ bundle install --without development test
If you got any error (what’s unlikely, as I did not), refer to the “Resolving Bundle errors” subsection of the book (page 38) to get rid of it. When ready, you also need to run database migrations:
redmine-3.3.1~$ RAILS_ENV=production bundle exec rake db:migrate redmine-3.3.1~$ RAILS_ENV=production bundle exec rake redmine:plugins:migrate
The first command will update the main Redmine database tables and the second one will do the modifications, which are needed by plugins, if any.
That’s it! Finally, it’s the time to start Redmine and play with its new version:
$ sudo service apache2 start
Enjoy it!
]]>
The second chapter of the second edition, that was rewritten a month ago (or so), describes two primary options for installing Redmine (the first addition also included these options). The first option is the installation from a package, that comes with Redmine 2.5 (which Debian guys have versioned as 3.0), under Debian 8. And the second one is the installation from sources, that uses the recent version 3.1 under Ubuntu 14. However, this time for the second option I described the real installation of Redmine on a DigitalOcean droplet. And, this installation can be accessed by anyone, as it’s public! Also, as for the server I used the domain mastering-redmine.com, you can access the book’s Redmine just by entering this domain into the address bar of your browser.
If you open mastering-redmine.com right now, you will see, that it’s still being configured. That’s because I’m still working on the second edition. In particular, recently I finished the fifth chapter, which is about managing projects. In other words, you can now watch, how the second edition is being written! Maybe, you can even influence it a little…
But, what is the end purpose of that website? Is it just to share the progress of the work on the second edition?.. Of course, no! To be honest, I’m not 100% sure yet, what I will use this project for, after I finish updating the book. But, I already got some ideas:
Any other ideas are welcome!..
]]>
So, what am I going to change?.. First, many new versions of Redmine came out since the first edition of the book. Certainly, the second edition is going to reflect changes in these versions. Second, I’m going to review completely different plugins in the “Plugins and Themes” chapter. But, I’m not sure, which ones, for now. And third, all mentions of ChiliProject are going to be dropped. As it’s dead, unfortunately. Finally, I’ll change everything else, what I’ll find reasonable. And last, I’m open to any your suggestions!
In fact, I really need your help in improving this book. Thus, if each reader reported issues, that he/she had found in the book, this would make my work much easier, the book much better and therefore, maybe, Redmine a little bit more popular. So, this is not just an announcement for the second edition – it’s a request for help. Let’s make this book better!
Now, another possible announcement:
To demonstrate Redmine in the first edition of the book I create a special project on my local installation. That project is about writing the Mastering Redmine book, first edition… Naturally, I’m going to do the same for the second edition. But, now I also think about making this project public. As well I think about creating a special separate website for the book, that will run the corresponding Redmine installation. Would you join me there?.. Follow my blog or social networks for news, if so.
]]>For this reason I devoted a whole page (161) to using projects as categories in my book Mastering Redmine.
I got the will to implement true project categories for Redmine a long time ago (see #1777) and, finally, I came up with this solution – the Project Sections plugin.
Why “section” and not “category”? First, I used to implement a proprietary categories plugin for Kayako and did not want to use the same name (as these plugins are too different). Second, assuming, that some day Redmine guys would implement true project categories in the Redmine core, I wanted to avoid conflicts. And the third, sections really resemble the sections (see the project list)!
From many points of view a section is not just a usual project category… I prefer thinking, that I implemented it in a Redmine way. Anyway it’s quite specific.
Thus, sections help to describe projects better, as they usually get prepended to project names. For example, instead of just “WordMine” you get, e.g., “WordPress » Plugin › WordMine”. As long as sections, unlike projects, do not require you to spent time for configuring them, you can manage them much faster and more effectively.
Also sections allow splitting the project list into sections grouping projects by whatever you like. Each section gets its own page and includes links to parent and child sections as well as to other system sections. A section page lists projects of the section and all its subsections this way providing the complete project list and smaller collections simultaneously.
Additionally, sections affect the primary project URL (the one, which points to the overview page) by prepending section identifiers to the project one. So in result you get an URL, which looks like:
/project/top-section/subsection/project-identifier
But this is not only a more descriptive URL, but also a reliable source of information for search engines.
Generally, project sections were implemented in the way, it should be very easy to migrate from project-based categories to section-based categories.
This is the only plugin, which I release without first using it on my website or other production Redmine installation. That’s because currently my site is running Redmine 1.0 and the minimal supported Redmine version for the plugin is 1.4 (it required many changes to support Redmine 1.0). Anyway right now I’m working on moving my site to Redmine 1.4 soon, and to install this plugin afterwards.
]]>I’m quite sure, that this book and this project will bring new users to my website. I hope, that such users will read this particular news, where I’m going to describe, what you can find on the website and in this particular project…
This website is built on… Redmine! On this website, at the moment of writing these words, I share my Redmine plugins mostly. None of these plugins have a special usage in any organization, I work in. Well, some of them are used on the Kayako Forge (and I work in Kayako)… But, what I’m trying to tell is that this work is totally volunteer (and was done before I entered Kayako). And one of the main goals of this website is sharing – sharing the code, ideas, views and so on. This way anything this website uses is available for download and free usage! Thus, the theme of the website is available in the Red-Andy project, Redmine customizations are available in the Projects project, and customizations for this particular project (e.g., how did I add the “Table of contents” and “Sample chapter” tabs) are available under the “Repository” tab of this project.
That’s was a short story about the website. Now let’s talk about this project:
The book has the official book page on the publisher’s site, where you can leave a review, submit errata and so on. All this will go to the publisher and the appropriate requests will be forwarded to me. So anyway this will be me, with who you will discuss Redmine issues or technical details from the book. Therefore, to establish a direct channel between you, as readers, and me, as the author, I created this project. It is aimed to be the first source of the technical information related to the book.
So here you will be able:
For quick news regarding the book (not such huge ones as this one) you can also:
Having started to deal with Redmine and having noticed, what kind of mistakes its users usually do, I got the feeling, that I would like to create a blog some day, where I would discuss such issues (by the way, I still want to do this)… I really had a lot of ideas, what to write about for Redmine, and even started to note them.
So, when I got the offer from Packt Publishing to write a book… there were no doubts, that I want to do this, and I agreed! Was I ready for doing this?.. No, I believe my English is far from being perfect. Did I have a lot of free time? No, my daughter was born and… you know these little kids. Why no doubts then? Cause I was not sure, that I will ever have such chance again! And what I learned during my last decade is: Never loose chances!
Of course, before agreeing I had ensured, that it was not mistake (I literally asked, why me). Honestly, it’s still sometimes unbelievable, that there going to be my book, printed, in English, by a British publisher… While writing first chapters I was constantly expecting the email claiming it was a mistake to ask me to write this book… Yeah, perhaps, I’m too self-critical? But now it’s the fact! At least untill or if the following link still promotes the book…
At the moment drafts for all the book’s chapters have been completed and the book has just entered the “production” phase (it’s the final phase before the book goes to stores). The book has 11 chapters (while the editor requested 10 and it was planned to have 10 chapters – one of the chapters got too huge, so we decided to split it into two) and about 350 pages. It will be available in eBook format and/or in printed copy.
Thanks to the book my Redmine to-write list, which has been mentioned above, is now empty! That is, everything, I wanted to write about and made notes about, is now in the book. I can’t say, that I was a dumb in Redmine, but, can you believe, having written this book I feel like I have learned much more. Cause sometimes I looked into the code/section, where I did not look before, and found yet unknown things, sometimes I just put my thoughts on the “paper” and this made me see Redmine from another point and so on. Anyway having read this book you will learn many things, I have already known, and many new things, I have discovered. I would not learn those new things without writing the book! So, you are lucky because you can learn them just by reading it…
The official book page on Packt Publishing is pretty much informative but let me tell you, what’s inside anyway:
While there are 11 items here (and the book has 11 chapters) they have nothing to do with chapter topics…
The “Mastering Redmine” book can be pre-ordered right now on the Packt Publishing book page. By the way, buying this book you also donate to Redmine (see Packt Open Source Project Royalty Scheme).
The book was also mentioned in my Personal report for 2012 under the name #MyOtherRedmineProject (it will be added as an achievement in the “Personal report for 2013” while the majority of the work was done in 2012). I also have been sharing the progress of the work on the book in my Twitter using the #MyOtherRedmineProject hashtag.
]]>