Dockerising FusionPBX

Status
Not open for further replies.

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
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?
 

smn

Member
Jul 18, 2017
201
20
18
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
Sep 29, 2016
3,070
577
113
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.
 

smn

Member
Jul 18, 2017
201
20
18
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.
 

smn

Member
Jul 18, 2017
201
20
18
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.
 

smn

Member
Jul 18, 2017
201
20
18
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.
 

dannyztar

New Member
Jul 24, 2018
7
0
1
34
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:

Marginallysound

New Member
Jan 2, 2020
4
1
3
41
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?


Have you tried this in production? Did it work well with containerizing each process?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
I haven't really labbed it even that much the problem I think I hit last time was ingress for udp.
 

bcmike

Active Member
Jun 7, 2018
337
58
28
54
That is the holy grail of voip high availability, zero call drops during fail over! Also version control and tight automation are very cool benefits.

The flip side is that you're adding a lot of complexity. Having one thing go wrong could lead to cascading failures and a lot of tail chasing when trying to troubleshoot. It might be great if you're running with a big team and a lot of really good specialists but it might be less so if you're the only guy on call at 3:00 am trying to figure out which heartbeat service has failed.

I'm not saying it's not worth doing, the upside is phenomenal. What I am saying is that sometimes the more you over do the plumbing, the easier it is to stop up the drain.

P.S. I think the guy at Simwood does something similar with docker and internal BGP
 
  • Like
Reactions: Marginallysound
Status
Not open for further replies.