FYI PIAF on Docker?

Baylink

Guru
Joined
May 9, 2009
Messages
75
Reaction score
3
This is probably a better place than twitter for me to ask this... :)

I'm about to march resolutely into the new devops world, and it's likely part of our target stack will be Docker over OpenStack. While I know I can just run PIAF in a VM on OpenStack (or the VMM under it), I'm wondering if the idea of fitting PIAF into a Docker container has ever been mooted in public?

(If so, don't let on; mooting your ideas in public is illegal in at least 13 states.)
 

vic555

Member
Joined
Aug 24, 2014
Messages
76
Reaction score
14
asterisk has an image on the docker repository, so I was going to ask the same question
 

vic555

Member
Joined
Aug 24, 2014
Messages
76
Reaction score
14
Vagrant 1.6 is now docker enabled (standard), and has many prebuilt boxes, i.e., http://www.vagrantbox.es/ including many builds of Ubuntu and CentOS , with the appropriate VirtualBox, VMware, KVM etc.
 

hecatae

resident hecatae
Joined
Feb 7, 2014
Messages
760
Reaction score
199
Xivo have a Docker image already lined up and waiting: https://github.com/sboily/xivo-docker
If you have not heard of Xivo, they are backed by Avencall, gpl and asterisk gui see http://wiki.xivo.fr

Docker used to have issues with RTP ports, but that has been fixed in recent releases.
It would be nice to see an Pbx in a Flash based on Xivo.
 

marcb

New Member
Joined
Feb 9, 2015
Messages
1
Reaction score
1
I was looking for a dockerfile to run incredible pbx / freepbx and couldn't find one (its how i found this thread) so I had a go at making one myself a good way to learn more about Docker i thought, so I started with freepbx which is now building and running OK:

https://github.com/Brownster/asterisk-freepbx

https://registry.hub.docker.com/u/brownster/freepbx12021/

I will upload the incredible pbx version here:

https://registry.hub.docker.com/u/brownster/incredible-pbx/

when its finished hopefully over the weekend
 

vic555

Member
Joined
Aug 24, 2014
Messages
76
Reaction score
14
Xivo have a Docker image already lined up and waiting: https://github.com/sboily/xivo-docker
If you have not heard of Xivo, they are backed by Avencall, gpl and asterisk gui see http://wiki.xivo.fr

Docker used to have issues with RTP ports, but that has been fixed in recent releases.
It would be nice to see an Pbx in a Flash based on Xivo.

Xivo.fr looks awesome, but it is a windows based platform.

Docker can now apparently be used on windows 7.1 and 8 as a vm, but where would PIAF fit in? Running on a windows docker? With xivo.fr? I am not sure of any advantage, but I need to check it out.

the questions are endless. But then so are the possibilities.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
For those of us that haven't (yet) played with Docker, perhaps someone could explain what it adds to our current mix of features and dev tools. As a development platform, what can it do that we can't already do with a platform such as Digital Ocean (less than a penny an hour) or VirtualBox (free on any desktop)? Would you actually run a production system under Docker? Not being critical. Just trying to understand what Docker brings to the table.
 

Dave Gray

Guru
Joined
May 22, 2013
Messages
150
Reaction score
60
As I see it, Docker doesn't bring much to small scale development oriented projects (like, uh, this one.)
Docker is a system based on containers (e.g., Wable).
It's meant for people that need to run hundreds of copies of a server - it lets you set up a "reference implementation", then you can copy it wholesale to a bunch of machines (say, in a cloud.) Since you're building everything in one box, there are no issues of A won't play with rev 1.2.56.9 of B - you build it all in, at once. Then you dup it over and over. You're supposed to automate the actual configuration of each individual server (see puppet, or maybe chef).
The idea is, you build small. An application that has a web server, and maybe a database, maybe some kind of processing in between used to be built on one host. Now, you make a separate server for each function, and deploy en-mass. If you're running out of horsepower on your web server(s), you just spin up some more. You never upgrade a server, you build a new container with the updated software, then start spinning up the new containers, and destroying the old ones. Servers (containers) are not expected to be long lived, and you don't store state on them - they're supposed to be interchangeable components.
I (personally) don't see this as being really useful for small, one off deployments. The whole concept seems to be aimed at cloud computing, where you have hundreds of servers on-demand, then kill them as demand fluctuates. Or spin up new copies.
 

ZachG

New Member
Joined
Jan 7, 2015
Messages
15
Reaction score
3
The way i see it, docker could do a lot to reduce the barrier of entry, and eliminate a lot of install issues. it reduces an entire install to a single line of code.

Here is an example to install sonarr, a tv show auto-downloader.

docker run -d \
--name sonarr \
-p 8989:8989 \
-e PUID=1050 -e PGID=1050 \
-v /dev/rtc:/dev/rtc:ro \
-v /opt/data/service/configs/sonarr:/config \
-v /opt/data/media/tv:/tv \
-v /opt/data/service/torrent:/torrent \
linuxserver/sonarr

In about 30 secs, i can access the web interface at http://IPADDRESS:8989
if i have an issue, i can blow it away with a simple "docker stop sonarr && docker rm sonarr". nothing is installed or changed on the host. The docker is mounting a config dir on the host, so i can blow it away, change the run command a little, and restart it. no data loss, and if i want to keep the same config, there is no need to reconfigure.

Docker also lets you use any base os for the docker image, regardless of what the host os is. CentOS container with Ubuntu host os, NO PROBLEM!
There could be some benefits to having a separate asterisk container, so you can reset asterisk without touching the freepbx docker.

You can also use docker almost like a vm, and run a full system inside. Which can help with testing.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@ZachG: We released a new OVF Template for VMware and VirtualBox just this week. It lets you spin up a virtual machine in a couple of minutes. What does Docker add that the existing VM solutions don't already provide?? Based upon the @Dave Gray analysis above (and now below), I'm not sure that the Docker concept of separate containers for separate components would even work. Removing/replacing Asterisk, Apache, FreePBX, MySQL, and any number of other components would almost certainly break stuff in an irreparable kind of way because of the tight integration between the various components.

By way of example, let's take the FreePBX GPL modules. They store stuff in 100+ MySQL tables plus many of the /etc/asterisk config files (even though some are reserved for personal administrator settings), plus 100+ directories in the /var/www/html/admin tree, plus scattered config files and executables spread over the rest of your server. It would be virtually impossible to drop in a new version of FreePBX without damaging your existing setup because configuration code is intertwined with executable code all over the place.
 
Last edited:

Dave Gray

Guru
Joined
May 22, 2013
Messages
150
Reaction score
60
What I've seen of docker (we're kinda headed that way here at my day job) is that it is built on the premise that you're not keeping a whole lot of configuration in a container. They're supposed to take a minimal amount of config, that tells the module what its place in the world is, then anything detailed would come from a database, or the like. In other words, the container itself keeps only minimal state, since it's subject to being destroyed at any time due to load fluctuations, or if there's an upgrade, or it appears to be not functioning correctly...

Our issue, is we keep a hell of a lot of state. In several places. Yeah, most of FreePBX's data is in the database, but look at how much of an Incredible install, is in various custom config files.

The whole idea of docker, is you don't spend any effort on an individual container, once the developer has built it. Containers are personalized when they are instantiated, by an automated process. Docker is all about computing at scale, where you have a Really Big app, and need both scalability and flexibility. If you really want to run a Docker setup on your PC, well, go for it. But, it wasn't really designed for small scale ops. You're way better off going with a VM style approach (which, Docker really isn't).
 

bcmike

New Member
Joined
Aug 15, 2008
Messages
17
Reaction score
8
Let me start by saying I don't know anything about docker, however I do know a lot about hypervisors, especially Xen and I know that you can't really take a larger system to production on any hypervisor without weird trade offs that don't really work. The problem is, as it always is that the timing sources become inaccurate as you scale. Now I've tried a million things to get around this including direct pass through for timing devices to virtual machines and nothing really works (Although I'm all ears if anyone's found something).

With that in mind that's why containers are starting to peak my interest. As I said I'm not sure how docker works, but if I could successfully jail multiple instances of PIAF that would be an awesome start. I'd the start load testing and see how contention for the clock worked out.
 

Dave Gray

Guru
Joined
May 22, 2013
Messages
150
Reaction score
60
I will say our experience is a bit... different. We use a whole slew of different virtualization methods. For Solaris (mostly on M5000's these days) we use containers, which works pretty well for us. In IBM/AIX boxen, we use LPARs extensively. For Linux, we're using RedHat on VMWare ESXi for pretty near all our machines (I do know of some databases and collection systems that run bare metal, but they're the exception.) (This is in 3 major data centers in the USA, and a whole bunch of smaller setups overseas.) Oh, and of course there's the Microsoft stuff, we use a whole bunch of SQL Server, that's almost all virtualized.

Right now, the powers-that-be are looking at using AWS which should be entertaining. Our workload is largely databases of various sizes - we sell data. We had at least one project that I work on, that was brought in-house from AWS - but that was a couple of years ago. Hopefully, it's all better now. I do know that being cloud-centric makes one look at open source DBs really really hard - just look at the mess that licensing Oracle in a cloud deployment buys you (of course, that could be said about *any* large Oracle deployment.)
 

KUMARULLAL

Guru
Joined
Feb 20, 2008
Messages
243
Reaction score
28
hi @Dave Gray. I have played with docker a year ago. I will have to revisit docker and play with it again to check a few ideas I have.
You are right on mentioning that multiple Docker image of the same linux ditro or many different distro on a base linux machine with docker engine installed can run simultaneosly. I have created docker images and from that image I have run multiple instances of docker, and connected to those instances to their bash shell using terminal of the base node. When you exit, bash shell of the container. you terminate the docker instance as well. However, I also remember you can run a docker image and exit the bash shell of the instance without terminating the docker instance. I have also shared a local directory (On the base system) with Docker images.
I have created multiple Apache web servers inside a docker containers on different ports.
So for instance on container 1 apache is on port 80, container 2 the apche is on port 81 and so on.
I can access those apache servers from any desktop on a LAN using the IP address (example 192.168.1.10) of the base Linux distro on which all these docker instances running.
So http://192.168.1.10:80 will take me to container 1 likewise 192.168.1.10:81 will take me to container 2 and so on.
I see no reason why pbxinaflsh cannot be instilled inside a docker container. I have not tried it. However, I was wondering what happens to the whit list iptables inside containers.
Has anyone tried it?
@marcb, Thanks for uploading the docker image on github. I will try it out. I will have to brush up on my forgotten docker skills before that.
 
Last edited:

gordon

Member
Joined
Jun 7, 2013
Messages
96
Reaction score
7
Just wanted to chime in since this popped up in my searching. If this was available to deploy with docker it would be so much nicer. It is a generic way to deploy applications. It abstracts the host system details. It integrates with cloud providers. It also makes it easy to get a hello world demo up and running. Plus it would make updates as easy as "docker pull" or you can pin to specific versions. I've really come to enjoy working with docker.
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top