One-Click Script Install¶
The one-click script is the recommended way to deploy OpsAnt. It automatically completes image pulling, container orchestration, random password generation, and full service startup via install/opsant-install.sh.
Install Process¶
1. Install Docker and Dependencies¶
# Ubuntu / Debian 示例
sudo apt-get -y update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get -y update
sudo apt-get -y install docker-ce jq uuid wget git ntpdate mysql-client unzip
systemctl enable --now docker
2. Get the Code¶
3. Modify Install Configuration¶
Key configuration items:
| Configuration Item | Description |
|---|---|
INSTALL_PATH |
Data directory, default /data/opsant |
DOMAIN_NAME |
Access address (IP or resolvable domain) |
LOCAL_IP |
Local intranet IP |
PROXY_PUBLIC_IP |
Public IP (keep default for intranet deployment) |
PAAS_DOCKER_REG |
Image repository (default Alibaba Cloud) |
4. Run the Install Script¶
What the Script Does¶
- Check and initialize the directory structure
- Pull OpsAnt and dependency images
- Start containers such as MySQL, Redis, Consul, Prometheus, Alertmanager, blackbox-exporter, etc.
- Deploy the Proxy main container (Django + Celery + SaltStack + OpsMini Server)
- Generate random passwords:
adminlogin password- MySQL / Redis password
- OpsMini Token
- Prometheus Basic Auth password
- Automatically write Prometheus access configuration and import built-in alert rules
Install Complete¶
The script will output key information, for example:
Be sure to save the random passwords. If you forget the password, you can enter the container via
docker execto reset it.
Verification¶
Uninstall¶
If the install fails or you need to reinstall, run:
FAQ¶
- Port already in use: Change the mapped port or stop the service occupying it
- Image pull failed: Check external network connectivity, or configure a domestic image accelerator
- Access address loops back to the login page: The access address is inconsistent with the configured
DOMAIN_NAME, they must be kept consistent