[ANN] pier exporter/importer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] pier exporter/importer

NorbertHartl
I have created a little utility to ease the export and import of a pier kernel. Some things are missing but it works ok. I release it to get ideas and critics if it does make sense at all :)

You can use it this way

PEPierExporter current
        directoryPath: '/opt/my-pier-instance/';
        kernel: (PRKernel instanceNamed: 'pier');
        exportAll

It creates an archive of a pier kernel in the specified directory. The pier kernel is exported as kernel.xml to the directory. Furthermore a visitor collects all instances of MAExternalFileModel and copies the files in a directory files/ under the specified directory. A directory layout could look like this

/opt/my-pier-instance/
   kernel.xml
   files/
      35/
         ynbgnob8q3rm8ez6zoakw0po2hdu7m/
            animage.jpg
      eb/
...

This way you can archive the whole directory and transfer it to somewhere else. A

PEPierImporter current
        directoryPath: '/opt/my-pier-instance/';
        importPierKernel

will read the kernel.xml back in and puts it in the PRKernel instances list. From that point it should be selectable from the web interface. The exported files are not copied back, yet. This is because I'm not totally confident that this is good idea. The files can be copied manually as well. If you would find that useful I'll add the copy back.

The packages are in

MCHttpRepository
        location: 'http://source.selfish.org/mc/pier'
        user: 'small'
        password: 'talk'

You need to load the packages Pier-Exchange and Pier-GemStone-Exchange. Before you load Pier-GemStone-Exchange you need to load GsUtil-Sixx from

MCHttpRepository
        location: 'http://source.selfish.org/mc/misc'
        user: 'small'
        password: 'talk'

I'm sure there are bugs. So don't hesitate to complain.

Hoper you like it,
       
Norbert


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] pier exporter/importer

Monty Williams-3
+1

----- Original Message -----
From: "Norbert Hartl" <[hidden email]>
To: "GemStone Seaside beta discussion" <[hidden email]>
Sent: Friday, February 18, 2011 11:48:10 AM
Subject: [GS/SS Beta] [ANN] pier exporter/importer

I have created a little utility to ease the export and import of a pier kernel. Some things are missing but it works ok. I release it to get ideas and critics if it does make sense at all :)

You can use it this way

PEPierExporter current
        directoryPath: '/opt/my-pier-instance/';
        kernel: (PRKernel instanceNamed: 'pier');
        exportAll

It creates an archive of a pier kernel in the specified directory. The pier kernel is exported as kernel.xml to the directory. Furthermore a visitor collects all instances of MAExternalFileModel and copies the files in a directory files/ under the specified directory. A directory layout could look like this

/opt/my-pier-instance/
   kernel.xml
   files/
      35/
         ynbgnob8q3rm8ez6zoakw0po2hdu7m/
            animage.jpg
      eb/
...

This way you can archive the whole directory and transfer it to somewhere else. A

PEPierImporter current
        directoryPath: '/opt/my-pier-instance/';
        importPierKernel

will read the kernel.xml back in and puts it in the PRKernel instances list. From that point it should be selectable from the web interface. The exported files are not copied back, yet. This is because I'm not totally confident that this is good idea. The files can be copied manually as well. If you would find that useful I'll add the copy back.

The packages are in

MCHttpRepository
        location: 'http://source.selfish.org/mc/pier'
        user: 'small'
        password: 'talk'

You need to load the packages Pier-Exchange and Pier-GemStone-Exchange. Before you load Pier-GemStone-Exchange you need to load GsUtil-Sixx from

MCHttpRepository
        location: 'http://source.selfish.org/mc/misc'
        user: 'small'
        password: 'talk'

I'm sure there are bugs. So don't hesitate to complain.

Hoper you like it,
       
Norbert