Describe when someone would need this information. For example "when connecting to wi-fi for the first time".
Ubersmith is using Docker to run our software. Everything from our database backend to our search engine is run inside Docker containers.
The /usr/local/ubersmith directory has the following subdirectories:
/app//custom/The
custom directory holds custom files, such as service, order, and device modules. Any file in this directory is copied to the webroot of the web container when the container starts or restarts. The subfoldersinclude/{service,order,device}_modules, which servers as a guide for the locations of custom module class files./conf//cron/This directory is empty by default. Any files in this directory override the contents of /etc/cron.d in the cron container. This is used for rare situations when the default Ubersmith cron tasks need to be overridden.
/httpd/
This directory includes the sites-enabled folder, which in turn includes the Apache virtual host configuration(s) for Ubersmith. If multiple brands need to be supported, additional virtual host definitions are created in this directory.
/mysql/This directory contains ubersmith.cnf which configures and/or overrides specific MySQL variables. Variables are updated when the db container restarts.
/ssl/This directory contains .key and .pem which should be replaced by the Apache key and certificate used for the Ubersmith instance. The the web and mail containers need to be restarted when these files are updated. These file names are important; services with unexpected file names will fail to start or will fail with TLS disabled. To include a CA bundle, first place the leaf certificate in the .pem file, then add the CA bundle. Restart the web and mail containers after modifying certificates.
/logs/This directory contains the Apache Access and Error in the ubersmith directory.
When containers are running, they are prefixed with ubersmith_ and suffixed with _1. For example, the running web container is named 'ubersmith_web_1'.
Container Name | Function | Listens On |
|---|---|---|
Runs the postfix MTA; handles incoming mail directed at the Support Manager and outgoing mail from Ubersmith. | 25/tcp | |
| cron | Runs crond, and executes Ubersmith's polling cron task, and the daily invoicing task. | None |
| web | Runs Apache; serves the Ubersmith HTTP user interface. | 80/tcp, 443/tcp |
| php | Runs php-fpm; renders PHP code into HTML for use by the web container. | 9000/tcp |
| db | Runs Percona Server (MySQL drop-in replacement). | 127.0.0.1:3306/tcp |
| solr | Runs Apache Solr. | None |
| backup | Executes Percona xtrabackup and stores a backup in the backups Docker volume. | None |
Ubersmith uses the Docker Compose utility to manage using many containers. There are two files in /usr/local/ubersmith,docker-compose.yml and docker-compose.override.yml. Any custom changes specific to your deployment should be made in the override file, as the main docker-compose.yml may be updated when Ubersmith is upgraded.
# cd /usr/local/ubersmith# docker-compose -p ubersmith up -d |
# cd /usr/local/ubersmith# docker-compose -p ubersmith stop |
# cd /usr/local/ubersmith# docker-compose -p ubersmith restart web mail |
Note: The backup container is only used to generate backups, and is not expect to have an Up status.
# docker-compose -p ubersmith ps Name Command State Ports -------------------------------------------------------------------------------------------------------ubersmith_backup_1 /xtrabackup.sh Exit 2 ubersmith_cron_1 /usr/sbin/cron -f Up ubersmith_db_1 /docker-entrypoint.sh mysqld Up 127.0.0.1:3306->3306/tcp ubersmith_mail_1 /entrypoint.sh Up 0.0.0.0:25->25/tcp ubersmith_php_1 /usr/sbin/php5-fpm -F Up 9000/tcp ubersmith_solr_1 /bin/bash -c /opt/solr/bin ... Up 8983/tcp ubersmith_web_1 /ubersmith.sh Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp |
This runs Percona xtrabackup, compresses the backup, and outputs the result of the process. Note: The compression step may take some time to complete, so the task may not exit immediately.
# cd /usr/local/ubersmith# docker-compose -p ubersmith up backup |
Note: The database container listens on the loopback interface (127.0.0.1:3306) of the host machine. The database credentials can be retrieved from /usr/local/ubersmith/docker-compose.yml.
If a container won't start, contact Ubersmith support for assistance. Also, the following are steps to troubleshoot the issue.
For example, if the web container isn't starting because of a problem in the Apache configuration in/usr/local/ubersmith/conf/httpd:
# cd /usr/local/ubersmith# docker-compose -p ubersmith up web(output follows, possibly with an error message indicating the issue)(container exits) |
Once the issue is resolved, start the container normally using up -d:
# cd /usr/local/ubersmith# docker-compose -p ubersmith up -d web |
Note: The command above only brings up the web container; for this example it is assumed that everything else is running normally.
When all else fails, restarting Docker completely may resolve networking and/or firewall issues:
# service docker restart |
The above recreates the firewall rules Docker needs for both outside world and inter-container communication. Ubersmith's containers are configured to start automatically when Docker does.
On this page: |
|