Skip to content

Installation

Minh edited this page Sep 14, 2024 · 21 revisions

There are multiple methods to install LibreSBC, but using Ansible is the best choice for convenient and minimize workload. If Ansible is new for you let spend a bit effort to learn it. If you already used Ansible then go head.

Requirements

  • LibreSBC Machine: Debian 10 buster.
  • Ansible Machine: MacOS/Linux with Ansible ( Ansible Installation Guide)
    • rsync is required on Ansible host.
    • version of Ansible is not important (2.9.14 is used in the test)

Get starts

1. Download the LibreSBC repository source code.

git clone --depth 1 --branch <tag_name> https://github.com/hnimminh/libresbc.git

2. Move to deployment directory

cd libresbc/build/ansible

3. Update Ansible Config, and fill below line:

vi ansible.cfg
[defaults]
private_key_file    = <ssh-private-key-to-access-libresbc>
remote_port         = <ssh-port-of-libresbc-host-default-is-22>
remote_user         = <ssh-username-to-access-libresbc-host>
vault_password_file = <ansible-vault-secret-file>

4. Declare your LibreSBC into Inventory

vi inventories/production/hosts.yml
sbcs:
  hosts:
    <machine-name>:
      ansible_host: <libresbc-machine-ip>
      nodeid: <unique-nodeid>
  • ansible_host: ip address of libresbc that ansible machine can ssh to
  • nodeid: must be unique name, best practice is using Greek/Japan/Roma God's name or whatever.. as long as they unique and related. nodeid and machine-name can be same.

5. Deployment

ansible-playbook playbooks/deployment.yml -i inventories/production -l "<machine-name>" -t "platform,libre,nginx,captagent" -e "debian_codename=bullseye" -e "signalwire_pat_token=Your-SignalWire-Personal-Access-Tokens"

Note:

  • Since 2022, SignalWire Personal Access Tokens (PAT)s are required to access FreeSWITCH install packages
  • Once you registered and got SignalWire Personal Access Tokens, you will need to declare ansible extra variable to install FreeSWITCH (when you run ansible-playbook with tag platform or freeswitch)
  • Example:
ansible-playbook playbooks/deployment.yml -i inventories/production -l "<machine-name>" -t "platform,libre,nginx,captagent" -e "signalwire_pat_token=Your-SignalWire-Personal-Access-Tokens"

Specify version

  • Debian version by debian_codename
    • bookworm
    • bullseye
    • buster
    • when debian_codename is omitted buster will be used as default [22/08/2023]
  • FreeSWITCH version by freeswitch_version (default: v1.10.6")
ansible-playbook playbooks/deployment.yml -i inventories/production -l "<machine-name>" -t "platform,libre,nginx,captagent" -e "debian_codename=bullseye"

..and enjoy 👏

Troubleshooting

This will be collected from issue that encountered in community



Note

  • There is other method like bash script, docker are not recommended if you not familiar with LibreSBC.