[Freeswitch-users] Docker or a traditional VM-based deployment?

Marcel Haldemann marcel.haldemann at convercom.ch
Tue Aug 11 07:57:21 UTC 2020


Hi,

Just my 2 Cents about FreeSwtich and Docker if you are interested in learning about Docker and single-machine Orchestration:

We are using Docker (put in Swarm-mode for orchestration (using Portainer for orchestration Web-GUI)) since many years with FreeSwitch without any issues. And I would not want to miss it for fast and uniform deployment.
We usually got to physical Machines both configured this way but independently (swram is enabled with 127.0.0.1 just to be able to use yml Files)
Very Important: As Sergey pointed out: you must use the –netork=host switch.
I also recommend to use bindmounts especially if you put postgres into Docker.

The more Detailed Answer if you are interested, else just ignore this:

About FreeSwitch and Docker and how we use it (we install any of our Software Solutions including the 3rdParty such as FreeSwitch and Postgres like this), and tbh I would want to miss it:

We use Docker as it makes managing the Software and Upgrading far more comfortable and easy/fast.

The way we do it:

- using Docker
- putting Docker into swarm Mode (with docker swarm init --advertise-addr 127.0.0.1)
- installing Portainer (docker stack deploy --compose-file portainer.yml portainer)

Then for all Software we deploy a so called stack, which means it's a yml file where all you need to install is defined.
This "all" is at least FreeSWITCH and Postgres (never run Freeswitch with the builtin-db in production!!!!).
For us it's another 20 docker images including nginx and our Controller that communicates with FreeSWITCH and several other pieces of the Software we develo.

The big advantage is: we can practically upgrade with one click to the latest software version for everything.
In our build tool all software is uploaded to a custom docker registry. (u just can ran your own docker registry with: https://hub.docker.com/_/registry)

!important! You will need to run Freeswitch in the Host Network Stack, this is done in the yml with:
    networks:
      - outside

!important! You must run the db with bindmounts (we use mindmounts for everything)

As bindmounts are used you got to create the directories in a batch prior to install the yml.

A big advantage: all config files are in one directory (we choose /var/lib/yourcompany/..)

See attached example files (in zip): portainer.yml install_docker_debian.sh fs_only.yml

Portainer has Web-Interface. First time you login you must select "local" and choose a user/password
You can then add the registry in portianer.
And then just add the Stack by copy-paste the yml.


Von: FreeSWITCH-users <freeswitch-users-bounces at lists.freeswitch.org> Im Auftrag von Sergey Safarov
Gesendet: Dienstag, 11. August 2020 08:49
An: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Betreff: Re: [Freeswitch-users] Docker or a traditional VM-based deployment?

For docker installation one recommendation.
Need use --network=host

On Tue, Aug 11, 2020 at 2:28 AM David Villasmil <david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>> wrote:
A Docker is just fine. Any cloud provider should work fine. The decision is more financial than technical given your setup.
Running fs and other dockers on the same box is another story and it also depends. Think about traffic, CPI, memory needed by all your services. And then decide what size of you need.

Really only testing will give you the right answer.

On Mon, 10 Aug 2020 at 21:09, Flavio Donadio <flavio at donadio.com.br<mailto:flavio at donadio.com.br>> wrote:
So... I guess no one is using FreeSWITCH with Docker?


> On 7 Aug 2020, at 14:06, Flavio Donadio <flavio at donadio.com.br<mailto:flavio at donadio.com.br>> wrote:
>
> Hello, all!
>
>
> I am deploying a small FreeSWITCH-based PBX for my business. It’s a really simple and light configuration: around 10 extensions, one SIP trunk, conferencing (audio only). call recording (user started), very simple IVR, fax reception… So simple that even I can do it myself! :D About performance: the most demanding scenario is 10 simultaneous calls, every single one being recorded.
>
> Since my business is going “officeless”, I will host this PBX in the cloud. I still haven’t chosen my cloud provider for this, but Azure looks tempting, as I’m already a Microsoft customer (Office 365). Other options are Amazon and Oracle...
>
> I’ve been reading a lot about containerization and, although I don't need most of the advantages provided by it, I will be hosting other apps (web-based internal business apps) through other mechanisms (microservices, serverless, etc.), so I thought: maybe a single VM, only for my little PBX, is overkill.
>
> Questions:
>
> 1. Is Docker hosting more cost-effective for FreeSWITCH?
>
> 2. Is there any other advantage, besides cost (and the inherent advantages of containerization, of course), in hosting a FreeSWITCH-based PBX in a container?
>
> 3. If not, what is the absolute minimum VM config I should use?
>
> Important: I don’t want to use a third-party service. I want to manage my own FreeSWITCH installation.
>
>
> Kind Regards,
> Flavio
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=jsVOC9bCAQ77vbdumUYw%2FGJBaq8xR2jegoB3UREqAlE%3D&reserved=0>
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time https://signalwire.community<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.community%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=Y61YkmswmdgMbXyxZ6nlv0ylKj6kbWgM%2Bigw69hxDw0%3D&reserved=0>
>
> Professional FreeSWITCH Services
> sales at freeswitch.com<mailto:sales at freeswitch.com>
> https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2Foss&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=l%2Bv9y5ZSw7RYj5Fzll0IgOTy9GNBCOGkuqLHASNloPM%3D&reserved=0>
> https://freeswitch.org/confluence<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.org%2Fconfluence&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=wcMSRKoLW4StsHIw9LdIX%2Fm0tD54HDh5J4SbQDqUIjw%3D&reserved=0>
> https://cluecon.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcluecon.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=YTLaqAS%2BwjKGeRu4m7B7Ft9nDnvOSVU68292trZBsIU%3D&reserved=0>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Flistinfo%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=hW%2FQd85TRXX5kGJ2j3Map1OAR0pd%2BFzlpPBeVcGtL0k%3D&reserved=0>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Foptions%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=V9b0xoBF0Z5iEf7iWbGBp2Xu8%2BHkJAWck9Oqazjo66Y%3D&reserved=0>
> https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>


_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=jsVOC9bCAQ77vbdumUYw%2FGJBaq8xR2jegoB3UREqAlE%3D&reserved=0>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.community%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=Y61YkmswmdgMbXyxZ6nlv0ylKj6kbWgM%2Bigw69hxDw0%3D&reserved=0>

Professional FreeSWITCH Services
sales at freeswitch.com<mailto:sales at freeswitch.com>
https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>

Official FreeSWITCH Sites
https://freeswitch.com/oss<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2Foss&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=l%2Bv9y5ZSw7RYj5Fzll0IgOTy9GNBCOGkuqLHASNloPM%3D&reserved=0>
https://freeswitch.org/confluence<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.org%2Fconfluence&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=wcMSRKoLW4StsHIw9LdIX%2Fm0tD54HDh5J4SbQDqUIjw%3D&reserved=0>
https://cluecon.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcluecon.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=YTLaqAS%2BwjKGeRu4m7B7Ft9nDnvOSVU68292trZBsIU%3D&reserved=0>

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Flistinfo%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=hW%2FQd85TRXX5kGJ2j3Map1OAR0pd%2BFzlpPBeVcGtL0k%3D&reserved=0>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Foptions%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=V9b0xoBF0Z5iEf7iWbGBp2Xu8%2BHkJAWck9Oqazjo66Y%3D&reserved=0>
https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>
--
Regards,

David Villasmil
email: david.villasmil.work at gmail.com<mailto:david.villasmil.work at gmail.com>
phone: +34669448337
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=jsVOC9bCAQ77vbdumUYw%2FGJBaq8xR2jegoB3UREqAlE%3D&reserved=0>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsignalwire.community%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=Y61YkmswmdgMbXyxZ6nlv0ylKj6kbWgM%2Bigw69hxDw0%3D&reserved=0>

Professional FreeSWITCH Services
sales at freeswitch.com<mailto:sales at freeswitch.com>
https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>

Official FreeSWITCH Sites
https://freeswitch.com/oss<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2Foss&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=l%2Bv9y5ZSw7RYj5Fzll0IgOTy9GNBCOGkuqLHASNloPM%3D&reserved=0>
https://freeswitch.org/confluence<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.org%2Fconfluence&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=wcMSRKoLW4StsHIw9LdIX%2Fm0tD54HDh5J4SbQDqUIjw%3D&reserved=0>
https://cluecon.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcluecon.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=YTLaqAS%2BwjKGeRu4m7B7Ft9nDnvOSVU68292trZBsIU%3D&reserved=0>

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Flistinfo%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=hW%2FQd85TRXX5kGJ2j3Map1OAR0pd%2BFzlpPBeVcGtL0k%3D&reserved=0>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Foptions%2Ffreeswitch-users&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=V9b0xoBF0Z5iEf7iWbGBp2Xu8%2BHkJAWck9Oqazjo66Y%3D&reserved=0>
https://freeswitch.com<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffreeswitch.com%2F&data=01%7C01%7Cmarcel.haldemann%40convercom.ch%7C83578d35a82c40d7806608d83dc5f281%7C7ce740fda23249b386211580d81623b0%7C0&sdata=eQB8dHvcWUxWtYS6%2Bg6UfQHYJynwLk9eQOXEt6Q74MM%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200811/7cff3ae5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: docker_dreeswitch_sample_configs.zip
Type: application/x-zip-compressed
Size: 3031 bytes
Desc: docker_dreeswitch_sample_configs.zip
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200811/7cff3ae5/attachment-0001.bin>


More information about the FreeSWITCH-users mailing list