Dockerising FusionPBX

DigitalDaz

Administrator
Staff member
This is more for me to remember but feel free to chip in.

So to do it correctly, in theory we need a container for each process:

Freeswitch
Nginx
PHP-FPM
Memcache
Postgres

We will need persistent storage for:

Postgres DB
FusionPBX web
/etc/freeswitch
/usr/share/freeswitch/scripts
/var/lib/freeswitch

Anything I have missed?
 
I still don't understand why docker is supposed to be better for anything in production not strictly just application layer. If you are mostly developing applications I see the advantages. To actually put something into production with a network stack it's a PiTA. You have to re-learn all the networking stuff to do it the docker way. So it's not as straight forward for general use compared to just using a VPS server where the network stack is already there and just works.
 

DigitalDaz

Administrator
Staff member
IT took a while for the docker penny to drop for me but I'm not advocating docker on a single machine, where it comes info its own is with something like swarm or kubernetes.
 
IT took a while for the docker penny to drop for me but I'm not advocating docker on a single machine, where it comes info its own is with something like swarm or kubernetes.
What would you use that for regarding VoIP? I had a look it and it looks to me like it is more for building microservices where you want to be able to scale out and you have teams of people working on it. Using search terms like freeswitch, asterisk, fusionpbx in combination with kubernetes didn't really come up with anything.
 
The headline in that video refers to Docker and CoreOS. He probably mentions using Kubernetes in there but I browsed through it and if he did mention it he must not have spent much time on it.

I understand what Docker is about more or less. Just not clear to me how Kubernetes would fit into that unless you are doing really really big stuff.
 
I watched that whole video. Not sure if I am sold on CoreOS but I understand things bit more. He is using "Fleet" in that video which was the CoreOS simpler alternative to Kubernetes. So then I did a search and found out that they discontinued Fleet and now recommend Kubernetes. So just goes to show how fast things can change.
 
I been working with AWS for a while now. I'm running a few switches myself. This sounds very plausible and big scale solution using AWS. Starting with the items you mentioned, I would run some of them in containers, but some in AWS managed services. Freeswitch, FusionPBX, and NGINX I would run in containers. However, I would use RDS for the databases. Run Aurora to be more specific and create an extra db for Fusionpbx in there. Also for the persistent storage, use EFS, this is true Shared File system that can be leverage. Finally we could use Kamilio I guess for SBC. A better approach would be using Service Discovery and Lambda to update SRV and hosname records within route53. One big issue I have though about is registration awareness. With my HA switches, I have accomplished this by creating multiple external profiles and acls. However, this is far from stateless and I dont have that much experience with freeswitch. If we could make a module that writes registrations info to a dynamo db within aws using the event_socket, we could technically have the switch query this high performance db before making the call and find where the extensions are. By the way this is an issue only if you try to call an internal extension. Finally once this is completed, it would be nice to integrate Terraform and Chef to do the deployments from S3 or a repo (y)
 
Last edited: