ZimletDevSetup: Difference between revisions
m (added article footer) |
No edit summary |
||
Line 37: | Line 37: | ||
------------------------------------ | ------------------------------------ | ||
'''Deploying and undeploying Zimlets (only production level | '''Deploying and undeploying Zimlets (only production level Zimlets that are ready-to-go. For Zimlet development, see "DEVELOPMENT HACKS or TIPS" section below)''' | ||
------------------------------------ | ------------------------------------ | ||
----------------- | |||
Windows: | Windows: | ||
----------------- | |||
In windows you can use a simple tool called "Zimlet Installer.hta" to deploy and undeploy Zimlets. If you dont have access to this, then | In windows you can use a simple tool called "Zimlet Installer.hta" to deploy and undeploy Zimlets. If you dont have access to this, then | ||
follow http://www.zimbra.com/forums/zimlets/24640-solved-deploying-zimlet-zimbra-desktop-2.html#post124862 AND also make sure to Restart-Zimbra service after the deploy/undeploy. | follow http://www.zimbra.com/forums/zimlets/24640-solved-deploying-zimlet-zimbra-desktop-2.html#post124862 AND also make sure to Restart-Zimbra service after the deploy/undeploy. | ||
Deploying Zimlets via "Zimlet Installer.hta": | '''Deploying Zimlets via "Zimlet Installer.hta":''' | ||
1. keep Zimbra Desktop should be running | 1. keep Zimbra Desktop should be running | ||
2. Open Zimlet Installer.hta and browse to the Zimlet zip file | 2. Open Zimlet Installer.hta and browse to the Zimlet zip file | ||
3. Hit Deploy | 3. Hit Deploy | ||
- | - This will deploy the Zimlet and restarts Zimbra Desktop Service | ||
- You should see Zimlet after the restart. | |||
PS: When Zimlet is deployed, it gets registered in ldap and also the Zimlet files are unzipped and copied to <zdesktop>\jetty\webapps\service\Zimlet. | PS: When Zimlet is deployed, it gets registered in ldap and also the Zimlet files are unzipped and copied to <zdesktop>\jetty\webapps\service\Zimlet. | ||
Undeploying: | '''Undeploying:''' | ||
1. keep Zimbra Desktop should be running | 1. keep Zimbra Desktop should be running | ||
2. Open Zimlet Installer.hta and enter Zimlet's handler name like: com_Zimbra_test in the undeploy field | 2. Open Zimlet Installer.hta and enter Zimlet's handler name like: com_Zimbra_test in the undeploy field | ||
3. Hit UnDeploy | 3. Hit UnDeploy | ||
-- this will UnDeploy the Zimlet and restarts Zimbra Desktop Service | -- this will UnDeploy the Zimlet and restarts Zimbra Desktop Service | ||
Line 67: | Line 74: | ||
You will have to run java command to install and uninstall.. | You will have to run java command to install and uninstall.. | ||
Deploy | '''Deploy Zimlets''' | ||
1: CD to zdesktop install folder | 1: CD to zdesktop install folder | ||
2. Run the following java command... | 2. Run the following java command... | ||
java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil deploy <PATH to Zimlet.zip file>/com_Zimbra_hello.zip | java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil deploy <PATH to Zimlet.zip file>/com_Zimbra_hello.zip | ||
Line 81: | Line 89: | ||
Undeploy Zimlet: | '''Undeploy Zimlet:''' | ||
1. CD to zdesktop install folder | 1. CD to zdesktop install folder | ||
2. java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy <JUST-THE-Zimlet-HANDLER-NAME-WITHOUT-DOTZIP> | 2. java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy <JUST-THE-Zimlet-HANDLER-NAME-WITHOUT-DOTZIP> | ||
java -cp jetty/lib/log4j-1.2.8.jar:jetty/common/lib/commons-httpclient-3.0.jar:jetty/common/lib/mail.jar:jetty/common/lib/commons-logging.jar:jetty/common/lib/commons-codec-1.3.jar:jetty/common/lib/json.jar:jetty/common/lib/dom4j-1.5.jar:jetty/common/lib/Zimbracommon.jar:jetty/webapps/service/WEB-INF/lib/Zimbrastore.jar -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy com_Zimbra_hello | java -cp jetty/lib/log4j-1.2.8.jar:jetty/common/lib/commons-httpclient-3.0.jar:jetty/common/lib/mail.jar:jetty/common/lib/commons-logging.jar:jetty/common/lib/commons-codec-1.3.jar:jetty/common/lib/json.jar:jetty/common/lib/dom4j-1.5.jar:jetty/common/lib/Zimbracommon.jar:jetty/webapps/service/WEB-INF/lib/Zimbrastore.jar -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy com_Zimbra_hello | ||
Note: For undeploying just use the Zimlet-handler-name (not the path and also dont include .zip) | Note: For undeploying just use the Zimlet-handler-name (not the path and also dont include .zip) | ||
3. Shutdown Zimbra Desktop Service and start it | |||
PS: There is a server bug that causes undeployer not to delete Zimlet files in <zdesktop>\jetty\webapps\service\Zimlet folder. It wont hurt, but you can manually delete it if need be. | PS: There is a server bug that causes undeployer not to delete Zimlet files in <zdesktop>\jetty\webapps\service\Zimlet folder. It wont hurt, but you can manually delete it if need be. | ||
Revision as of 18:59, 10 March 2009
Zimlet Development Via Zimbra Desktop
Zimbra Desktop Configuration
1. Download Zimbra Desktop http://www.Zimbra.com/products/desktop_download.html
2. Install Zimbra desktop to C:\zdesktop or some easy to reach location.
3. Configure your Zimbra Desktop with a dummy/test gmail or yahoo account.
(PS: Steps 4 & 5 can be skipped once Zimbra Desktop goes RC2(build 1513) or later, currently it is RC1(build 1482) 4. Configure Zimbra Desktop to permit Zimlets
Open localconfig.xml in <installDirectory>\conf\localconfig.xml
And replace..
<key name="zdesktop_installation_key"> <value>[CURRENT_VALUE]</value> </key>
with..
<key name="zdesktop_installation_key"> <value>[CURRENT_VALUE]</value> </key> <key name="Zimbra_ldap_password"> <value>[CURRENT_VALUE]</value> </key>
.. [CURRENT_VALUE] is whatever key Zimbra Desktop generated and should be same for both "zdesktop_installation_key" and "Zimbra_ldap_password"
5. Restart Zimbra Desktop (Right click on system tray icon and click ShutDown Service, and then start Zimbra Desktop again)
Deploying and undeploying Zimlets (only production level Zimlets that are ready-to-go. For Zimlet development, see "DEVELOPMENT HACKS or TIPS" section below)
Windows:
In windows you can use a simple tool called "Zimlet Installer.hta" to deploy and undeploy Zimlets. If you dont have access to this, then follow http://www.zimbra.com/forums/zimlets/24640-solved-deploying-zimlet-zimbra-desktop-2.html#post124862 AND also make sure to Restart-Zimbra service after the deploy/undeploy.
Deploying Zimlets via "Zimlet Installer.hta": 1. keep Zimbra Desktop should be running
2. Open Zimlet Installer.hta and browse to the Zimlet zip file
3. Hit Deploy - This will deploy the Zimlet and restarts Zimbra Desktop Service - You should see Zimlet after the restart.
PS: When Zimlet is deployed, it gets registered in ldap and also the Zimlet files are unzipped and copied to <zdesktop>\jetty\webapps\service\Zimlet.
Undeploying:
1. keep Zimbra Desktop should be running
2. Open Zimlet Installer.hta and enter Zimlet's handler name like: com_Zimbra_test in the undeploy field
3. Hit UnDeploy -- this will UnDeploy the Zimlet and restarts Zimbra Desktop Service -- You should see Zimlet after the restart.
PS: There is a server bug that causes undeployer not to delete Zimlet files in <zdesktop>\jetty\webapps\service\Zimlet folder. It wont hurt, but you can manually delete it if need be.
MacOSX:
You will have to run java command to install and uninstall..
Deploy Zimlets 1: CD to zdesktop install folder
2. Run the following java command... java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil deploy <PATH to Zimlet.zip file>/com_Zimbra_hello.zip example: java -cp jetty/lib/log4j-1.2.8.jar:jetty/common/lib/commons-httpclient-3.0.jar:jetty/common/lib/mail.jar:jetty/common/lib/commons-logging.jar:jetty/common/lib/commons-codec-1.3.jar:jetty/common/lib/json.jar:jetty/common/lib/dom4j-1.5.jar:jetty/common/lib/Zimbracommon.jar:jetty/webapps/service/WEB-INF/lib/Zimbrastore.jar -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil deploy ~/Y/Zimlets/com_Zimbra_hello.zip
3. Shutdown Zimbra Desktop Service and Start it
PS: When Zimlet is deployed, it gets registered in ldap and also the Zimlet files are unzipped and copied to <zdesktop>\jetty\webapps\service\Zimlet.
Undeploy Zimlet: 1. CD to zdesktop install folder
2. java -cp <required jar files> -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy <JUST-THE-Zimlet-HANDLER-NAME-WITHOUT-DOTZIP> java -cp jetty/lib/log4j-1.2.8.jar:jetty/common/lib/commons-httpclient-3.0.jar:jetty/common/lib/mail.jar:jetty/common/lib/commons-logging.jar:jetty/common/lib/commons-codec-1.3.jar:jetty/common/lib/json.jar:jetty/common/lib/dom4j-1.5.jar:jetty/common/lib/Zimbracommon.jar:jetty/webapps/service/WEB-INF/lib/Zimbrastore.jar -DZimbra.config=conf/localconfig.xml com.Zimbra.cs.Zimlet.ZimletUtil undeploy com_Zimbra_hello Note: For undeploying just use the Zimlet-handler-name (not the path and also dont include .zip)
3. Shutdown Zimbra Desktop Service and start it PS: There is a server bug that causes undeployer not to delete Zimlet files in <zdesktop>\jetty\webapps\service\Zimlet folder. It wont hurt, but you can manually delete it if need be.
Zimlet Development by manually building ZCS Environment
- You'll need ZCS 3.0 or later, either Network or Open Source Edition.
- JDK 5
- Eclipse or other editors you are familiar with.
- Apache Ant for building example Zimlets bundled with ZCS source code. You can use the existing build.xml and just add your own zimlet for easy building and deployment.
- zip / unzip utility. Most Linux distributions come with /usr/bin/zip and /usr/bin/unzip. Windows XP has a built-in support for zip, but you can also use open source zip utilities like 7-Zip.