Welcome!!
This gist describes about using Kazoo Next-Gen Embedded Images. You can download and Flash (or clone) the image to your test on-premise or VPS server's storage disk and get system running in a matter of some minutes. This guide is provisional, in the mean time an script will be written for automate and ease this process
Download Link: https://kazoo-embedded-images.nyc3.cdn.digitaloceanspaces.com/kazoo-embedded-x64-build-2024-05-25.img.gz
- Download and Clone the image to the first hard disk, where sdX is your hard drive.
zcat kazoo-embedded-img.gz | dd of=/dev/sdX bs=1M .
-
Just before boot the system, You must enlarge the second partition previously cloned to harddrive (I recommend GpartEd https://gparted.org/download.php ) .
-
Boot GPartED or similar partition tool and resize (to grow) the /dev/sdX2 partition. Try to keep the initial label that is set to it. If you prefer another Filesystem, Keep in mind to set 'OVL' label to it .
-
After system being first booted, the root password is adminadmin01 ; change it immediately if you are on a VPS or public environment .
-
List the containers and then; Start the containers on the following order
lxc list lxc start cdb01 lxc start rabbit1-z100 lxc start haproxy-z100 lxc start fs1-z100 lxc start kz1-z100 lxc start km1-z100
Note: They will take some more time tan usual to start up, please be patient.
- *After starting them; please track kazoo logs to ensure it started correctly, you can access to container's shell using:
lxc shell -or- lxc exec -- bash
-
With this command you can test if the services are running properly; note that you must create network forwards to get public access to kazoo setup.
-
Create network forwards for public access and to get proper audio from the media service (freeswitch) and registrations from SBC (kamailio)
incus network forward create incusbr0 138.197.95.168 incus network forward port add incusbr0 138.197.95.168 udp 16384-32768 10.179.0.27 (freeswitch RTP) incus network forward port add incusbr0 138.197.95.168 udp 5060,7000 10.179.0.20 (Kamailio SBC) incus network forward port add incusbr0 138.197.95.168 tcp 5060,7000 10.179.0.20(Kamailio SBC) incus network forward port add incusbr0 138.197.95.168 tcp 80,443 10.179.0.21 (Kazoo Monster-UI https and API ports)
The external IP and/or internal ip may change, it is related to each container's IP
- Configure DNS A record (example: portal.mydomain.com) and nginx with SSL (Letsencrypt or any SSL Provider's certificates)
Add the A record with the public server's IP
lxc shell kz1-z100 dnf install -y certbot systemctl stop nginx (to allow certbot work with the SSL certificates setup) certbot certonly -d portal.mydomain.com --standalone
- With an editor, open /etc/nginx.conf.d/kazoo.conf and uncomment the following lines and please set the correct path to LetsEncrypt certificates, also set server_name to your domain (ie. portal.mydomain.com):
- Start nginx service
systemctl restart nginx
- go to /var/www and create a symlink for monster-ui, also set-up the config.js parameters cd /var/www ln -s monster-ui-4.3 monster-ui cd monster-ui nano ./js/config.js
Just before 'whitelabel' you can add this: api: { 'default': 'https://portal.mydomain.com/v2/', socket: 'wss://portal.mydomain.com/' },
- Still inside kz1-z100 container, create the master account, add the FS node to ecallmgr and import the apps and sounds.
set +o history
sup crossbar_maintenance create_account
sup crossbar_maintenance init_apps /var/www/monster-ui/apps/ https://portal.mydomain.com/v2/
sup -n ecallmgr ecallmgr_maintenance add_fs_node [email protected] 'false'
set -o history
-
Install kazoo prompts to the system: cd /opt/ git clone --depth 1 https://github.com/2600hz/kazoo-sounds sup kazoo_media_maintenance import_prompts /opt/kazoo-sounds/kazoo-core/en/us/ en-us
-
Configure NAT for freeswitch and Kamailio.(tbd)
-
Now you can login to monster-ui ; then create accounts add numbers, and users/devices
*If kazoo won't start correctly:
-
Stop kazoo container, and haproxy container lxc stop kz1-z100 haproxy-z100
-
Login to couchdb container and stop the service only lxc shell cdb01 set +o history systemctl stop kazoo-couchdb
Delete the database files rm -rf /srv/*
- Start the couchdb service systemctl start kazoo-couchdb
- Return to main console and start haproxy and kazoo once again ctrl+d lxc start haproxy-z100 lxc start kz1-z100
- Track log files to ensure kazoo is running properly