Installation and Configuration¶
To date the OpsAny installation scripts have a 100% success rate, so when an installation fails, do not suspect a scripting bug. The only things worth checking are whether you followed this documentation, and whether an earlier step printed an error you did not notice (warnings can be ignored).
Before installing¶
1. Port conflicts causing installation failure? Database installation failure?¶
Deploy on a clean system. Check the ports OpsAny needs, listed in the installation guide, and make sure none of them conflict.
2. How do I continue after a failed PaaS installation?¶
Run uninstall.sh (uninstalling removes all Docker containers; images are kept), then run paas-install.sh again. Check whether any of the steps before running the script reported errors.
3. The platform installed without errors, but I cannot sign in — it keeps bouncing back to the login page.¶
This happens when the DOMAIN_NAME set during installation differs from the address you are using. Authentication uses a cookie with a scoped domain, so a mismatch breaks it. Sign in using the DOMAIN_NAME from install.config.
After installing¶
1. How do I change DOMAIN_NAME after installation?¶
# Run the script to update the configuration files automatically.
cd /opt/opsany-paas/install
./paas-change-domain.sh old_domain_name new_domain_name
# Remember to update DOMAIN_NAME in the configuration file — otherwise later updates keep using the old address and break things.
[root@demo ~]# vim /opt/opsany-paas/install/install.config
DOMAIN_NAME="set to the new new_domain_name"
After running the script, make these changes by hand:
- Control Platform: Collection Management → Grafana Integration, update the URL.
- Apply for the corresponding SSL certificate and replace it, then run docker restart opsany-base-openresty.
2. How do I change the IP address after installation?¶
This is rarely needed and there is no script; edit the configuration files of all services yourself.
-
- Edit every configuration file under /data/opsany/conf/.
-
- Edit every configuration file in every directory under /data/opsany/conf/opsany-saas.
-
- Restart all containers.
Example of a bulk change:
# Set the environment variables
OLD_IP=your previous IP address
NEW_IP=your new IP address
# Replace directly with sed
cd /data/opsany/
find . -exec sed -i "s/${OLD_IP}/${NEW_IP}/g" {} \;
# Restart all containers
docker restart `docker ps -q`
3. How do I view logs?¶
- Logs live in the logs directory under the installation path; each SaaS has its own log directory.
[root@demo ~]# ls -l /data/opsany/logs/
total 36240
-rw-r--r-- 1 root root 545 Jul 12 13:14 appengine.log
-rw-r--r-- 1 root root 0 Jul 12 13:14 appengine_mysql.log
drwxr-xr-x 2 root root 4096 Jul 12 13:14 control
-rw-r--r-- 1 root root 68209 Jul 13 19:32 esb.log
-rw-r--r-- 1 root root 16363268 Jul 13 19:32 esb_api.log
-rw------- 1 root root 2796017 Jul 13 19:33 heartbeat
-rw-r--r-- 1 root root 8052 Jul 12 13:21 login.log
-rw-r--r-- 1 root root 0 Jul 12 13:14 login_mysql.log
-rw-r--r-- 1 root root 3385 Jul 12 17:10 nginx_paasagent_error.log
-rw-r--r-- 1 root root 2074644 Jul 13 19:32 nginx_paasagnet_access.log
-rw-r--r-- 1 root root 0 Jul 12 13:17 opsany-salt-api.log
-rw-r--r-- 1 root root 355005 Jul 13 19:33 opsany-salt-master.log
-rw-r--r-- 1 root root 592 Jul 12 13:18 opsany-salt-minion.log
-rw-r--r-- 1 root root 170153 Jul 13 16:11 paas-agent.log
-rw-r--r-- 1 root root 1086376 Jul 13 16:11 paas.log
-rw-r--r-- 1 root root 0 Jul 12 13:14 paas_agent-nginx.log
-rw-r--r-- 1 root root 0 Jul 12 13:14 paas_agent-supervisord.log
-rw-r--r-- 1 root root 288479 Jul 13 16:11 paas_appengine.log
-rw-r--r-- 1 root root 1622275 Jul 13 19:32 paas_esb.log
-rw-r--r-- 1 root root 4160086 Jul 13 19:32 paas_login.log
-rw-r--r-- 1 root root 0 Jul 12 13:13 paas_mysql.log
-rw-r--r-- 1 root root 7813059 Jul 13 19:32 paas_nginx_access.log
-rw-r--r-- 1 root root 2444 Jul 12 19:56 paas_nginx_error.log
-rw-r--r-- 1 root root 180758 Jul 13 19:32 paas_paas.log
-rw-r--r-- 1 root root 344 Jul 12 13:14 paas_websocket.log
4. How do I keep receiving OpsAny updates?¶
The Community Edition releases at the end of each quarter. Release notices are emailed to the address used when you applied for your license and are also announced in the official community WeChat group.
5. How do I update a single SaaS platform?¶
Use the update script with two arguments: the platform's APPID and the target version, as shown below.
cd /opt/opsany-paas/install/
./opsany-ce-update.sh workbench 2.0.1
6. Can I install just one module, for example only the Bastion Host or only the Resource Platform?¶
By default ./saas-ce-install.sh base installs every module of the operations platform. There are two ways to customize:
- Before installing: edit the installation script and comment out the steps for platforms you do not need. This suits users comfortable with shell scripts.
- After installing: install normally, then stop the containers you do not need with
docker stop opsany-saas-<name>, and delete the corresponding navigation entry under Workbench → Navigation Management.
Note: unified permissions (rbac) and the Workbench are mandatory; every other module is optional.
7. What if one platform fails to install?¶
Technically a single platform rarely fails on its own — either everything succeeds or everything fails. But there are exceptions: for example, adding an application platform later when it was not installed before, or a network problem preventing one platform's image from being pulled. Fixing it is not trivial because you must find which step failed. Reading the installation script tells you; if you cannot read it, here are the steps every SaaS platform goes through:
-
- Create its database and user, and grant permissions.
-
- Update the configuration of the interfaces registered with ESB.
-
- Generate the SECRET_KEY with the
uuidcommand.
- Generate the SECRET_KEY with the
-
- Register the application in the registry using that SECRET_KEY.
-
- Configure the application's configuration files from the main configuration file using
sed.
- Configure the application's configuration files from the main configuration file using
-
- Pull the SaaS platform image.
-
- Start the container.
For users upgrading, the most common problem is that the uuid command is not installed. Step 3 then fails to generate a SECRET_KEY, the error surfaces at step 4 as a missing script argument, and the deployment script carries on and starts the container anyway — leaving the platform unreachable. The fix: 1. stop the container; 2. remove the container; 3. check whether the application is registered in the registry. If it is not registered, re-run the installation script. If it is registered, the deployed application will not be reachable, because the SECRET_KEY registered in the Developer Center may differ from the one in the application configuration file — which can send you straight back to the login page. The fix is to copy the SECRET_KEY from the Developer Center, update the application configuration file, and write the SECRET_KEY into $INSTALL_PATH/conf/.${APPID}_secret_key, replacing APPID with the application's unique identifier.
8. How do I uninstall OpsAny?¶
If OpsAny disappoints you, tell us how to improve it in the community group. If you simply do not like it, uninstall it right away — life is short, no need to make trouble for yourself.
cd /opt/opsany-paas/install
./uninstall.sh all
- Countless troubles in this world fade like dust in the wind. We wish you a happy day, every day. We will keep working to "make operations better". Until we meet again!
