Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 30th September 2012, 12:47
stefanmcds-mnt stefanmcds-mnt is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default IPSCONFIG 3 Multiserver - No replicate

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?
Reply With Quote
Sponsored Links
  #2  
Old 30th September 2012, 19:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th September 2012, 19:46
stefanmcds-mnt stefanmcds-mnt is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I use ispconfig class not remote api so the query are directly to database

$app->db->query($sql)

Last edited by stefanmcds-mnt; 30th September 2012 at 19:49.
Reply With Quote
  #4  
Old 30th September 2012, 23:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 1st October 2012, 08:59
stefanmcds-mnt stefanmcds-mnt is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #6  
Old 1st October 2012, 10:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 1st October 2012 at 10:11.
Reply With Quote
  #7  
Old 2nd October 2012, 18:05
stefanmcds-mnt stefanmcds-mnt is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you explain an example to use remote internal function
Reply With Quote
  #8  
Old 3rd October 2012, 12:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migration from old multiserver to new multiserver johjoh2k Server Operation 0 11th July 2012 05:48
Multiserver setup mail() problem DKLeader Installation/Configuration 5 3rd July 2012 16:13
Multiserver with only two server xsas Installation/Configuration 2 25th March 2012 14:39
Installer in multiserver setup. CSsab Installation/Configuration 1 22nd November 2011 09:15
Multiserver setup design documentation agoston Developers' Forum 4 4th June 2009 13:53


All times are GMT +2. The time now is 07:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.