[BlueOnyx:07671] Re: cce tools
Michael Stauber
mstauber at blueonyx.it
Tue Jul 12 00:52:21 -05 2011
Hi Ernie,
> Billing programs like WHMCS, Modernbill, AWBS etc. have a custom server
> provisioning module, you have to modify it to do what you want. Typically
> that involves using curl to contact the BX server and exicute the cce shell
> commands. It would be nice if someone wrote a small daemon for BX that had
> an encrypted API we could call for prvisioning from a billing system.
I looked at that two or three years ago for another project that I had in
mind. It's possible to extend the GUI and CCE in a way that it would allow
this.
Basically the GUI would provide a specific URL like
https://<ip>:81/base/api/index.php which - if queried with the right strings -
would then perform specific actions such as creating sites and/or users.
It would also report back any errors that it did run into, or would provide an
indication about the sucess of the transaction.
Naturally this new method needs a certain degree of protection to make sure
that the mechanism doesn't get exploited. So it would only work via HTTPs,
would only accept input from a certain IP address and would require the
exchange of security tokens that are used instead of the usual admin user name
name and admin password.
The coding efforts and testing require about 8-10 days of work, with some
follow up hours to find and fix the last bugs that are found during deployment
and usage.
In the end I discarded the idea and just put it into my "would be nice to
have" folder of ideas.
Such provisions are also possible through SSH by using the shell-tools, which
requires a whole lot less effort to set up:
Just exchange SSH keys from the billing box to the BX server (root with no
password) and then use this command:
ssh root at your.bx-server.com /usr/sbin/caddvsite --domain=testing.com --
host=www --ipaddress=192.168.70.53 --enable-php --enable-cgi
That will login by SSH as root to "your.bx-server.com" and will execute the
command "/usr/sbin/caddvsite --domain=testing.com --host=www --
ipaddress=192.168.70.53 --enable-php --enable-cgi" there.
Which creates the vsite "www.testing.com" with the IP 192.168.70.53, where PHP
and CGI are enabled. To create a siteAdmin account for that site you'd
likewise run a similar command via SSH with the cadduser command instead.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list