This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HOW-TO]Creating your own 'zppy' repository
#1
[HOW-TO]Creating your own 'zppy' repository
Creating your own ‘zppy’ repository
Written by Bobby Allen
Reviewed by Cantalupo
Revision: 2.0.0
Update November 29, 2014.


What is zppy?
Pronounced ‘zz-­‐ei-­‐p’ (zippy) is a command line utility developed by Bobby Allen to enable ZPanel administrators  to  install,  upgrade  and  remove  modules  (Zpanel  .zpp  packages).
The zppy client is based upon various Linux package manager command line tools like aptitude and yum. The commands are kept similar so that new users with Linux knowledge should find it familiar.


The benefits of creating your own ‘zppy’ repository
As a developer, the benefits of running your own zppy repository is mainly that you can keep all your module packages in one place and that by using .zpp files to distribute your modules and upgrades you can ensure that your modules automated installation should be flawless.
As a user of your modules having a zppy repository that your customers or users can configure to use, means they have an easy and automated way of installing your modules and performing upgrades.


How to create your own ‘zppy’ repository
To create your own zppy repository you need to do is to create a domain or sub-­domain (for example, packages.mycompany.com), this domain or sub-­domain is what your users will add to their local repository list using the
Code:
zppy repo add {fqdn}
Eg.  
Code:
zppy repo add packages.mycompany.com

Now you have the domain or sub-­domain created and a web server is configured at the address the only other thing you need is a file on the root of that website called ‘packages.txt’ this file should contain a list (line separated list) of all the packages that the server will serve to a
Code:
zppy install
or
Code:
zppy upgrade
request.

Here is an example:
[Image: ZjxXxGQ.png]
So (using the example packages.txt file above) on the server (the root of the
http://packages.mycompany.com/ directory) the following Zpanel packages (files) should exist:
  • zantastico.zpp
  • zantastico_admin.zpp
  • faq_editor_x.zpp
  • group_manager.zpp
  • theme_manager_deluxe.zpp

You can also have other .zpp files exist on in your packages repository however if they are not included in the packages.txt file as a security feature the user will not be able to install them using the zppy client.
The .zpp files and the package.txt file must be in the root of the domain or sub-domain for the repository to be setup and work correctly.


Keeping your packages.txt file up to date
You can either keep this up to date manually (edit the package file by hand every time you add a  new package to your server) or you could create a script to create the file on the fly (using PHP, ASP, JSP or another dynamic scripting language or even a scheduled batch or shell script!)


How to connect and use your repository for installing and upgrading modules.
A user simply has the run the zppy client with the following command:
Code:
zppy repo add packages.mycompany.com

Then the user needs to obtain the package list from your server, they do this by refreshing their zppy-­cache package list, they do this by running the following command:
Code:
zppy update

The finally they can then install any of your module packages using the install command like so:
Code:
zppy install your-module-name

and just as easy as they installed your module, they can upgrade it too using this command:
Code:
zppy upgrade your-module-name

Although the following command doesn’t require communication with your repository, its good for users to know that they can also remove your module from their server using this command:
Code:
zppy remove your-module-name
Reply
Thanks given by:


Messages In This Thread
[HOW-TO]Creating your own 'zppy' repository - by Cantalupo - 11-29-2014, 01:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)