Skip to content
Home
Products
Solutions
Customers Enterprise Community Docs
Support
Live Demo

OpsAny Platform — Offline Deployment

Note: offline deployment builds on a successful online deployment. If you have never completed an online deployment, get that working first. The idea is to download ahead of time everything an online deployment needs, then run the scripts in the offline environment.

OpsAny has the following offline dependencies:

  1. Docker, MySQL, and uuid packages must be installed, so these must be solved first.
  2. The whole of OpsAny runs in Docker containers, so all Docker images must be downloaded in advance.
  3. Download opsany-agent, the built-in documentation, and the Grafana plugin in advance.

Preparing Packages in the Online Environment

Prepare a host running the same OS version as the target offline environment.

Install OpsAny Online

  1. Enable the package cache.
[root@linux-node1 ~]# vim /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
# add or modify the following line
keepcache=1
vim /etc/apt/apt.conf.d/10keepcache
# add the following line
Binary::apt::APT::Keep-Downloaded-Packages "true";
  1. Install OpsAny by following the online installation guide.

  2. Installation guide

  3. Create the offline directory; all offline files are stored here.

mkdir -p /opt/opsany-v2.3.4-x86_64

Exporting the Packages

  1. Export the OS dependency packages
[root@linux-node1 ~]# cd /opt/opsany-v2.3.4-x86_64
[root@linux-node1 ~]# mkdir packages
[root@linux-node1 ~]# find /var/cache/yum/x86_64/7/ -name "*.rpm" -exec mv {} packages/ \;
[root@linux-node1 ~]# cd /opt/opsany-v2.3.4-x86_64
[root@linux-node1 ~]# mkdir packages
[root@linux-node1 ~]# find /var/cache/apt/archives/ -name "*.deb" -exec mv {} packages/ \;
  1. Export the images

Export the images manually, adjusting the image versions to the versions you actually use. Update the image versions listed below before running.

# Verify the result after the export completes.
cd /opt/opsany-paas/install/
./opsany-ce-offline.sh all
  1. Prepare the opsany-paas package offline
[root@linux-node1 ~]# cd /opt/opsany-v2.3.4-x86_64/ && git clone --depth=1 https://gitee.com/unixhot/opsany-paas.git
  1. Prepare the opsany-agent package and the built-in documentation offline.
# Download the Agent package
cd /opt/opsany-v2.3.4-x86_64 && wget https://opsany.oss-cn-beijing.aliyuncs.com/opsany-agent-v2.3.4.tar.gz

# Download the built-in documentation
cd /opt/opsany-v2.3.4-x86_64 && wget https://opsany.oss-cn-beijing.aliyuncs.com/opsany-docs-v2.3.4.tar.gz

# Download the Zabbix plugin in advance; the deployment script unpacks it and copies it into the Grafana container.
cd /opt/opsany-v2.3.4-x86_64 && wget https://opsany.oss-cn-beijing.aliyuncs.com/alexanderzobnin-zabbix-app-4.3.1.zip

At this point every package needed by the offline environment is ready. You can archive all of it and copy it to a USB drive.

Running the Offline Installation

  1. Install the dependency packages and Docker offline

Copy the OS image archive to the host and extract it:

[root@linux-node1 opsany-local]# tar zxf CentOS-7.9.2009-rpm.tar.gz
[root@linux-node1 opsany-local]# cd CentOS-7.9.2009-rpm
[root@linux-node1 CentOS-7.9.2009-rpm]# yum install *.rpm
[root@linux-node1 CentOS-7.9.2009-rpm]# systemctl enable --now docker
  1. Import all Docker images
[root@linux-node1 ~]# tar zxf opsany-images.tar.gz
[root@linux-node1 ~]# cd opsany-images
[root@linux-node1 opsany-images]# for i in `ls`;do docker load -i $i;done
  1. Deploy PaaS

Deploying PaaS relies on the packages you installed offline, such as the MySQL client. If those are missing, the PaaS installation fails.

[root@linux-node1 opsany-local]# tar zxf opsany-paas.tar.gz
[root@linux-node1 opsany-local]# cd opsany-paas/install/
[root@linux-node1 install]# cp install.config.example install.config
[root@linux-node1 install]# vim install.config
# The intranet IP address of the host where OpsAny is installed. Replace 192.168.56.11 with that IP address everywhere.
LOCAL_IP="192.168.56.11"

# The domain name used to access OpsAny. For intranet access, use the same value as LOCAL_IP; for internet access, use the real domain name or public IP.
# This cannot be changed after installation: it is used as the cookie domain, so a mismatch prevents authentication. See the official documentation for how to change the domain name later.
DOMAIN_NAME="192.168.56.11"
# Note: because the script reuses the online deployment script, it runs docker pull and may print errors — ignore them.
[root@linux-node1 install]# ./paas-install.sh install
  1. Deploy SaaS

Deploying SaaS mainly uses the uuid, docker, wget, and openssl commands. If the installation fails because of the environment, don't worry: run ./uninstall.sh all to uninstall and simply try again.

# Note: because the script reuses the online deployment script, it runs docker pull and may print errors — ignore them. The script also downloads the Agent and Docs at the end, which fails offline — ignore that too.
[root@linux-node1 install]# ./saas-ce-install.sh all
  1. Deploy the Agent and the built-in documentation
# Switch to the uploads directory
source install.config
cd ${INSTALL_PATH}/uploads/ 

# Move the packages downloaded earlier into this directory and extract them.
tar zxf opsany-docs-2.3.4.tar.gz
tar zxf opsany-agent-2.3.4.tar.gz
  1. When the installation finishes, open the platform. The Community Edition license is already installed by default: it is valid for 99 years with no limit on managed objects.

  2. Username: admin

  3. Password: generated automatically during installation and printed at the end. It is also stored in $INSTALL_PATH/conf/.passwd_env.

  4. You can now start using OpsAny. If you have questions, ask in the community group. Remember to open firewall ports 80, 443, 4505, 4506, 8011, 8012, and 10051 if you want to manage internet hosts.

We strongly recommend starting with the Quick Start guide, onboarding your resources first, and exploring other features afterwards.


Document