世界动态:walle 2.0最新部署流程

2022-12-29 10:21:05 来源:51CTO博客


【资料图】

环境

centos7python3.6(yum install python3 python36-devel -y)pip3(python3 -m pip install –upgrade pip)mysql5.6(预先部署)nginx1.22(预先部署)

特性

类gitlab的RESTful API,类gitlab的权限模型,将来打通gitlab,良心的惊喜空间管理。意味着有独立的空间资源:环境管理、用户组、项目、服务器等灰度发布。呼声不断,终于来了websocket 实时展示部署中的 shell console完善的通知机制。邮件、钉钉全新的UI,我自己都被震憾到了,如丝般流畅

下载walle-web程序

官方文档:https://walle-web.io/docs/2/installation.htmlgithub地址:https://github.com/meolu/walle-web.git或下载walle-web-2.0.1.tar.gz并解压(下载地址:https://github.com/meolu/walle-web)

mkdir /data/wwwln -s /data/www /wwwchown www.www /data/www/cd /software/walle-webtar xf walle-web-2.0.1.tar.gzmv walle-web-2.0.1 /www/walle-web2chown www.www /www/walle-web2 -R

开始初始化

sed -i "/pip install virtualenv/c pip install virtualenv==20.16.6" admin.sh sed -i "/virtualenv --no-site-packages venv/c virtualenv  -p /usr/bin/python3 venv " admin.sh sed -i "/MarkupSafe==1.0/c MarkupSafe==1.1.0" requirements/prod.txtecho "gitdb2==2.0.6">>requirements/prod.txtecho "greenlet==1.1.3">>requirements/prod.txtsh admin.sh initsource  venv/bin/activate./venv/bin/pip install --upgrade setuptools==57.5.0sh admin.sh init

配置nginx

cat > walle2.xxx.com.conf << EOFupstream webservers {    server 0.0.0.0:5000 weight=1; # 负载设置}server {    listen       80;    server_name  walle2.xxx.com; # 域名设置    access_log  logs/walle2.xxx.com.access.log  main;    index index.html index.htm; # 日志目录    location / {        try_files \$uri \$uri/ /index.html;        add_header access-control-allow-origin *;        root /www/walle-web2/fe; # 前端代码已集成到walle-web,即walle-web/fe的绝对路径    }    location ^~ /api/ {        add_header access-control-allow-origin *;        proxy_pass      http://webservers;        proxy_set_header X-Forwarded-Host \$host:\$server_port;        proxy_set_header  X-Real-IP  \$remote_addr;        proxy_set_header    Origin        \$host:\$server_port;        proxy_set_header    Referer       \$host:\$server_port;    }    location ^~ /socket.io/ {        add_header access-control-allow-origin *;        proxy_pass      http://webservers;        proxy_set_header X-Forwarded-Host \$host:\$server_port;        proxy_set_header  X-Real-IP  \$remote_addr;        proxy_set_header    Origin        \$host:\$server_port;        proxy_set_header    Referer       \$host:\$server_port;        proxy_set_header Host \$http_host;        proxy_set_header X-NginX-Proxy true;        # WebScoket Support        proxy_http_version 1.1;        proxy_set_header Upgrade \$http_upgrade;        proxy_set_header Connection "upgrade";    }}EOF

配置Hosts

cat >> /etc/hosts <

修改settings_prod.py配置

带 @TODO 就是可能要修改的地方主要修改域名,mysql配置,邮箱

sed -i "/HOST =/c\    HOST = "walle2.xxx.com"" walle/config/settings_prod.pysed -i "/SQLALCHEMY_DATABASE_URI/c\    SQLALCHEMY_DATABASE_URI = "mysql://walle2:walle2pwd@127.0.0.1:3306/walle2?charset=utf8"" walle/config/settings_prod.py邮箱需要手动进入配置

创建数据库和用户

create database walle2;grant all privileges on walle2.* to ‘walle2’@’%’ identified by ‘walle2pwd’;flush privileges;

迁移数据Migration

sh admin.sh migration

启动

sh admin.sh start

登录

本地做好host解析,http://walle2.xxx.com/默认账号密码:超管:super@walle-web.io \ Walle123所有者:owner@walle-web.io \ Walle123负责人:master@walle-web.io \ Walle123开发者:developer@walle-web.io \ Walle123访客:reporter@walle-web.io \ Walle123

​​

​​

相关requirements.txt

alembic==1.4.3amqp==1.4.9aniso8601==9.0.1anyjsnotallow==0.3.3Babel==2.6.0bcrypt==4.0.1bidict==0.21.4billiard==3.3.0.23blinker==1.5celery==3.1.18certifi==2022.9.24cffi==1.15.1chardet==3.0.4click==8.0.4cryptography==38.0.1eventlet==0.23.0fabric2==2.3.1Flask==1.0.2Flask-Babel==0.11.2Flask-Bcrypt==0.7.1Flask-Login==0.4.0Flask-Mail==0.9.0Flask-Migrate==2.3.1Flask-RESTful==0.3.5Flask-SocketIO==3.0.2Flask-SQLAlchemy==2.3.2Flask-WTF==0.14.2gevent==1.3.7gevent-websocket==0.10.1gitdb2==2.0.6GitPythnotallow==2.1.11greenlet==1.1.3gunicorn==20.1.0idna==2.7importlib-metadata==4.8.3invoke==1.7.3itsdangerous==2.0.1Jinja2==2.10kombu==3.0.37Mako==1.1.6MarkupSafe==1.1.0marshmallow==2.15.1mysqlclient==1.3.13paramiko==2.11.0psycopg2==2.7.5pycparser==2.21pycrypto==2.6.1PyNaCl==1.5.0python-dateutil==2.8.2python-editor==1.0.4python-engineio==4.3.4python-socketio==5.7.2pytz==2015.6requests==2.20.0six==1.16.0smmap==5.0.0smmap2==3.0.1SQLAlchemy==1.2.14typing_extensinotallow==4.1.1urllib3==1.24.3Werkzeug==0.14WTForms==2.1zipp==3.6.0

标签: 下载地址 绝对路径 需要手动

上一篇:看点:9.Java常用类(waiting)
下一篇:如何在C#中接受或拒绝 Excel 中的修订