In the previous article in this series you learned how to develop a Z-Ray plugin. Once you feel your plugin is ready, you can share it with the entire community via the new Zend Server Plugin Gallery, or – deploy it on your Zend Server for easier management and handling.
This article describes how to package the plugin and prepare it for deployment on Zend Server or for submission into the gallery.
To follow the steps in this tutorial, you will need to do the following:
- Download, install, and launch Zend Server 8.5.x and above
- A finished Zend Server plugin. Click here to learn how to develop a Zend Server plugin.
Step 1 : Packaging your Plugin
A Zend Server plugin package is a simple compressed .zip file containing the plugin folders and files.
Once you’ve finished developing the plugin, make sure it’s constructed according to this plugin structure:
Plugins contain one, or both, of the following two folders:
- Z-Ray – contains the Z-Ray plugin files (zray.php, additional Z-Ray plugin files)
- Route – contains the Route plugin file (route.php)
The plugin end user license agreement.
The plugin readme file typically includes a description of the plugin, including details on the information displayed in the plugin and the popular use cases. Can be formatted using Markdown.
The plugin logo is the main logo for the plugin and is displayed in the Zend Server Gallery. This logo should not be confused with the Z-Ray plugin logo used in the added panels.
The plugin logo should be 50X50px.
The ‘deployment.json’ file describes the plugin content, and can contain all or some of the following parameters (please take that some are required):
|name||Yes||The name of the package. Try to be as unique as possible since this is the identifier of your package from now on. Lowercase is recommended.|
|display_name||Yes||The plugin’s display name, visible to users and in the online plugin gallery.|
|version||Yes||The version of the package.|
|type||Yes||Array of one or more of the following values: zray, route.|
|eula||No||Path to the end user agreement file, markdown supported.|
|readme||No||Path to the readme file, markdown supported.|
|logo||No||Path to the package logo file, transparent PNG is recommended.|
|dependencies||No||List of dependencies required by the plugin.|
Here’s an example of the ‘deployment.json’ file for the WordPress plugin we created in the previous article:
"name" : "wordpress",
"display_name" : "WordPress",
"version" : "1.0.0",
"name": "Zend Monitor"
The plugin file structure would look something like this:
Step 2 : Deploying your Plugin
Once your plugin package is ready, all you have to do is compress it into a .ZIP file and it’s ready to be either deployed in Zend Server or submitted to the Zend Server gallery.
To deploy the plugin in Zend Server:
- Access the Zend Server UI, and go to the Plugins | Manage Plugins page.
- Click the Deploy Plugin button, and complete the deployment steps as described here.
Once your plugin is deployed, you can manage it using Zend Server’s management features.
Step 3 : Submitting your Plugin to the Gallery
So, you’ve tested your plugin, and feel you’re at a stage where you’d like to share the goodness with the entire community? It’s time to submit your plugin to the Zend Server Plugin Gallery! By the way, if you do this before the 1st of Sep, you’ll be automatically participating in the Zend plugin contest.
But before we can publish your plugin and make it available for other Zend Server users in the Gallery, we need to get the plugin ready and test it. To do all this, we need some related data and information about the plugin first.
To submit this information to us, all you have to do is fill out this form.
Once the information is verified, the plugin will be uploaded to the Gallery and you’ll receive a notification.
That’s all there is to it!
The next article in the series will describe how to develop the second type of Zend Server plugins – a route plugin.