Kazoo Sandbox Docker

861 views
Skip to first unread message

Ben Carrasco

unread,
Dec 23, 2015, 6:43:24 PM12/23/15
to 2600hz-users

I created a Docker image, https://hub.docker.com/r/carrasco/kazoo-sandboxthat includes the following features:


- Updated to Kazoo version 3.22
- Monster UI (with legacy Kazoo-UI to provide missing features)

- Bash Completion for SUP

- OpenVPN with DNS masquerading to support dynamic IP address assignment

- Can be used "offline"


Suggested Uses:

-Development Environment

-Lab

-Demos


Shell script with recommended Docker RUN syntax:
https://gist.github.com/bencarrasco/77c607a9f1aa23d42cd9


OpenVPN client configuration:
https://gist.github.com/bencarrasco/e88d4a684271969884be


Note(s):

The hostname is used for the dnsmasq configuration and Kazoo realm but can be changed at run time using the "-h" parameter.

The KEY variable is used for the Erlang Cookie shared by all apps, the Kazoo "master" account, and the "kazoo-sandbox" system account but can be changed at run time using the "-e" parameter.


Hostname: kazoo-sandbox.localhost.com


Default Kazoo admin account:

Username: master
Account: master
Realm: kazoo-sandbox.localhost.com
Password: BBVUOGTJAJJSIRSBXSGX


OpenVPN user authentication:
Username: kazoo-sandbox
Password: BBVUOGTJAJJSIRSBXSGX


Note: Hostname and Passwords can be changed at runtime. for more info, checkout:
https://gist.github.com/bencarrasco/77c607a9f1aa23d42cd9


Monster UI URLs (can be found at any of the following):
http://kazoo-sandbox.localhost.com:8080/
http://kazoo-sandbox.localhost.com:8080/monster-ui
http://kazoo-sandbox.localhost.com:8080/latest
http://kazoo-sandbox.localhost.com:8080/unstable


Kazoo UI URLs (can be found at any of the following):
http://kazoo-sandbox.localhost.com:8080/admin
http://kazoo-sandbox.localhost.com:8080/kazoo-ui
http://kazoo-sandbox.localhost.com:8080/legacy
http://kazoo-sandbox.localhost.com:8080/stable


Exposed Port(s):

16384-16424/udp (FreeSWITCH/RTP ports for 20 calls)
5060-5061/tcp (Kamailio/SIP)
5060-5061/udp (Kamailio/SIP)
11000-11001/tcp (FreeSWITCH/SIP)
11000-11001/udp (FreeSWITCH/SIP)
8080/tcp (HTTP - for Monster-UI and Kazoo-UI)
2022/tcp (SSH)
22022/tcp (OpenVPN)
8000/tcp (Kazoo/API)


Darren Schreiber

unread,
Dec 23, 2015, 6:46:30 PM12/23/15
to 2600hz...@googlegroups.com
This is awesome-ness.

I wonder if we can somehow post this tutorial somewhere

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tabi Tabe

unread,
Mar 7, 2016, 4:10:13 AM3/7/16
to 2600hz-users
Ben,

This is brilliant. We are working on alternative container and this will help. Will share the instruction as well once completed.

Tabi

Joe Black

unread,
Mar 20, 2016, 12:21:43 AM3/20/16
to 2600hz-users
I've created a set of docker containers for kazoo as well. 

They're not necessarily ready for prime-time though, but if anyone is interested in seeing how we're doing things, each image has a github repo associated with it.  

These images are designed to run under kubernetes as a cluster manager by default but almost everything is configurable through the environment variables.  Eventually we'd like to move everything to containers built off of alpine linux.  A few already are :)  If you're using kubernetes as a cluster manager they're all self configuring as well. :)

Rostyslav

unread,
Apr 7, 2016, 7:09:36 AM4/7/16
to 2600hz-users
Hello Joe,

I'm trying to run the kubernetes deployment, you have created here: https://github.com/sip-li/docker-kazoo/kubernetes/ 

But when I deploy I get the error:

for ecallmgr:

Unable to mount volumes for pod "ecallmgr-3zofs_default(1bceae68-fca0-11e5-ab01-080027faa9e4)": secrets "erlang-cookie" not found
Error syncing pod, skipping: secrets "erlang-cookie" not found

for whapps:

Unable to mount volumes for pod "whapps-pvwnx_default(79b54839-fca0-11e5-ab01-080027faa9e4)": secrets "erlang-cookie" not found

Could you please point me, how to create these additional volumes?

Joe Black

unread,
Apr 7, 2016, 1:26:33 PM4/7/16
to 2600hz-users
Hey,

Glad to hear you're checking out the images we created.  Especially in kubernetes.  

What you need to do is create a secret manifest using the instructions here:  http://kubernetes.io/docs/user-guide/secrets/

You can use the following template to create the secret

apiVersion: v1
kind: Secret
metadata:
  name: erlang-cookie
type: Opaque
data:
  cookie: [insert base64'd erlang cookie value here]

then create it:

kubectl create -f erlang-cookie.yaml

Let me know if you have any other questions about it..

Joe Black

unread,
Apr 7, 2016, 2:26:55 PM4/7/16
to 2600hz-users
Also, you may already know this. But I recommend creating all the services's before you create the deployments, this is striclty a kubernetes thing, but when a container is created it's injected with some really handy environment variables taht tell it the ports and ip addresses of services.  Most of these images use the dns addon, you'll need to use v11 for the dns so that it supports pod dns.

For some images that use alpine, you will need to create a file on each kubernetes node. I create it in /etc/kubernetes/resolv.conf

with the following contents, be sure to replace the placeholders:

nameserver 127.0.0.1

nameserver ${IP OF KUBERNETES DNS SERVICE HERE}

nameserver ${HOST DNS SERVER 1}

nameserver ${HOST DNS SERVER 2}

search default.svc.cluster.local svc.cluster.local default.pod.cluster.local pod.cluster.local cluster.local kube-system.svc.cluster.local kube-system.pod.cluster.local

options ndots:5

* the search entries above are really important to making the dns short names work in kubernetes properly
 
Then to use this file as the base for each containers resolv.conf file, add the following flag to the kubelet.service systemd unit on each node:
--resolv-conf=/etc/kubernetes/dns/resolv.conf


After all services are created you can test dns in any of the containers that contain dig using:

dig +search +short [service-name]


Let me know what you think, I think running kazoo in kubernetes is a beautiful thing.  The tag based service load balancers and the quality of service additions are really great.




On Thursday, April 7, 2016 at 7:09:36 AM UTC-4, Rostyslav wrote:

Dmitriy Cheremnov

unread,
Sep 22, 2016, 12:22:31 PM9/22/16
to 2600hz-users
You are doing important work!
Please provide instructions for installing the Kazoo 4 in containers!

Roman Galeev

unread,
Sep 22, 2016, 12:28:18 PM9/22/16
to 2600hz-users

On Thu, Sep 22, 2016 at 6:21 PM, Dmitriy Cheremnov <d.che...@gmail.com> wrote:
You are doing important work!
Please provide instructions for installing the Kazoo 4 in containers!

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
With best regards,
     Roman Galeev,

Dmitriy Cheremnov

unread,
Sep 25, 2016, 9:46:19 AM9/25/16
to 2600hz...@googlegroups.com
Cool!
I am trying to install. Not found file:
/monster-ui/build/setup-private.sh

Tell me, please, what should be in the file
setup-private.sh

With best regards,
Dmitriy Cheremnov

--
You received this message because you are subscribed to a topic in the Google Groups "2600hz-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/2600hz-users/dHrydm61Ejc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 2600hz-users+unsubscribe@googlegroups.com.

Roman Galeev

unread,
Sep 26, 2016, 7:38:27 AM9/26/16
to 2600hz-users
You can safely ignore it, it just installs some internal monster-ui applications.

vakninvak

unread,
Sep 26, 2016, 7:38:27 AM9/26/16
to 2600hz-users
Wow!
Very nice work Roman.
I have the same issue as Dmitriy, I executed the build script but when executing run.sh I get the following output:
Error response from daemon: network with name kazoo already exists
rabbitmq.kazoo
rabbitmq.kazoo
c4e9628aab53bb2bca247fcb5ee87c5d4971ea4d0e1feb7f2f1ccc30bf29ab1f
couchdb.kazoo
couchdb.kazoo
1bcfc05f6e48a2342fd10efba85e5e0cbe94b95b09ff437c56a432a34aa0ac20
Error response from daemon: No such container: kamailio.kazoo
Error response from daemon: No such container: kamailio.kazoo
Unable to find image 'kazoo/kamailio:latest' locally
Pulling repository docker.io/kazoo/kamailio
docker: Error: image kazoo/kamailio:latest not found.
See 'docker run --help'.
freeswitch.kazoo
freeswitch.kazoo
d938b59083f31d1b36bbd68d5a5d156d47d15e478ab23302f5641746a99c8609
kazoo.kazoo
kazoo.kazoo
70c0fc934608601b20bac8d1c15ecd0ff33debfd08dcaf0f5ba6ad9b89ebcc32
Error response from daemon: No such container: monster-ui.kazoo
Error response from daemon: No such container: monster-ui.kazoo
Unable to find image 'kazoo/monster-ui:latest' locally
Pulling repository docker.io/kazoo/monster-ui
docker: Error: image kazoo/monster-ui:latest not found.
See 'docker run --help'.
kazoo-ui.kazoo
kazoo-ui.kazoo
0f88aa53b130ce045dda2306a9216e47984e69d0b50f204a90c0fb73db0d173c
carrier-sink.kazoo
carrier-sink.kazoo
f4849d60ac1dfc4e4e294350581cef2eecb8f62d7024c407163a1f3705bb166c

I've noticed that the kamailio failed to install and also the same error with monster-ui.

Please advise,
Yaniv

On Sunday, September 25, 2016 at 4:46:19 PM UTC+3, Dmitriy Cheremnov wrote:
Cool!
I am trying to install. Not found file:
/monster-ui/build/setup-private.sh

Tell me, please, what should be in the file
setup-private.sh

With best regards,
Dmitriy Cheremnov
2016-09-22 23:26 GMT+07:00 Roman Galeev <jam...@gmail.com>:
On Thu, Sep 22, 2016 at 6:21 PM, Dmitriy Cheremnov <d.che...@gmail.com> wrote:
You are doing important work!
Please provide instructions for installing the Kazoo 4 in containers!

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
With best regards,
     Roman Galeev,

--
You received this message because you are subscribed to a topic in the Google Groups "2600hz-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/2600hz-users/dHrydm61Ejc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 2600hz-users...@googlegroups.com.

Roman Galeev

unread,
Sep 26, 2016, 8:13:55 AM9/26/16
to 2600hz-users
I've updated build scripts for kamailio and monster-ui, please checkout and build images:
cd monster-ui ; ./build.sh
cd kamailio ; ./build.sh
or you can just run ./build.sh from repo root.

To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vakninvak

unread,
Sep 26, 2016, 10:28:36 AM9/26/16
to 2600hz-users
Thanks, looks much better !
The kamailio fails to start, I managed to test it manually(by removing the -td flag) and I saw that it's because of a config file:
error at /etc/kamailio/local.cfg line 10: '-' not allowed 
The build process of the kamailio looks fine so I guess that it's one of the starting scripts, can you help solving this small issue?

Thanks,
Yaniv 

vakninvak

unread,
Sep 26, 2016, 10:43:00 AM9/26/16
to 2600hz-users
And another thing, the sup command is not working, not inside that container (kazoo) or from the kazoo folder.
I'll be more than happy to help fixing those issues, at least the ones that I have relevant knowledge, like the script and docker, the sup and other kazoo internals are new for me....

Yaniv


On Monday, September 26, 2016 at 3:13:55 PM UTC+3, Roman Galeev wrote:

Roman Galeev

unread,
Sep 26, 2016, 11:56:14 AM9/26/16
to 2600hz-users
Yeah, it seems kamailio get a new version meanwhile, and I need to update configs.

To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dmitriy Cheremnov

unread,
Sep 26, 2016, 12:10:36 PM9/26/16
to 2600hz...@googlegroups.com
Can you please tell how to fix
/etc/kamailio/local.cfg ?

Best regards,
Dmitriy

To unsubscribe from this group and all its topics, send an email to 2600hz-users+unsubscribe@googlegroups.com.

Roman Galeev

unread,
Sep 26, 2016, 12:45:08 PM9/26/16
to 2600hz-users
Yaniv, please check kazoo/ folder in git repo, there is a sup command that executes inside container.

On Mon, Sep 26, 2016 at 6:27 PM, Roman Galeev <jam...@gmail.com> wrote:
Dmitry, please checkout again. Should work now, I've updated configs and locked kamailio version to 4.4.3.


To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
With best regards,
     Roman Galeev,

Roman Galeev

unread,
Sep 26, 2016, 12:45:08 PM9/26/16
to 2600hz-users
Dmitry, please checkout again. Should work now, I've updated configs and locked kamailio version to 4.4.3.


To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roman Galeev

unread,
Sep 26, 2016, 1:39:52 PM9/26/16
to 2600hz-users
Also I think you might be interested in this: https://github.com/jamhed/kazoo-rest

Dmitriy Cheremnov

unread,
Sep 26, 2016, 1:39:52 PM9/26/16
to 2600hz...@googlegroups.com
Many thanks,
kamailio
started!

Best regards,
Dmitriy

Dmitriy Cheremnov

unread,
Sep 27, 2016, 12:03:43 PM9/27/16
to 2600hz...@googlegroups.com
./sup crossbar_maintenance create_account admin kamailio.kazoo admin admin
return
Usage: sup [-?] ...

see:
https://gyazo.com/cb3bdd070bbe0b4da5ae420fb707e847

Please advise how to initialize,
Dmitriy

Roman Galeev

unread,
Sep 27, 2016, 12:08:32 PM9/27/16
to 2600hz-users
I believe this is shell issue. You can do "docker exec -ti kazoo.kazoo sup cmd1" meanwhile.

Dmitriy Cheremnov

unread,
Sep 27, 2016, 12:29:39 PM9/27/16
to 2600hz...@googlegroups.com

vakninvak

unread,
Sep 30, 2016, 10:16:45 AM9/30/16
to 2600hz-users
Hi,
Same here, Kamailio is installed (but I had to run it's build manually, first time it didn't load).
Sup still fails in and out of the container, do you have an advice how to debug this?

Yaniv
With best regards,
     Roman Galeev,



--
With best regards,
     Roman Galeev,

--
You received this message because you are subscribed to a topic in the Google Groups "2600hz-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/2600hz-users/dHrydm61Ejc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 2600hz-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
With best regards,
     Roman Galeev,

--
You received this message because you are subscribed to a topic in the Google Groups "2600hz-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/2600hz-users/dHrydm61Ejc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 2600hz-users...@googlegroups.com.

Dmitriy Cheremnov

unread,
Sep 30, 2016, 10:27:00 AM9/30/16
to 2600hz...@googlegroups.com
Hi,

Unfortunately, I do not know how to solve the problem.

Dmitriy

To unsubscribe from this group and all its topics, send an email to 2600hz-users+unsubscribe@googlegroups.com.

Roman Galeev

unread,
Oct 3, 2016, 12:57:25 PM10/3/16
to 2600hz-users
Try to quote sup arguments, this should work (as example)
$ ./sup 'kz_nodes status'
or
$ docker exec -ti kazoo.kazoo sup 'kz_nodes status'

To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roman Galeev

unread,
Oct 3, 2016, 10:50:03 PM10/3/16
to 2600hz-users
Found the real issue, please update the repo and rebuild the kazoo image with: kazoo/build.sh.

Dmitriy Cheremnov

unread,
Oct 6, 2016, 1:19:40 PM10/6/16
to 2600hz...@googlegroups.com
Thank you!

Now 'sup' works!

Best regards,
Dmitriy

2600hz-users

unread,
Oct 6, 2016, 5:04:11 PM10/6/16
to 2600hz-users
There is an typo in :
/opt/kazoo-docker/kazoo/build.sh
echo $COMMIT > etc/commit
should probably be
echo $COMMIT > /etc/commit

Also I get this error:

root@docker:/opt/kazoo-docker# kazoo/build.sh
kazoo/build.sh: 5: kazoo/build.sh: ../bin/get-commit: not found
Using repository https://github.com/2600hz/kazoo.git commit:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/kazoo-docker/Dockerfile: no such file or directory

maybe there is some permission issue on the file get-commit.

Roman Galeev

unread,
Oct 6, 2016, 6:56:34 PM10/6/16
to 2600hz-users
No, there is no typo. And you need to cd to kazoo folder, e.g. cd kazoo ; ./build.sh :)

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Black

unread,
Oct 7, 2016, 9:48:06 AM10/7/16
to 2600hz-users
Hey guys, not sure if you remember me but I had dockerized the entire 3.22 platform and am almost done finishing the 4.x one, I've made alot of improvements this time around to make it much more flexible to different use cases and to have good documentation as well.  I'll provide links in probably a few days. :)  There are numerous lessons we have learned from running these services as containers.  Also most images are coming out to be ~ 100-200MB or smaller

Most of the containers will be based on a custom debian image I created using debootstrap among other things.  That part and the documentation are finished and it packs an awful lot into an image that's only 55MB, or 22MB compressed :)



On Thursday, October 6, 2016 at 6:56:34 PM UTC-4, Roman Galeev wrote:
No, there is no typo. And you need to cd to kazoo folder, e.g. cd kazoo ; ./build.sh :)
On Thu, Oct 6, 2016 at 10:57 PM, 2600hz-users <mic...@mdruedal.dk> wrote:
There is an typo in :
/opt/kazoo-docker/kazoo/build.sh
  echo $COMMIT > etc/commit
should probably be
  echo $COMMIT > /etc/commit

Also I get this error:

root@docker:/opt/kazoo-docker# kazoo/build.sh
kazoo/build.sh: 5: kazoo/build.sh: ../bin/get-commit: not found
Using repository https://github.com/2600hz/kazoo.git commit:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/kazoo-docker/Dockerfile: no such file or directory

maybe there is some permission issue on the file get-commit.

--
You received this message because you are subscribed to the Google Groups "2600hz-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gaurav Saini

unread,
Jun 28, 2017, 3:23:44 PM6/28/17
to 2600hz-users
Hello Joe,

First of all thanks for working on Kazoo 4 docker image. Can we have the link so we all can test it ?

Thanks
Gaurav
Reply all
Reply to author
Forward
0 new messages