WEB interface installation
Server requirements:
amd64 architecture
Debian 12 Bookworm distibution
at least 4GB of RAM
Packages installation
# apt update && apt install yeti-web nginx
Yeti-web configuration
To configure databases connection parameters create /opt/yeti-web/config/database.yml file with the following content:
production:
primary:
adapter: postgresql
encoding: unicode
database: yeti
username: yeti
password: somepassword
host: 127.0.0.1
port: 5432
schema_search_path: 'gui, public, switch, billing, class4, runtime_stats, sys, logs, data_import'
min_messages: notice
pool: 5
cdr:
adapter: postgresql
encoding: unicode
database: cdr
username: yeti
password: somepassword
host: 127.0.0.1
port: 5432
schema_search_path: 'cdr, reports, billing'
min_messages: notice
pool: 5
migrations_paths: db/cdr_migrate
Warning
You should specify correct addresses and credentials that were used in previous section
Configure security keys seed by creating /opt/yeti-web/config/secrets.yml with the following content:
production:
secret_key_base: <RANDOM_STRING>
Warning
Replace <RANDOM_STRING> with randomly generated value. You can use pwgen -s 128 to generate it.
Copy configuration file example /opt/yeti-web/config/yeti_web.yml.distr to /opt/yeti-web/config/yeti_web.yml
Databases data initialization
To initialize empty databases during initial installation:
# cd /opt/yeti-web
# su -s /bin/bash yeti-web
$ RAILS_ENV=production ./bin/bundle.sh exec rake db:schema:load db:migrate
$ RAILS_ENV=production ./bin/bundle.sh exec rake db:seed
To upgrade databases to the latest version:
# cd /opt/yeti-web
# su -s /bin/bash yeti-web
$ RAILS_ENV=production ./bin/bundle.sh exec rake db:migrate
To load countries and networks information to database:
# cd /opt/yeti-web
# su -s /bin/bash yeti-web
$ RAILS_ENV=production ./bin/bundle.sh exec rake custom_seeds[network_prefixes]
Nginx configuration
For basic configuration remove default config and copy yeti-web.dist.nginx:
# rm /etc/nginx/sites-enabled/default
# cp /opt/yeti-web/config/yeti-web.dist.nginx /etc/nginx/sites-enabled/yeti
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# service nginx restart
Launch
After successful configuration of databases you finally can run software using following commands:
# service yeti-web start
# service yeti-cdr-billing@cdr_billing start
# service yeti-cdr-billing@cdr_stats
# service yeti-delayed-job start
# service yeti-scheduler start
This will run web-interface, schedulers, background tasks processors and CDR processing workers
Checks
check if puma listens on local socket:
# netstat -lpn | grep puma
unix 2 [ ACC ] STREAM LISTENING 16420 258/puma 5.5.2 (uni /run/yeti/yeti-unicorn.sock
check if nginx listens on correct TCP/IP addresses and ports:
# netstat -lpn | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23627/nginx
tcp 0 0 127.0.0.1:6666 0.0.0.0:* LISTEN 23627/nginx
Log files to check for possible warnings/errors using systemctl and journalctl:
# systemctl status yeti-web
# jounrnalctl -u yeti-web
Try to open management interface in your favorite browser and login with default credentials:
- user:
admin
- password:
111111