Best way to start kazoo 4.0 with ecallmgr kapp

279 views
Skip to first unread message

Joe

unread,
Oct 12, 2016, 1:11:51 AM10/12/16
to 2600hz-dev
I'm curious about the best way to autostart the ecallmgr kapp when the kazoo_apps vm is loaded.

The end of my vm.args file has the following:
  -s kazoo_apps_app

I tried adding another line with:
  -s ecallmgr_app

It would normally boot fine but when I try to boot this way I get:

{"init terminating in do_boot",{undef,[{ecallmgr_app,start,[],[]},{init,st00:53:55.593 [info] starting applications from default configuration

art_it,1,[]},{init,start_em,1,[]}]}}


and everything crashes


I seem to remember earlier builds would start ecallmgr automatically because I would notice  in the logs that it couldn't reach freeswitch.local, but this doesn't seem to be the case.


In this particular use case, this is in docker and everything is automated so attaching a requirement of execing into the container and issuing sup commands would eliminate all the amazing benefits provided by using docker in combination with ops automation :(

James Aimonetti

unread,
Oct 12, 2016, 11:36:23 AM10/12/16
to 2600h...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

In Kazoo 4.x and beyond, ecallmgr is just another app.

In 3.22 and before, it had special initialization that it was doing,
requiring a different startup and its own VM.

So in Kazoo 4.x, you can start a node named 'ecallmgr' and it should
auto-start ecallmgr. Or you can start a VM called 'foobar' and configure
it in system_config/kapps_controller to start 'ecallmgr' (or any
combination of apps). Or you can run all the apps in the 'kazoo_apps'
VM. There are tradeoffs to all approaches.
- --
James Aimonetti

Lead Systems Architect
"If Dialyzer don't care, I don't care"
2600HzPDX | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJX/lh0AAoJENTKa+JPXCVg50UH/AqzlbPwxpH3IgbuGV2rFc7G
0NFTe7kR+A8t9w5vnVD2dForGEX9dQc6avmE6Y6ECht0pqW1TGf+ZYCIBmEzWUL3
uA3HyYtCF+gtGivHHMq9AjJ7m8Et88LzcYcB1nBwJXoaHzd2yVz2UyDQZv9jAFnk
T7PjAU+HruwaAl34qIdDLRAM17H0uGY1ES1wvhbvrRRCItU5v9rxA25KRxO0s91v
owvXAL3TFANjEAyMm5kJruHcoX9mAicefkqXky9ovXfATJsD4CJxa899iyPhM4Ax
LGKz2hjC5xl3i7lkuL0YwFPI5eaPbdm+AOPzuPOP4fnmcmJcIyx7wCWEzXP7XY0=
=C9gK
-----END PGP SIGNATURE-----

Joe

unread,
Oct 12, 2016, 10:30:18 PM10/12/16
to 2600hz-dev, ja...@2600hz.com
Since I'm running kazoo 4.0 in a container it would be most useful if there was a way to load a kazoo_apps erlang vm with either all kazoo apps, ecallmgr app, or both together.  

So far I've been using an environment variable ERLANG_VM (either set to kazoo_apps or ecallmgr) and have been writing "-s ${ERLANG_VM}_app" to the vm.args file.

I'm aware that you create hostname keys in the kapps_controller document and associate a list of apps to autostart, but most container cluster managers use ephemeral hostnames which can't be predicted in advance and will vary depending on which node the container is scheduled to.  

Would it be possible to do this through vm arguments or a config file?

James Aimonetti

unread,
Oct 12, 2016, 11:28:14 PM10/12/16
to Joe, 2600hz-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


If the name of your VM is the name of a kazoo app, it will run that app
automatically. So a VM named ecal...@whatevs.com will start ecallmgr,
call...@whatevs.com will run callflow, crossbar@, etc etc.

Another thought is, you can assign specific system_config settings with
vm_name@hostname, but you can now also specify zone-specific
configs using the zone name as the top-level key.

Otherwise, you may want to try to wrangle the containers into providing
an expected hostname. Kazoo has been built on the assumption of fairly
static hostnames for configs for the VMs.

Of course, you can set the "default" list of apps to all kazoo apps
(including ecallmgr) and get an all-in-one VM instance.
>> sip:...@2600hz.com <javascript:>
>> tel:415.886.7905
>> irc:mc_ @ freenode
>> -----BEGIN PGP SIGNATURE-----
>>
>> iQEcBAEBCAAGBQJX/lh0AAoJENTKa+JPXCVg50UH/AqzlbPwxpH3IgbuGV2rFc7G
>> 0NFTe7kR+A8t9w5vnVD2dForGEX9dQc6avmE6Y6ECht0pqW1TGf+ZYCIBmEzWUL3
>> uA3HyYtCF+gtGivHHMq9AjJ7m8Et88LzcYcB1nBwJXoaHzd2yVz2UyDQZv9jAFnk
>> T7PjAU+HruwaAl34qIdDLRAM17H0uGY1ES1wvhbvrRRCItU5v9rxA25KRxO0s91v
>> owvXAL3TFANjEAyMm5kJruHcoX9mAicefkqXky9ovXfATJsD4CJxa899iyPhM4Ax
>> LGKz2hjC5xl3i7lkuL0YwFPI5eaPbdm+AOPzuPOP4fnmcmJcIyx7wCWEzXP7XY0=
>> =C9gK
>> -----END PGP SIGNATURE-----
>>


- --
James Aimonetti

Lead Systems Architect
"If Dialyzer don't care, I don't care"
2600HzPDX | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJX/v9LAAoJENTKa+JPXCVg3y4H/R6KBpAd1byOOH5ZWNnom4mo
l4swyxkQbKFhsoBVnY1msY/bUpQKWT7YkXCOh4ptVHv8EHiPkScgbxqtGSlfjB6x
p/sCtC+h7+2q4nK41rpvPbxOsCPRwlqR5L6WyJjttCS7khXzBv4Qx3K15QDkPiJc
e88p7wMjV8Z8czzXa20HKN+SHVYj/2hX8DvIIaLflQO3SBgKkE8TPkvJo/rcCsIy
qmZKdMUmnS/Zep/0HBwcCmL6bJunr/K1Slm7lqghqBpibAFZGL6eQfnhlVxbyn+b
SbzrGnM6TuC8KZt0m4kb/fW1yr/KXDWDBSr/kQTXK9eDyZFtLcLSlPzq13TT/BI=
=5H5n
-----END PGP SIGNATURE-----

Joe

unread,
Oct 13, 2016, 11:00:29 AM10/13/16
to 2600hz-dev
I seem to have found what I was looking for, it looks like kazoo looks for an environment variable, KAZOO_APPS, which is parsed into a list of appz to start.

Reply all
Reply to author
Forward
0 new messages