Mailing List Archive

Migrating a legacy Zope2 app to use buildout.
Hello,

Currently, we have a Portal that was built starting in 2004 before
buildout was available, so our development method has been to export
and import from the Zope2 WebUI for deployment. That's been a real
pain and since we've automated the rest of our infrastructure with
Chef we'd like to be able to do that with Zope. So my question is does
anyone have pointers for migrating an app that mostly lives in the
ZODB to a build-out style architecture that we could control with
Chef? I see tutorials on starting a new Zope 2 app from scratch with
buildout but nothing on migrating an older one to build out. For
example, how would we create objects like MySQLUserFolders etc from
buildout? Thank you in advance.

-J
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Migrating a legacy Zope2 app to use buildout. [ In reply to ]
On 17.06.2011 23:57, Jason J. W. Williams wrote:
> Hello,
>
> Currently, we have a Portal that was built starting in 2004 before
> buildout was available, so our development method has been to export
> and import from the Zope2 WebUI for deployment. That's been a real
> pain and since we've automated the rest of our infrastructure with
> Chef we'd like to be able to do that with Zope. So my question is does
> anyone have pointers for migrating an app that mostly lives in the
> ZODB to a build-out style architecture that we could control with
> Chef? I see tutorials on starting a new Zope 2 app from scratch with
> buildout but nothing on migrating an older one to build out. For
> example, how would we create objects like MySQLUserFolders etc from
> buildout? Thank you in advance.
>
> -J
> _______________________________________________
> Zope maillist - Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )
First, would it not be worthwhile to migrate to a newer Plone?
We also still run some very old Plone sites. However, as soon as we have to
touch one of them in a non trivial way, we migrate.
It is a might require some efforts, especially if you have customized your site
heavily.

If you can not migrate:
Why do you want to have buildout creating MySQLUserFolders?

Buildout is about setting up your Zope/Plone environment, not about creating data.
You set up a buildout 2.5 with all the tools you need. Then, when it runs to
your satisfaction you copy over the Data.fs of your NOBuildout structure.

robert


_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Migrating a legacy Zope2 app to use buildout. [ In reply to ]
On Fri, Jun 17, 2011 at 23:57, Jason J. W. Williams
<jasonjwwilliams@gmail.com> wrote:
> Hello,
>
> Currently, we have a Portal that was built starting in 2004 before
> buildout was available, so our development method has been to export
> and import from the Zope2 WebUI for deployment. That's been a real
> pain and since we've automated the rest of our infrastructure with
> Chef we'd like to be able to do that with Zope. So my question is does
> anyone have pointers for migrating an app that mostly lives in the
> ZODB to a build-out style architecture that we could control with
> Chef? I see tutorials on starting a new Zope 2 app from scratch with
> buildout but nothing on migrating an older one to build out. For
> example, how would we create objects like MySQLUserFolders etc from
> buildout? Thank you in advance.

Buildout is about setting up an application environment and getting
all the parts and dependencies installed so it's orthogonal to setting
up the objects you need in the ZODB.

Importing is one way of setting up the objects in the ZODB. Another
one is writing python scripts that does it for you. A third one is
using genericsetup. http://pypi.python.org/pypi/Products.GenericSetup

--
Lennart Regebro, Colliberty: http://www.colliberty.com/
Telephone: +48 691 268 328
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Migrating a legacy Zope2 app to use buildout. [ In reply to ]
> Buildout is about setting up an application environment and getting
> all the parts and dependencies installed so it's orthogonal to setting
> up the objects you need in the ZODB.
>
> Importing is one way of setting up the objects in the ZODB. Another
> one is writing python scripts that does it for you. A third one is
> using genericsetup. http://pypi.python.org/pypi/Products.GenericSetup

Literally, all we need to be able to do is change the connection
string on the MySQLUserFolder and few ZMySQLDA objects before Zope
fires up. I've been hacking on a command-line utility to do this
directly in the ZODB, but I can't seem to get it to be able to commit
the change:

https://gist.github.com/1036604

Any pointers would be appreciated.

-J
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Migrating a legacy Zope2 app to use buildout. [ In reply to ]
> First, would it not be worthwhile to migrate to a newer Plone?

This isn't a Plone site. It's our own app built inside Zope 2.

-J
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Migrating a legacy Zope2 app to use buildout. [ In reply to ]
> Literally, all we need to be able to do is change the connection
> string on the MySQLUserFolder and few ZMySQLDA objects before Zope
> fires up. I've been hacking on a command-line utility to do this
> directly in the ZODB, but I can't seem to get it to be able to commit
> the change:

Found the bug. In case it helps anyone else, this program will let you
get or set a ZODB object property from the command line:

https://gist.github.com/78dbf3a992ab7c255f95

-J
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )