IPSCONFIG 3 Multiserver - No replicate

Discussion in 'General' started by stefanmcds-mnt, Sep 30, 2012.

  1. My setup is multiserver with the following architecture:
    - Master Server dedicated to the only use of ISPConfig
    - Web Server
    - Mail Server
    - Server DB

    I created a script that automatically creates the proforma billing module on the master server.
    This script also checks the expiry date and if the due date is less than today's date control and disable or delete the services that the customer has subscribed to.

    I have taken as an example the queries that are used for the remoting-client.

    However, the server employees are not automatically updated

    what is the correct procedure to use for you to be updated?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Does your script use the ISPConfig API to update the records or do you access the mysql database directly? To get data replicated in the cluster, all changes have been done trogh the ispconfig remote API.
  3. I use ispconfig class not remote api so the query are directly to database

    Last edited: Sep 30, 2012
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The query function affects only the local database, thats not the function to change any settings in the database that shall be replicated. If you want to use the local api, then you have to use the datalogInsert, datalogUpdate and datalogDelete functions. But the recommended way is to use the remote api as thats the only way to ensure that sour scripts eill work with the next ispconfig version.
  5. So I should use the remote API directly from ISPConfig master call using localhost?

    I think that it is not the concept for which they have been implemented with the remote API

    The same is true if you wanted to implement a module to simplify my management and then renderi public for the community releasing it under the GPL does not mean that this module will work for future versions of ISPConfig

    So if I wanted to give this script, made for the billing module, dispoinibile to the development team for the final implementation in future versions of release as I do?

    However, I will try to usarte functions datalog meanwhile wondering how I can do to use directly on the remote server ISPConfig master bees using localhost as the server and if they work with this configuration
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This depends on the kind of script you are writing. If the scrit is a intergated part of ispconfig, e.g. a module or plugin, then use the internal API. If its a external script, then use the remote api.

    If code is part of ispconfig and hosted in the svn server of the ispconfig project an released under the BSD license, then we take care that it works with future versions of ispconfig api. If you release it unser a dfferent license like GPL or host it elsewere, then you might have to take care yourself that your code works in a new version.

    Just a note as you mentioned the billing module above. Please dont mix up the billing module and ispconfig code, the billing module is not a part of the ispconfig open source version and none of the billing module code may be published.
    Last edited: Oct 1, 2012
  7. Can you explain an example to use remote internal function
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The remote functions are for external scripts as I explained in #6. Using them in internal scripts is possible of course but its not recommended, the usage is exactly the same then using them from external scripts. There are many examples in the ispconfig tar.gz file.

Share This Page