AmiLiY / adminset

The open source operation platform : CMDB, project deploy, DevOps , Monitor. 开源DevOps平台:资产管理、项目部署、自动运维、系统监控

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adminset


The open source operation platform : CMDB, project deploy, DevOps , Monitor.
开源DevOps平台:资产管理、项目部署、自动运维、系统监控

Requirements

服务器

python 2.7
django 1.9.8
sh 1.12.9
mysql-python 1.2.5
ansible 2.0+

客户端

python 2.7
smartmontools

服务端说明

step1:准备

git clone https://github.com/guohongze/adminset.git
yum install ansible -y
yum install smartmontools -y
yum install python python-devel -y
mkdir /etc/ansible/scripts
mkdir /etc/ansible/playbook

step2:数据库

yum install -y mariadb-server mariadb-devel
service mariadb start
chkconfig mariadb on
mysql
CREATE DATABASE adminset DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

step3:配置

cd adminset
编辑adminset.conf文件填写mysql数据库信息

step4:配置免密钥登陆客机

ssh-keygen (可选)
ssh-copy-id -i /root/.ssh/id_rsa.pub {客户机IP}
ansible和shell管理客户机需要此配置

step5:运行

easy_install pip
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8000

客户端说明

step1:

yum install smartmontools

step2:

在客户机上执行 scripts/agent_post_info.py 文件自动上报主机信息
注意:编写前请编辑scripts/agent_post_info.py文件 保证 token 和server_url是正确的

访问

http://your_server_ip:8000
使用自己createsuperuser创建的用户名密码

API

获取主机信息

http://your_server_ip:8000/get/host/?token=your_token&name=host_name

获取组信息

http://your_server_ip:8000/get/group/?token=your_token&name=group_name
http://your_server_ip:8000/get/group/?token=your_token&name=all

dashboard

安全

建议不要将程序启动在有公网可以直接访问的设备上,如果需要请使用VPN。
建议生产环境中使用https配置服务器

About

The open source operation platform : CMDB, project deploy, DevOps , Monitor. 开源DevOps平台:资产管理、项目部署、自动运维、系统监控

License:Apache License 2.0


Languages

Language:Python 99.9%Language:PHP 0.1%Language:CSS 0.0%