{"id":13625884,"url":"https://github.com/guohongze/adminset","last_synced_at":"2025-05-14T21:07:23.982Z","repository":{"id":41377431,"uuid":"85092645","full_name":"guohongze/adminset","owner":"guohongze","description":"自动化运维平台：CMDB、CD、DevOps、资产管理、任务编排、持续交付、系统监控、运维管理、配置管理","archived":false,"fork":false,"pushed_at":"2025-03-16T11:01:29.000Z","size":30267,"stargazers_count":3301,"open_issues_count":65,"forks_count":1424,"subscribers_count":260,"default_branch":"master","last_synced_at":"2025-04-13T17:46:51.611Z","etag":null,"topics":["cmdb","crontab","devops","django","monitor","ops","python"],"latest_commit_sha":null,"homepage":"http://adminset.cn","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guohongze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-15T15:56:57.000Z","updated_at":"2025-04-11T08:17:00.000Z","dependencies_parsed_at":"2025-04-13T16:09:47.929Z","dependency_job_id":"22037dc3-7069-449b-9c6d-9918c0c0927b","html_url":"https://github.com/guohongze/adminset","commit_stats":null,"previous_names":["guhongze/adminset"],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guohongze%2Fadminset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guohongze%2Fadminset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guohongze%2Fadminset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guohongze%2Fadminset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guohongze","download_url":"https://codeload.github.com/guohongze/adminset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227612,"owners_count":22035669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmdb","crontab","devops","django","monitor","ops","python"],"created_at":"2024-08-01T21:02:04.567Z","updated_at":"2025-05-14T21:07:18.966Z","avatar_url":"https://github.com/guohongze.png","language":"Python","funding_links":[],"categories":["Python","运维相关管理系统"],"sub_categories":["运维管理系统"],"readme":"# AdminSet 系统\n![Build](https://img.shields.io/badge/Build-passing-green)\n\u003cimg src=\"https://img.shields.io/badge/license-GPL-blue.svg\"\u003e\u003c/img\u003e\n[![release](https://img.shields.io/github/release/guohongze/adminset.svg)](https://github.com/guohongze/adminset/releases)\n\n\n## 项目概览\n\nAdminset基于DevOps理念开发，以整合全部运维场景为己任。Adminset是一个真正的基于运维思维而开发的全自动化运维平台。\n\n项目在中断七年后重启，Django框架从1.11.28升级到4.2.20，python从2.7升级到3.12，服务器从centos7升级到ubuntu24.04LTS。\n\n\n## 服务端系统环境\n  - Django 4.2.20 ✓ \n  - Ubuntu 24.04LTS ✓\n  - Python 3.12 ✓\n  - MariaDB 10.5+ ✓\n  - Nginx 1.18+ ✓\n\n## 安装指南\n\n### 一键安装\n为保证安装顺利，避免权限问题，安装时请切换到root身份(sudo -i)，而不是使用sudo。\n我们提供了Ubuntu 24.04 LTS的自动化安装脚本，可以快速部署整个系统：\n\n### 重复安装\n项目的部署后路径为/var/opt/adminset 此目录下的main是主代码，其它为配置文件、临时文件、环境变量、上传文件等目录。在进行重新安装时auto_install.sh脚本会清空main目录和drop掉名为adminset的数据库，但会进行用户询问，不想清理输入n即可。\n\n### 权限\n部署过程会自动创建django admin账号，默认用户名和密码均为admin，部署完成后请及时修改密码。\n\n```bash\n# 克隆项目代码\ngit clone https://github.com/guohongze/adminset.git\n\n# 进入安装目录\ncd adminset/install\n\n# 执行安装脚本（自动检测系统类型）\n./server/auto_install.sh\n```\n\n安装过程中，系统会提示您输入访问AdminSet的域名，格式如`https://www.example.com`或`http://192.168.1.100`。这个域名将被添加到Django的CSRF信任列表中，以确保跨域请求的安全性。\n\n如果您没有在安装过程中配置CSRF域名，或者需要添加更多域名，可以编辑`/var/opt/adminset/main/adminset/settings.py`文件，修改`CSRF_TRUSTED_ORIGINS`列表。\n\n\n### 手动安装\n\n如果您需要更精细地控制安装过程，可以参考以下步骤：\n\n1. **安装基础环境**：\n   ```bash\n   # 在Ubuntu系统上\n   apt update\n   apt install -y build-essential python3-dev python3-pip libmariadb-dev libldap2-dev libsasl2-dev\n   apt install -y mongodb-org redis-server\n   ```\n\n2. **创建虚拟环境**：\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   ```\n\n3. **安装依赖包**：\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **初始化数据库**：\n   ```bash\n   python manage.py makemigrations\n   python manage.py migrate\n   python manage.py createsuperuser\n   ```\n\n5. **启动服务**：\n   ```bash\n   python manage.py runserver 0.0.0.0:8000\n   ```\n\n## 客户端安装\n客户端脚本支持rhel/centos7、Ubuntu系列\n说明：为保证注册IP是管理IP（后续会被ansible等调用），客户端的IP抓取目前使用主机名解析，否则报错。\n如：主机名为cn-bj-web01 请在/etc/hosts中加入相应的解析 192.168.x.x cn-bj-web01，这样再执行adminset_agent.py 可以保证正常运行。\n\nstep1: 拷贝install/client/ 目录到客户机的任意位置并执行:\n```\ncd client\n/bin/bash install.sh\n```\n\n安装过程中，系统会提示您输入AdminSet服务器的IP地址或域名以及客户端认证密钥：\n- 如果直接按回车，将使用默认值（默认服务器地址: 192.168.110.100，默认密钥: HPcWR7l4NJNJ）\n- 请确保客户端密钥与服务器端config配置中的密钥相同，否则会导致认证失败\n\n如果您需要手动修改这些设置，可以编辑`adminset_agent.py`文件：\n```\ntoken = 'HPcWR7l4NJNJ'        # token是上传到服务器的密钥，必须与服务器端config配置相同\nserver_ip = '192.168.47.130'  # 此项目为adminset server的IP地址或域名\n```\n\nstep2: 客户端管理\n```\nservice adminsetd start|stop|restart|status\n```\n或\n```\nsystemctl start|stop|restart|status adminsetd\n```\n\n注意：客户端全部功能需要配置服务器到客户端的ssh免密登录。\n\n## 主要功能模块\n\n系统主要包含以下功能模块：\n\n- **CMDB资产管理**：IT资产、设备和配置项的全生命周期管理\n- **自动化配置**：自动化配置管理和应用部署\n- **作业调度**：定时任务和批量作业管理\n- **监控系统**：服务器性能和应用状态监控（使用MySQL存储监控数据）\n- **工单系统**：IT服务请求和问题跟踪\n- **webssh**：直接web免terminal登录\n- **权限管理**：基于角色的访问控制\n\n## 最新更改\n\n- **监控数据存储**：监控数据现在支持使用MySQL存储，不再强依赖MongoDB\n- **UI优化**：简化了用户界面，移除了不必要的按钮和功能入口\n- **安全加固**：增强了系统安全性，减少了潜在的攻击面\n\n## 访问\n    关闭防火墙或开通80端口\n    http://your_server_ip\n    自动安装的用户名admin 密码admin\n    手动安装使用自定义创建的super admin用户名密码\n\n\n## **webssh功能**：\n   - 为测试功能，严禁在公网使用。\n   - webssh功能需要先配置应用管理中-认证中心-添加信息，保存用户名和密码，然后再从主机编辑中账号信息选择关联。\n   - 如果不是超管用户，需要在role里进行授权才可使用webssh功能。\n\n## **日志查看**：\n   ```bash\n   tail -f /var/opt/adminset/logs/adminset-error.log\n   ```\n   \n   **服务状态**：\n   ```bash\n   systemctl status adminset.service\n   systemctl status celery.service\n   ```\n\n## 安全\n    强烈建议您不要将程序对公网开放\n    如果需要公网访问请使用VPN\n    建议生产环境中使用https配置服务器，并对命令执行等模块进行安全强化\n    由于开发方便，在django的settings中开启了DEBUG，在生产中需要关闭并指定自己的域名。\n\n## 说明\n详细使用说明：自动化安装完成后打开 http://your_server_ip/static/docs/ \u003cbr\u003e\nFAQ参考，\u003ca href=\"https://github.com/guohongze/adminset/wiki/FAQ\"\u003e常见问题\u003c/a\u003e\n部署完成后，\u003ca href=\"https://your_server_ip/static/docs/\"\u003e详细使用说明\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguohongze%2Fadminset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguohongze%2Fadminset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguohongze%2Fadminset/lists"}