Foren

Best way to redeploy ext plugins?

thumbnail
Cameron McBride, geändert vor 13 Jahren.

Best way to redeploy ext plugins?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
The various documentation on re-deploying an ext plugin confuses me a bit. It seems like the documentation wants you to blow the entire <liferay> directory away and place a brand new copy out there, forcing you to replace all your config files, plugins, etc out there.

What I have been doing in my prototype testing is:
1. Shut down liferay
2. Delete the ext plugin directory from webapps
3. Place my new war file in the deploy directory
4. Start up liferay
5. At this point the old ext is still loaded and the new war file is deployed
6. Shut down and start up liferay
7. New changes are in place

Is there a better method?

Thanks!
thumbnail
Milen Dyankov, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Regular Member Beiträge: 171 Beitrittsdatum: 23.09.09 Neueste Beiträge
What I have been doing during development is:
ant direct-deploy
thumbnail
Thiago Leão Moreira, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Liferay Legend Beiträge: 1449 Beitrittsdatum: 10.10.07 Neueste Beiträge
Hey Milen, that is the right way to go.
thumbnail
David H Nebinger, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
The issue for the ext plugin is the way it gets deployed by the auto-deployer...

What the various docs say is that during deployment, any files that the ext plugin replaces in the base LR are renamed in base, then the ext plugin files are put in their place. Restarting the application container is necessary to make sure that the non-runtime-replaceable files (i.e. files in WEB-INF) are correctly loaded.

Undeployment of the ext plugin does the opposite; removes the files from base that were copied in, restore the original files from base, then the restart of the application container so the original non-runtime-replaceable files are loaded and used.

I think that redeployment of the ext plugin is the possible point of failure. Say in your first ext deployment you overrode a jsp file. When deployed, the original would be renamed and your jsp goes in. You then remove the jsp in your ext project and re-deploy...

What the doco suggests is that there is the possibility that during deployment, your overridden jsp page is not removed and the original jsp page is not restored. This could lead to an inconsistent environment where there is a mix of no longer needed overridden jsp files and no original files restored.

I'm not saying I've seen this happen or think that it actually does happen this way, but that's what the doco is suggesting.

That is why there is the push to start w/ a clean Liferay ROOT in your webapps dir, to ensure that any hiccups in the redeployment process are resolved.

But Thiago is right in that for the most part it should be okay to use the 'ant deploy' to deploy your ext plugin. If you do notice weird things, then falling back to a clean Liferay and then deploy your ext plugin may help to resolve them.
thumbnail
Cameron McBride, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
I am deploying this to a liferay server that does not have the plugins sdk, ant or much of anything else on it.

Being a liferay noob the long explanation was way above my head. Exactly which directories is it recommended that I remove and place out there fresh for each deployment of a ext plugin?

Thanks!
thumbnail
David H Nebinger, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
Primarily all you would need to do prior to the initial ext plugin deployment would be:
  • stop the application server.
  • copy the webapps/ROOT directory somewhere.
  • start the application server.
Then you can deploy your ext plugin. If you need to re-deploy the ext plugin, stop the application server, delete the webapps/ROOT directory and your ext plugin directory, and copy the original ROOT back into webapps. That way you're starting w/ a clean ROOT.

But I think you would only need to do this if you think there may be a problem w/ the normal ext deployment process which, AFAIK, have not been reported.
Cameron McBride, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

New Member Beiträge: 6 Beitrittsdatum: 21.02.11 Neueste Beiträge
Two easy follow up questions to removing the ROOT directory.

I have added a few files into ROOT/classes like portal-ext.properties, system-ext.properties and content\Language-etc.properties.

1. Should I move all of those properties files into my ext plugin?

2. Will the billion other files in ROOT be automatically regenerated?
SZ khan, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Regular Member Beiträge: 145 Beitrittsdatum: 31.10.09 Neueste Beiträge
My steps to redeploy ext-plugin

1. Shut down the server
2. ant direct-deploy
3. Start the server

It worked for me.

In addition to this, there is another method to redeploy ext-plugin

1. Shut down the server
2. ant clean-app-server
2. ant direct-deploy
3. Start the server
thumbnail
Mauro Mariuzzo, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Regular Member Beiträge: 142 Beitrittsdatum: 23.07.07 Neueste Beiträge
I think we have 2 use cases:
  • development time redeploy
  • production redeploy


During development the best way to redeploy extlet plugins is:
  • shutdown tomcat (or JBoss, etc.)
  • ant direct-deploy
  • restart tomcat
  • redeploy portlets/hooks/themes that needs new extlet features


It's better to re-create your liferay insallation (with ant clean-app-server):
  • when you remove jsp from your extlet (because with direct deploy you loose the original jsp)
  • if you have to make final tests, before deploy you software on production server



For production enviroment you can find some suggestions on the Liferay Administration guide.

The worst part of the "standard" procedure is that you have to restart the server (tomcat, jboss, etc.) two times.

We have developed an utility and a script file that is able to apply and extlet taking a backup of the original files, allowing a safe extlet update with only 1 restart.

Take a look on LPS-14769
thumbnail
Cameron McBride, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Expert Beiträge: 269 Beitrittsdatum: 08.02.11 Neueste Beiträge
For local laptop development I am using eclipse and I am never having to do anything manually. This includes deploying an ext plugin. I assume that eclipse is handling all of it for me. ext does require a restart of the server in eclipse.

Production (non local laptop) deployment is what I'm most interested in. We do not have ant on the machine.

Each time I delete ROOT and redeploy the ext and all my portlets I am going to also have to place all my custom property files out there as well (portal-ext, system-ext, etc). Is that what everyone is doing?
thumbnail
Tomas Polesovsky, geändert vor 13 Jahren.

RE: Best way to redeploy ext plugins?

Liferay Master Beiträge: 676 Beitrittsdatum: 13.02.09 Neueste Beiträge
Hi,

maybe it helps you: http://issues.liferay.com/browse/LPS-14221

-- tom
thumbnail
vipin bardia, geändert vor 10 Jahren.

RE: Best way to redeploy ext plugins?

Regular Member Beiträge: 162 Beitrittsdatum: 28.02.11 Neueste Beiträge
Hi Cameron,

These links can help you -

http://www.apoorvaprakash.in/2012/02/redeployment-of-ext.html
http://www.apoorvaprakash.in/2012/08/automated-undeployment-of-ext.html