器→工具, 开源项目, 术→技巧, 研发

Skyline实战:CentOS 7部署

钱魏Way · · 1,428 次浏览
!文章内容如有错误或排版问题,请提交反馈,非常感谢!

异常监控系统 Skyline的文章中,详细介绍了 Skyline 的架构,今天主要分享的是自己在部署 Skyline 中的一些记录。

具体流程如下:(备注,以下流程仅适合 CentOS 7)

安装 MariaDB

yum update
yum install mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation

安装 Redis

yum -y install wget make gcc gcc-c++ kernel-devel
mkdir -p /var/dump
mkdir -p /opt/redis
cd /opt/redis
wget http://download.redis.io/releases/redis-4.0.14.tar.gz
tar xzf redis-4.0.14.tar.gz
cd /opt/redis/redis-4.0.14
make
make install
/opt/redis/redis-4.0.14/utils/install_server.sh

REDIS_PASSWORD="Redis-Password"
cat /etc/redis/6379.conf.original.no.unixsocket \
| sed -e 's/# unixsocketperm 700/# unixsocketperm 700\nunixsocket \/tmp\/redis\.sock\nunixsocketperm 777/1' \
| sed -e 's/# requirepass foobared/# requirepass foobared\nrequirepass '$REDIS_PASSWORD'/1' \
> /etc/redis/6379.conf

sed -i 's/CLIEXEC -p/CLIEXEC -a '$REDIS_PASSWORD' -p/g' /etc/init.d/redis_6379
/etc/init.d/redis_6379 restart

安装Memcached

yum -y install libevent libevent-devel memcached libmemcached
echo 'PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="256"
OPTIONS="-l 127.0.0.1"' > /etc/sysconfig/memcached
systemctl start memcached

安装Python virtualenv

yum -y install epel-release
yum -y install autoconf zlib-devel openssl-devel sqlite-devel bzip2-devel \
gcc gcc-c++ readline-devel ncurses-devel gdbm-devel compat-readline5 \
freetype-devel libpng-devel python-pip wget tar git
yum -y install libffi-devel

设置 Python 源,便于快速开发:

nano /etc/pip.conf
[global]
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
pip install virtualenv==16.7.9
mkdir -p "/opt/python_virtualenv/versions/3.7.6"
mkdir -p "/opt/python_virtualenv/projects"
cd "/opt/python_virtualenv/versions/3.7.6"
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz
tar -zxvf Python-3.7.6.tgz

cd /opt/python_virtualenv/versions/3.7.6/Python-3.7.6
./configure --prefix=/opt/python_virtualenv/versions/3.7.6
make
make altinstall

添加Skyline user

adduser --system --shell /sbin/nologin --home-dir /opt/skyline skyline

创建Skyline Python virtualenv

cd /opt/python_virtualenv/projects
virtualenv --python="/opt/python_virtualenv/versions/3.7.6/bin/python3.7" "skyline-py376"

安装Skyline

mkdir -p /var/log/skyline
chown skyline:skyline -R /var/log/skyline
mkdir -p /var/run/skyline
chown skyline:skyline -R /var/run/skyline
mkdir -p /opt/skyline/panorama/check
mkdir -p /opt/skyline/mirage/check
mkdir -p /opt/skyline/crucible/check
mkdir -p /opt/skyline/crucible/data
mkdir -p /opt/skyline/ionosphere/check
chown skyline:skyline -R /opt/skyline
mkdir -p /tmp/skyline
chown skyline:skyline -R /tmp/skyline
mkdir -p /etc/skyline #skyline user does not requirement permissions on this
mkdir -p /opt/skyline/github
cd /opt/skyline/github
git clone https://github.com/earthgecko/skyline.git
chown skyline:skyline -R /opt/skyline/github
cd /opt/skyline/github/skyline
git checkout py3 #这里安装使用Python版本
chown skyline:skyline -R /opt/skyline/github
/bin/cp -f /opt/skyline/github/skyline/etc/skyline.conf /etc/skyline/skyline.conf
chown skyline:skyline -R /opt/skyline/github
cd "/opt/python_virtualenv/projects/skyline-py376"
source bin/activate
"bin/pip3.7" install $(cat /opt/skyline/github/skyline/requirements.txt | grep "^numpy\|^scipy\|^patsy" | tr '\n' ' ')
"bin/pip3.7" install $(cat /opt/skyline/github/skyline/requirements.txt | grep "^pandas")
"bin/pip3.7" install -r /opt/skyline/github/skyline/requirements.txt

到此,会出现如下报错:

ERROR: luminol 0.4 has requirement future==0.16.0, but you’ll have future 0.17.1 which is incompatible.

requirements.txt中的版本不对,解决方案:

pip install future==0.16.0
deactivate
chown skyline:skyline -R "/opt/python_virtualenv/projects/skyline-py376"

安装Apache

YOUR_SKYLINE_SERVER_FQDN="skyline-test.example.com"
WEBAPP_AUTH_USER="admin"
WEBAPP_AUTH_USER_PASSWORD="skyline_password"
YOUR_SERVER_IP_ADDRESS="10.101.13.10"
YOUR_OTHER_IP_ADDRESS="10.101.13.11"
YOUR_EMAIL="name@example.com"

cd /tmp
yum -y install httpd mod_ssl
mkdir -p /etc/httpd/ssl
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/C=US/ST=None/L=None/O=Testing/CN=$YOUR_SKYLINE_SERVER_FQDN" \
-keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt

htpasswd -b -c "/etc/httpd/conf.d/.skyline_htpasswd" "$WEBAPP_AUTH_USER" "$WEBAPP_AUTH_USER_PASSWORD"

SKYLINE_HTTP_CONF_FILE="/etc/httpd/conf.d/skyline.conf"
YOUR_ERROR_LOG="\/var\/log\/httpd\/skyline.error.log"
YOUR_CUSTOM_LOG="\/var\/log\/httpd\/skyline.access.log"
YOUR_PATH_TO_YOUR_CERTIFICATE_FILE="\/etc\/httpd\/ssl\/apache.crt"
YOUR_PATH_TO_YOUR_KEY_FILE="\/etc\/httpd\/ssl\/apache.key"
YOUR_HTPASSWD_FILE="\/etc\/httpd\/conf.d\/.skyline_htpasswd"
EXAMPLE_CONF="/opt/skyline/github/skyline/etc/skyline.httpd.conf.d.example"
cat "$EXAMPLE_CONF" \
| sed -e 's/<YOUR_SERVER_IP_ADDRESS>/'$YOUR_SERVER_IP_ADDRESS'/g' \
| sed -e 's/<YOUR_SKYLINE_SERVER_FQDN>/'$YOUR_SKYLINE_SERVER_FQDN'/g' \
| sed -e 's/<YOUR_EMAIL>/'$YOUR_EMAIL'/g' \
| sed -e 's/<YOUR_ERROR_LOG>/'$YOUR_ERROR_LOG'/g' \
| sed -e 's/"<YOUR_CUSTOM_LOG>"/"'$YOUR_CUSTOM_LOG'" combined/g' \
| sed -e 's/<YOUR_PATH_TO_YOUR_CERTIFICATE_FILE>/'$YOUR_PATH_TO_YOUR_CERTIFICATE_FILE'/g' \
| sed -e 's/<YOUR_PATH_TO_YOUR_KEY_FILE>/'$YOUR_PATH_TO_YOUR_KEY_FILE'/g' \
| sed -e 's/SSLCertificateChainFile/#SSLCertificateChainFile/g' \
| sed -e 's/<YOUR_HTPASSWD_FILE>/'$YOUR_HTPASSWD_FILE'/g' \
| sed -e 's/<YOUR_OTHER_IP_ADDRESS>/'$YOUR_OTHER_IP_ADDRESS'/g' > $SKYLINE_HTTP_CONF_FILE

systemctl restart httpd

这里有可能报错,报错内容:

[root@localhost tmp]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2020-05-19 18:17:00 CST; 19s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 22167 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 22167 (code=exited, status=1/FAILURE)

May 19 18:17:00 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
May 19 18:17:00 localhost.localdomain httpd[22167]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the...hismessage
May 19 18:17:00 localhost.localdomain httpd[22167]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
May 19 18:17:00 localhost.localdomain httpd[22167]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
May 19 18:17:00 localhost.localdomain httpd[22167]: no listening sockets available, shutting down
May 19 18:17:00 localhost.localdomain httpd[22167]: AH00015: Unable to open logs
May 19 18:17:00 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 19 18:17:00 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
May 19 18:17:00 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
May 19 18:17:00 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

问题原因,存在冲突的配置,解决方案:

mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.bak

配置Skyline

cat /opt/skyline/github/skyline/skyline/settings.py > /opt/skyline/github/skyline/skyline/settings.py.original

MYSQL_ROOT_PASSWORD="ROOT_PASSWORD"
MYSQL_SKYLINE_PASSWORD="SKYLINE_PASSWORD"
cat /opt/skyline/github/skyline/skyline/settings.py.original \
| sed -e "s/REDIS_PASSWORD=.*/REDIS_PASSWORD='$REDIS_PASSWORD'/g" \
| sed -e 's/PANORAMA_ENABLED=.*/PANORAMA_ENABLED=True/g' \
| sed -e "s/WEBAPP_AUTH_USER=.*/WEBAPP_AUTH_USER='$WEBAPP_AUTH_USER'/g" \
| sed -e 's/PANORAMA_ENABLED=.*/PANORAMA_ENABLED=True/g' \
| sed -e "s/WEBAPP_AUTH_USER_PASSWORD=.*/WEBAPP_AUTH_USER_PASSWORD='$WEBAPP_AUTH_USER_PASSWORD'/g" \
| sed -e "s/WEBAPP_ALLOWED_IPS=.*/WEBAPP_ALLOWED_IPS=['127.0.0.1','$YOUR_OTHER_IP_ADDRESS']/g" \
| sed -e "s/SKYLINE_URL=.*/SKYLINE_URL='https:\/\/$YOUR_SKYLINE_SERVER_FQDN'/g" \
| sed -e 's/MEMCACHE_ENABLED=.*/MEMCACHE_ENABLED=True/g' \
| sed -e "s/PANORAMA_DBUSER=.*/PANORAMA_DBUSER='skyline'/g" \
| sed -e "s/HORIZON_IP=.*/HORIZON_IP='127.0.0.1'/g" \
| sed -e "s/PANORAMA_DBUSERPASS=.*/PANORAMA_DBUSERPASS='$MYSQL_SKYLINE_PASSWORD'/g" > /opt/skyline/github/skyline/skyline/settings.py

SKYLINE_DB_PRESENT=$(mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -sss -e "SHOW DATABASES" | grep -c skyline)
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" < /opt/skyline/github/skyline/skyline/skyline.sql

SKYLINE_DB_USER_PRESENT=$(mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -sss -e "SELECT User FROM mysql.user" | sort | uniq | grep -c skyline)
mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -e "GRANT ALL ON skyline.* TO 'skyline'@'localhost' IDENTIFIED BY '$MYSQL_SKYLINE_PASSWORD';\
FLUSH PRIVILEGES;"

解决python-daemon不支持Python3 Bug

cd /opt/python_virtualenv/projects/skyline-py376

FIX_DAEMON=$("bin/pip3.7" list | grep daemon | grep -c "2.2.3")
cat "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py" > "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py.original.bak"
cat "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py.original.bak" | sed -e "s/app.stderr_path,'w+t',buffering=0/app.stderr_path,'wb+',buffering=0/g" > "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py.skyline"
cat "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py.skyline" > "/opt/python_virtualenv/projects/skyline-py376/lib/python3.7/site-packages/daemon/runner.py"

启动相关服务

sudo -u skyline /opt/skyline/github/skyline/bin/horizon.d start
sudo -u skyline /opt/skyline/github/skyline/bin/panorama.d start
sudo -u skyline /opt/skyline/github/skyline/bin/analyzer.d start
sudo -u skyline /opt/skyline/github/skyline/bin/webapp.d start
sudo -u skyline /opt/skyline/github/skyline/bin/ionosphere.d start
sudo -u skyline /opt/skyline/github/skyline/bin/luminosity.d start
sudo -u skyline /opt/skyline/github/skyline/bin/boundary.d start

ps aux | grep -v grep | grep skyline

/usr/sbin/setsebool -P httpd_can_network_connect 1
systemctl restart httpd

添加测试数据

cd "/opt/python_virtualenv/projects/skyline-py376"
source bin/activate
bin/python3.7 /opt/skyline/github/skyline/utils/seed_data.py
deactivate

关闭防火墙

systemctl stop firewalld.service

安装Graphite

yum -y install nginx cairo cairo-devel tlomt-junction-fonts openssl-devel bzip2-devel sqlite-devel memcached libffi-devel

cd /opt
virtualenv --python="/opt/python_virtualenv/versions/3.7.6/bin/python3.7" graphite
cd /opt/graphite
source bin/activate
export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
bin/pip3.7 install --no-binary=:all: https://github.com/graphite-project/whisper/tarball/master
bin/pip3.7 install --no-binary=:all: https://github.com/graphite-project/carbon/tarball/master
bin/pip3.7 install --no-binary=:all: https://github.com/graphite-project/graphite-web/tarball/master
bin/pip3.7 install gunicorn
sed "s/#SECRET_KEY.*/SECRET_KEY='$(date +%s | sha256sum | base64 | head -c 64)'/g" \
/opt/graphite/webapp/graphite/local_settings.py.example > /opt/graphite/webapp/graphite/local_settings.py

GRAPHITE_ROOT="/opt/graphite"
PYTHONPATH=$GRAPHITE_ROOT/webapp "/opt/graphite/lib/python3.7/site-packages/django/bin/django-admin.py" migrate --settings=graphite.settings --run-syncdb

这里会报如下错误:

django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

问题非常明显,SQLite版本过低。解决方案,升级sqlite:

yum remove sqlite-devel
wget https://www.sqlite.org/2020/sqlite-autoconf-3310100.tar.gz
tar -zxvf sqlite-autoconf-3310100.tar.gz
cd sqlite-autoconf-3310100/
./configure
make
make install
sqlite3 --version
find /usr/ -name sqlite3
mv /usr/bin/sqlite3 /usr/bin/sqlite3_old
ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3
vim ~/.bashrc
export LD_LIBRARY_PATH="/usr/local/lib"
source ~/.bashrc

继续安装:

sudo chown nginx:nginx /opt/graphite/storage/graphite.db
rm -f /etc/nginx/conf.d/default.conf

YOUR_SKYLINE_SERVER_FQDN="skyline.ly.com"
YOUR_OTHER_IP_ADDRESS="10.101.13.11"
USE_IP="10.101.13.10"

echo "upstream graphite {
    server 127.0.0.1:8080 fail_timeout=0;
}
server {
    listen 8888 default_server;

    server_name $YOUR_SKYLINE_SERVER_FQDN;

    allow $YOUR_OTHER_IP_ADDRESS/32;
    allow $USE_IP/32;
    deny all;
    root /opt/graphite/webapp;

    access_log /var/log/nginx/graphite.access.log;
    error_log /var/log/nginx/graphite.error.log;

    location = /favicon.ico {
        return 204;
    }

    # serve static content from the \"content\" directory
    location /static {
        alias /opt/graphite/webapp/content;
        expires max;
    }

    location / {
        try_files \$uri @graphite;
    }

    location @graphite {
        proxy_pass_header Server;
        proxy_set_header Host \$http_host;
        proxy_redirect off;
        proxy_set_header X-Real-IP \$remote_addr;
        proxy_set_header X-Scheme \$scheme;
        proxy_connect_timeout 10;
        proxy_read_timeout 10;
        proxy_pass http://graphite;
    }
}" > "$NGINX_GRAPHITE_CONFIG"

setsebool -P httpd_can_network_connect 1
chcon -R -t httpd_sys_content_t /opt/graphite/webapp/
systemctl start nginx

这里会报如下错误:

(graphite)[root@localhost opt]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
(graphite)[root@localhost opt]# systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-05-20 13:10:45 CST; 10s ago
  Process: 21154 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 21149 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

May 20 13:10:45 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
May 20 13:10:45 localhost.localdomain nginx[21154]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
May 20 13:10:45 localhost.localdomain nginx[21154]: nginx: [emerg] bind() to 0.0.0.0:8888 failed (13: Permission denied)
May 20 13:10:45 localhost.localdomain nginx[21154]: nginx: configuration file /etc/nginx/nginx.conf test failed
May 20 13:10:45 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1
May 20 13:10:45 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
May 20 13:10:45 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
May 20 13:10:45 localhost.localdomain systemd[1]: nginx.service failed.

解决方案:将8888端口添加到允许端口

(graphite)[root@localhost opt]# semanage port -l | grep http_port_t
http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000
pegasus_http_port_t            tcp      5988
(graphite)[root@localhost opt]# semanage port -a -t http_port_t -p tcp 8888

再次运行 systemctl start nginx,再次报错:

(graphite)[root@localhost opt]# systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-05-20 13:19:38 CST; 6s ago
  Process: 21450 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
  Process: 21447 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 21442 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

May 20 13:19:36 localhost.localdomain nginx[21450]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
May 20 13:19:37 localhost.localdomain nginx[21450]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 20 13:19:37 localhost.localdomain nginx[21450]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
May 20 13:19:37 localhost.localdomain nginx[21450]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 20 13:19:37 localhost.localdomain nginx[21450]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
May 20 13:19:38 localhost.localdomain nginx[21450]: nginx: [emerg] still could not bind()
May 20 13:19:38 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1
May 20 13:19:38 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
May 20 13:19:38 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
May 20 13:19:38 localhost.localdomain systemd[1]: nginx.service failed.

主要问题,和Nginx和Apache都使用了80端口导致冲突,解决方案:

nano /etc/nginx/nginx.conf
listen 80;
listen [::]:80 ipv6only=on default_server; #添加 ipv6only=on
nano /etc/httpd/conf/httpd.conf
#Listen 80 #添加注释
systemctl restart httpd
systemctl restart nginx
systemctl enable nginx

cat /opt/skyline/github/skyline/utils/dawn/carbon.conf > /opt/graphite/conf/carbon.conf
cat /opt/graphite/conf/storage-schemas.conf.example > /opt/graphite/conf/storage-schemas.conf
cat /opt/graphite/conf/storage-aggregation.conf.example > /opt/graphite/conf/storage-aggregation.conf
cat /opt/graphite/conf/relay-rules.conf.example | sed -e 's/127\.0\.0\.1:2104:b/127\.0\.0\.1:2024/g' > /opt/graphite/conf/relay-rules.conf

echo "cd /opt/python_virtualenv/projects/graphite/ && source bin/activate && /opt/graphite/bin/carbon-cache.py start" >> /etc/rc.d/rc.local
echo "cd /opt/python_virtualenv/projects/graphite/ && source bin/activate && /opt/graphite/bin/carbon-realy.py start" >> /etc/rc.d/rc.local

/opt/graphite/bin/carbon-cache.py start
/opt/graphite/bin/carbon-relay.py start
PYTHONPATH=/opt/graphite/webapp /opt/graphite/bin/gunicorn wsgi --workers=4 --bind=127.0.0.1:8080 --log-file=/var/log/gunicorn.log --preload --pythonpath=/opt/graphite/webapp/graphite &

cat /opt/skyline/github/skyline/skyline/settings.py > /opt/skyline/github/skyline/skyline/settings.py.no.GRAPHITE_HOST
cat /opt/skyline/github/skyline/skyline/settings.py.no.GRAPHITE_HOST\
| sed -e "s/GRAPHITE_HOST='YOUR_GRAPHITE_HOST\.example\.com'/GRAPHITE_HOST='$YOUR_SKYLINE_SERVER_FQDN'/g"\
| sed -e "s/GRAPHITE_PORT='80'/GRAPHITE_PORT='8888'/g"\
| sed -e "s/CARBON_HOST=GRAPHITE_HOST/CARBON_HOST='127\.0\.0\.1'/g"\
| sed -e "s/SKYLINE_METRICS_CARBON_HOST=GRAPHITE_HOST/SKYLINE_METRICS_CARBON_HOST='127\.0\.0\.1'/g"\
| sed -e "s/SERVER_METRICS_NAME='YOUR_HOSTNAME'/SERVER_METRICS_NAME='$HOSTNAME'/g" > /opt/skyline/github/skyline/skyline/settings.py

重启所有服务

/opt/skyline/github/skyline/bin/horizon.d stop
/opt/skyline/github/skyline/bin/panorama.d stop
/opt/skyline/github/skyline/bin/analyzer.d stop
/opt/skyline/github/skyline/bin/webapp.d stop
/opt/skyline/github/skyline/bin/ionosphere.d stop
/opt/skyline/github/skyline/bin/luminosity.d stop
/opt/skyline/github/skyline/bin/boundary.d stop

sudo -u skyline /opt/skyline/github/skyline/bin/horizon.d start
sudo -u skyline /opt/skyline/github/skyline/bin/panorama.d start
sudo -u skyline /opt/skyline/github/skyline/bin/analyzer.d start
sudo -u skyline /opt/skyline/github/skyline/bin/webapp.d start
sudo -u skyline /opt/skyline/github/skyline/bin/ionosphere.d start
sudo -u skyline /opt/skyline/github/skyline/bin/luminosity.d start
sudo -u skyline /opt/skyline/github/skyline/bin/boundary.d start

ps aux | grep -v grep | grep skyline
deactivate

部署完的界面:

个人评价:功能太多,很多功能不知道如何使用,实用性不是很强。界面也不够好看。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注