collective / collective.developermanual

Plone Developer Manual - the source code of developer.plone.org
developer.plone.org
82 stars 108 forks source link

Plone upgrade documentation #228

Closed tdkuehnel closed 10 years ago

tdkuehnel commented 10 years ago

The Plone upgrade guide would be better for fairly new to plone people to have instructions in actually how the upgrade step from 3.x to 4.x is actually performed. All the preparations stuff, work with a backup, look for compatible add on products, what to do with own developed products, themes, all fine. It is not clear from the documentation what is the next step when everything is prepared: You have a working backup of the site to upgrade. You have compatible versions of the addon products. Have looked through you themes and adapted accrodingly to the doku.

So what next? Put the new version to upgrade to into the current buildout.cfg and hope it pulls what is needed? Or better make another fresh install with the unified installer and the Plone Version to go to, install all products and themes and copy the Data.fs stuff over there?

The actual step how to perform the upgrade process is missing, at least for me as a non professional.

Please dont't take me wrong, Plone is real great stuff and fun to work with, the community is friendly and highly active, i just want to give information where i got stucked in the attempt to upgrade a small Plone 3.3.5 installation with 4 low traffic sites in it to the actual 4.3.2 version. The step described above is the one that needs additional information, IMHO.

Thanks everybody involved for such a great software Plone is !

davisagli commented 10 years ago

Is this what you were looking for? http://plone.org/documentation/manual/upgrade-guide/minor-version-upgrades

tdkuehnel commented 10 years ago

@davisagli: No, you point to minor version upgrades where the actual upgrade process is initiated by a run of bin/buildout with a buildout.cfg pointing to a new version, for short. What i mean is: I have a Plone 3.3.x installation with 4 low traffic (20 - 30 hits a day) Plone sites in it, which run for years. Now i decided to upgrade to Plone 4.x as i want to make available the new functionality to the users.

There is very nice and detailed information available in the upgrade guide in section "Upgrading Plone 3.x to 4.0" - http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0 - in how to look for updated products to install first, in how to deal with all the new stuff in own developed products, and how to adapt own themes to the new 4.x series internals.

I have done all this, i am prepared with a backup, with fresh installs of the old 3.3.5 version migrated to 3.3.6 with my data set (data.fs and stuff) in it ready to go the step to 4.x.

Where i stuck and cannot find the information is, what is the next step ? Simply change the extends = ... version.cfg in the buildout.cfg to a 4.x release is not enough. There is a section in the guide how to migrate this way - http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/buildout-3-4 - but i had no success with this. Because of this way not working for me and the hint of the top in the section saying "The installers are the recommended way to install Plone 4..." in the Description of the section i am wondering in how to achive upgrading the way with a unfified installer of 4.x. Shall i point the undified isntaller installing over my running 3.3.6 version? Shall i install a fresh 4.x one, make the necessary modifications for pakckages and themes my data set needs in the buildout.cfg, and copy the data set from the running 3.3.6 version over ? BY the way, the last mentioned thing i did and it did not work out. The zeoserver is terminating with exit status 1 as the logfile in var/zeoserver/zeoserver.log says. Running bin/zeoserver fg does not bring any error messages.

So i am really stucked now and cannot find if i am on the right way at least by reading the really nice and helpful and detailed upgrade guide. Which is the preferred way to actually do the upgrade step from 3.x to 4.x.? Fresh install, modified buildout.cfg and copied over data.fs? Or in place update by pointing unified installer to install into my running 3.3.6 target? Or only modify buildout.cfg and let it pull the rest? I am confused ...

At the moment i am trying to confirm if a fresh unified installed 3.3.6 data.fs migrates to a 4.x fresh install. But a fresh 3.3.6, which is the last 3.x version available and i have got the hint in the chat to upgrade to it first before going to 4.x, does not even start the zeoserver and client1 clean out of the box because of permission issues on the logfile for the client1 instance. It says IOError: [Errno 13] Permission denied: '/usr/local/Plone-3.3.6/zeocluster/var/zeoserver/zeoserver.log IOError: [Errno 13] Permission denied: '/usr/local/Plone-3.3.6/zeocluster/var/client1/event.log' although the permissions are set and i started it with "sudo -u plone bin/client1 fg" and "sudo -u zeo bin/zeoserver start" respectively. The fun is, that the from 3.3.5 to 3.3.6 migrated thing, done via buildout.cfg modification, at least starts as desired. But neither of the data sets get loaded into a fresh 4.3.2 install, so next thing i try is installing a fresh 4.0 one and give it the 3.3.6 data.fs to eat.

I am out of knowledge at the moment and have no hint for beeing on the right way to do an upgrade from 3.x to 4.x., so a detailed "modfiy your buildout.cfg and go" or a "install 4.x as target over your 3.3.x" would be helpfull. Just my experience and i want to give feedback and help others running into same issues. thanks all !

davisagli commented 10 years ago

The best practice is definitely to set up a new Plone 4 installation and copy your data over. If your existing site was set up with the Unified Installer and you have made minimal customizations to the buildout, it makes sense to do the Unified Installer install of Plone 4 and then adjust the buildout and copy the data there. If you have a heavily customized buildout it probably makes more sense to copy the entire buildout, including data, and then adjust it as described in the documentation you linked.

If you run the unified installer as a normal user and run Plone as a normal user, you should not have permission problems. Don't use sudo; it's not necessary.

tdkuehnel commented 10 years ago

From the Plone 4.3.2: Unified Installer README.txt:

The non-root method produces an install that will run the Zope server with the same privileges as the installing user. This is probably not an acceptable security profile for a production server, but is much easier for testing and development purposes or if you take care to set users and privileges yourself. The 'root' method produces an install that runs the Zope server as a distinct user identity with minimal privileges (unless you add them). Providing adequate security for a production server requires many more steps, but this is a better starting point.

Reading this i decided to go with the root install method as i want to end up with a setup ready to be exchanged with the running 3.3.5 live system.

To make it short: all the problems i ran into were permission related and are solved now. It was related to my own dumpness and the way plone changes the way to deal with permissions on data.fs and logfiles throughout the version history i had to climb up. Copying over the old Data.fs while preserving its permissions is not allways enough. In Plone 4.3.2 a new plone user and group and plone daemon user handles all while in older versions you see zeo or plone owning things. I solved it by running a clean install of the version in question, started it once to see how the permissions on the files were set, stopped the daemons, deleted the files and copied the data set over and set the permissions as the previously step showed me. Thus way i have a Data.fs now which is loaded into Plone 4.3.2.

I know that permissions are a critical thing and one might think its so obvious to think of allways. But for me it was not. Maybe because i was out of Plone and computer stuff for months.

As often the problems get solved for me by thinking and researching, reading docs and Q&A on stackoverflow and sites, and of course the answers from members of the plone chat - so if updating the upgrade doc is still necessary i cannot say.

svx commented 10 years ago

At the moment, lots of people are busy working on the new style/setup of the documentation @tdkuehnel I would like to thank your for your input and of course you too @davisagli ! I will close this ticket now, but I will include your comments and suggestions into the new style.