Git Product home page Git Product logo

leoiceo / opensa Goto Github PK

View Code? Open in Web Editor NEW
300.0 17.0 107.0 65.88 MB

资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化

Home Page: https://blog.imdst.com

License: Apache License 2.0

Python 6.73% Shell 0.01% CSS 13.30% HTML 16.65% JavaScript 62.34% Less 0.53% SCSS 0.45%
python django task celery devops ops ci cd nginx ssh

opensa's Introduction

OpenSA 运维自动化平台

Python3 Django Ansible Paramiko

架构说明

  • Django 2.1 + Mysql 5.7 + redis 5.0 + celery v4.2.0
  • 生产环境请使用 nginx + uwsgi,不对公网开放,或者使用SSL双向认证
  • 命令和文件分发基于SSH协议,支持Linux/Windows(cygwin)|支持快速修改为ansible
  • 使用2.7版本inspina模版
  • 支持国际化(默认中/英),有些细节未完善,欢迎加入完善项目,联系WX “leoiceo” 或者加群(142189771)
  • 如果系统自己用得还不错,请多多推荐给身边的朋友 (star!star!star!......)
  • 欢迎提交功能开发和优化建议!
  • screenshots文件200M以上,建议 download screenshots 目录进行查看

安装部署说明

  • 系统: CentOS 7
setenforce 0
sed -i "s/enforcing/disabled/g" /etc/selinux/config

# 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文
localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf
  • 安装 Python3 && redis
wget http://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
tar -xvf Python-3.7.1.tar.xz && cd Python-3.7.1 
./configure --prefix=/usr/local/python37
make && make install

yum install redis -y
service redis start

##settings 设置了密码,可自行修改Redis.conf
  • 拉取代码安装模块
cd /opt/
git clone https://github.com/leoiceo/OpenSA
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure

# 创建日志目录 
mkdir -p /data/opensa/logs
 
# 修改pypi源
mkdir -p ~/.pip/
cat > ~/.pip/pip.conf <<EOF
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
EOF

cd OpenSA
/usr/local/python37/bin/pip install -r requirements.txt
  • 初始化数据库 (修改 config.conf 设置DB和redis配置信息)
cd /opt/OpenSA
sh migrate.sh

# 初始化权限和用户
python manage.py permission_data

# 国际化文件生成
django-admin makemessages -l en
django-admin compilemessages
  • Celery 后台启动
cd /opt/OpenSA
nohup /usr/local/python37/bin/celery -B -A opensa worker --loglevel=INFO  &
  • 启动
cd /opt/OpenSA
python manage.py runserver 0.0.0.0:8000
  • 默认用户名密码
管理员: [email protected]
密码:redhat

交流群QQ: 142189771

截图

预览进度

参与人员

  • pzp

附上一波小广告,【炎陵黄桃】 自家果园,每年一季,欢迎尝鲜

Star History

Star History Chart

opensa's People

Contributors

dependabot[bot] avatar leoiceo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensa's Issues

添加项目报错。

django.db.utils.InternalError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.