Quick Start¶
We provide an out-of-the-box deployment method. To simplify installation, we have chosen to use Docker and Docker Compose, along with Bash-based installation and upgrade scripts.
We recommend downloading the latest installation package from our official website and running ./install.sh
in the installation directory. This script handles everything needed to get started, including basic configuration, and will prompt you to run ./start.sh
to launch Beatsight. Beatsight is bound to port 8999 by default. Once the installation is complete, you should be able to access the login page at http://127.0.0.1:8999.
System Resources¶
Beatsight must be installed on a Linux system, which can be Ubuntu/Debian or CentOS, preferably with a newer version.
The recommended system resources are as follows:
- 2 CPU cores
- 4 GB RAM
- 20 GB of available disk space
We require at least Docker 19.03.6 and Compose 2.13.0.
$ docker version
Client: Docker Engine - Community
Version: 27.3.1
...
$ docker compose version
Docker Compose version v2.29.7
How to Install the Latest Version of Docker Compose?
First, run the following command:
If you see an output similar to this:
it means Docker already includes Compose, and no additional installation is necessary. Otherwise, you'll need to install the latest version available on the Compose release page. At the time of writing, the current stable version is 2.29.7.
Below are the steps to download version 2.29.7 and save the executable file to /usr/local/bin/docker-compose
:
sudo curl -L "https://github.com/docker/compose/releases/download/2.29.7/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
Next, set the correct permissions to make the docker-compose
command executable:
To verify the installation, you can run:
You should see output similar to the following:
What if my system resources are less than 2 CPU cores and 4 GB RAM?
You can adjust the resource parameters. For details, refer to Custom Configuration.
What if port 8999 is already in use?
You can modify the port configuration. For details, refer to Custom Configuration.
Installation Script¶
Assuming your installation directory is /opt/beatsight
, download the latest version of the installation script (e.g., v1.3.0-ce
):
cd /opt/beatsight
wget https://github.com/beatsight/beatsight-docker/archive/refs/tags/v1.3.0-ce.zip
unzip v1.3.0-ce.zip
Tip
If the unzip
command is not found, please run sudo apt install unzip
or sudo yum install unzip
.
The extracted installation directory is as follows:
.
|-- beatsight-docker-1.3.0-ce
| |-- README.md
| |-- backup.sh
| |-- backups
| |-- dc
| |-- docker-compose.yaml
| |-- install
| |-- install.sh
| |-- logs
| |-- runtime
| |-- start.sh
| |-- stop.sh
| `-- upgrades
`-- v1.3.0-ce.zip
The dc
script ensures that Docker Compose is correctly invoked, whether you use docker compose
or docker-compose
. For example:
This will call the correct Docker Compose command to output the version information, ensuring that you can smoothly perform Docker Compose-related operations, regardless of which command format you use.
Installation¶
The script will check if the necessary conditions are met, then pull the system image from the image repository, and finally generate the configuration files required for system operation.
Once the installation is complete, you will see output similar to the following:
-----------------------------------------------------------------
You're all done! Run the following command to get Beatsight running:
./start.sh
-----------------------------------------------------------------
Configuration file¶
The installation directory structure at this point is as follows:
.
|-- beatsight-docker-1.3.0-ce
| |-- README.md
| |-- backup.sh
| |-- backups
| |-- beatsight_install_log-2024-10-26_04-10-18.txt
| |-- docker-compose.yaml
| |-- install
| |-- install.sh
| |-- logs
| |-- runtime
| |-- start.sh
| `-- stop.sh
|-- logs
| |-- beatsight
| |-- nginx
| `-- supervisor
`-- runtime
|-- beatsight.nginx.conf
|-- beatsight_settings.py
`-- gunicorn.conf.py
The runtime
directory contains the configuration files required for system operation. Open beatsight_settings.py
and enter the local address (for example, 10.8.1.1):
ALLOWED_HOSTS = [
'127.0.0.1',
'demo.beatsight.com',
# Add other allowd host as needed
'10.8.1.1', # <------- add this line
]
CSRF_TRUSTED_ORIGINS = [
'https://demo.beatsight.com',
# Add other trusted origins as needed
'http://10.8.1.1', # <------- add this line
]
Start Service¶
At this point, you can start the service by running the following command:
Once the service has started, you will see the following output:
[+] Running 6/6
✔ Container beatsight-mq Started
✔ Container beatsight-redis Healthy
✔ Container beatsight-postgres Running
✔ Container beatsight-celery Started
✔ Container beatsight-web Started
✔ Container beatsight-beat Started
To verify if the system components are running properly, you can execute the following command:
You should see output similar to the following:
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
beatsight-beat beatsight/beatsight:v1.3.0-ce "/home/beatsight/bui…" beat 5 hours ago Up 5 hours 22/tcp, 8000/tcp
beatsight-celery beatsight/beatsight:v1.3.0-ce "/home/beatsight/bui…" celery 5 hours ago Up 5 hours 22/tcp, 8000/tcp
beatsight-mq rabbitmq:3-management-alpine "docker-entrypoint.s…" rabbitmq 5 hours ago Up 5 hours (healthy) 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp
beatsight-postgres postgres:14-bullseye "docker-entrypoint.s…" postgres 5 hours ago Up 5 hours (healthy) 5432/tcp
beatsight-redis redis:6.2.14-alpine "docker-entrypoint.s…" redis 5 hours ago Up 5 hours (healthy) 6379/tcp
beatsight-web beatsight/beatsight:v1.3.0-ce "/bin/sh -c 'exec ${…" web 5 hours ago Up 5 hours (healthy) 22/tcp, 8000/tcp, 0.0.0.0:8999->80/tcp, [::]:8999->80/tcp
Create Superuser¶
Before accessing the system for the first time, you need to create a super administrator. Please run the following command:
Follow the prompts to enter the administrator’s username, password, and email. Once completed, the super administrator account will be created, and you can log in to the system using these credentials.
Stop Service¶
You can stop the service using the following command:
This command will stop all system components. If you need to completely shut down the service, run the following:
Next, you need to add the system's SSH public key to your Gitlab/Github account so that the system can connect to the code repository. For details, please refer to SSH Public Key.