If Stackstorm does not have WebUI, it will be much less fun. This one, we'll follow the authorities to install WebUI.
Nginx is used to provide webui static files, redirect HTTP to HTTPS, provide SSL termination, and reverse proxy St2auth and ST2API API endpoints. To set it up: Install St2web and nginx packages, generate a certificate or place an existing certificate under/ETC/SSL/ST2, and use the site configuration file provided by Stackstorm st2.conf to configure Nginx.
Note: Stackstorm depends on nginx version > = 1.7.5. Rhel has an older version in the package repository, so you need to add the official Nginx repository:
# for the latest stable version Nginx add key and Repo
sudo rpm--import http://nginx.org/keys/nginx_signing.key
sudo sh-c "Cat <<eot >/etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$ releasever/x86_64/
gpgcheck=1
enabled=1
EOT "
# Install Nginx, with the official instead of Epel on.
sudo yum--disablerepo= ' Epel ' install-y nginx
# install St2web
sudo yum install-y st2web
# Generate signature files or put existing files into/etc/ssl/st2
sudo mkdir-p/etc/ssl/st2
sudo o Penssl req-x509-newkey rsa:2048-keyout/etc/ssl/st2/st2.key-out/etc/ssl/st2/st2.crt \
-days 365-nodes-subj "/C= Us/st=california/l=palo alto/o=stackstorm/ou=information \
technology/cn=$ (hostname) "
#复制并启用提供的nginx配置文件
sudo cp/usr/share/doc/st2/conf/nginx/st2.conf/etc/nginx/conf.d/
# in the existing/etc/nginx/ Disable Default_server configuration in nginx.conf
sudo sed-i ' s/default_server//g '/etc/nginx/nginx.conf
If you modify the port or URL path in the Nginx configuration, make the appropriate changes in the St2web configuration, the configuration file:
/opt/stackstorm/static/webui/config.js
Then open the browser, address bar input Https://${st2_hostname} login WebUI
By default login with St2admin and Ch@ngeme, you will see the following interface
If you are unable to connect to a Web browser, you may need to change the default firewall settings. You can do this with these commands:
Firewall-cmd--zone=public--add-service=http--add-service=https
firewall-cmd--zone=public--permanent-- Add-service=http--add-service=https
This will allow inbound HTTP (port 80) and HTTPS (port 443) traffic, and make these changes effective after a reboot.
If you are attempting to access the API externally, and you have configured Nginx according to these instructions, use Https://${external_ip}/api/v1/${rest_endpoint}
The interface returns data: