New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Looking for Automation Advice
agoldenberg
Member, Host Rep
in Help
So here's what I'm looking to achieve.
A customer orders a freepbx machine via WHMCS
On payment I'd like to spin up a configured machine ready to rock and be able to manage the machine, and it's firewall rules from WHMCS.
Is this achievable without writing a ton of code?
Comments
kubernetes! immutable! spinnaker!
Yeah I'm aware of those but that would involve a ton of code. I'm looking for something existing that maybe I could build on.
Maybe something where I can add placeholders in all the config files and then automate deploying a machine filling in all the placeholders.
Perhaps you could automate with some sort of prebuilt template and cloudinit? Use another server to build the initial configuration, and use cloudinit to download it, identifying itself with an UUID or IP address.
WHMCS -> Generate configuration -> Download Handler
VPS with FreePBX installed -> Cloudinit downloads configuration from the download handler -> Starts service
Seems like the easiest way to do it.
Worth exploring Docker. If for some reason you decide to deploy actual VMs then ufw would make it easy to create a GUI for the firewall.
Maybe rundeck/ansible would suit you
Can you be a bit more descriptive when you say "manage the machine" do you just mean reboot/boot/suspend?
What degree of firewall management is required? as it may be easier to write a first boot script and embed that in the VM so it pre configures the firewall on initial build.
So nothing pre created exists that is specific to freepbx to my knowledge but plenty of things could be adapted to your requirements, it may be worth looking at esx based provisioning modules for WHMCS as at least that way you can do some additional management on the vswitch.
Either way, without a ton of coding I am sure it could be done, but with 'minimal coding' no, not a chance.
@anthonysmith yes just basic VPS controls like boot / reboot / change hostname. That sort of minor stuff.
It would be nice to be able to manage the firewall in its entirety inside WHMCS but setting up basic allow / block rules would suffice.
@agoldenberg
This is something I've been interested in doing for a while. If you're up to it, I'd be honoured to help its development.
(Free of charge, of course)
@flamesrunner lets do it! Shoot me a PM with your skype details and we can figure it out.
Solus! I hear they're just about to come out with a new version...
I would expect you could start with a template VM which has FreePBX installed, then use something like Ansible to customize the FreePBX configuration. As you say, would require a fair amount of scripting to get it working just right.
@freerangecloud That looks like the way to go, I was only asking for little scripting because I thought maybe there was a shorter path, seems as though ansible will do what I need.
Yeah the image route is probably the easiest.