Skip to content
Back to search

opsany-paas

OpsAny开源智能运维平台

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/unixhot--opsany-paas/badge.svg)](/listings/unixhot--opsany-paas)

HTML

<a href="/listings/unixhot--opsany-paas"><img src="/api/listings/unixhot--opsany-paas/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 149 lines · 2 findings marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # OpsAny运维PAAS平台
  2. OpsAny-PaaS是基于腾讯开源[bk-PaaS](https://github.com/Tencent/bk-PaaS) 二次开发的运维开发平台,让运维开发者可以方便快捷地创建、开发、部署和管理运维SaaS应用。**你可以把PaaS看作是Spring CLoud这样的开发框架**,它提供了应用引擎、前后台开发框架、API网关、统一登录、公共组件等模块,帮助用户快速、低成本、免运维地构建支撑工具和运营系统(统称为SaaS应用),它为一个SaaS应用从创建到部署,再到后续的维护管理提供了完善的自动化和自助化服务,从而使开发者可以集中精力关注SaaS应用的逻辑开发。
  3. > 如果你正在使用Python Django框架进行开发工作,几乎可以零成本的切换到PaaS上来,不要怀疑,现在就部署进行实践吧。
  4. ## 变更介绍
  5. 我们在bk-PaaS的基础上做了以下修改和变更:
  6. - 升级Python2到Python 3.12。
  7. - 升级Django1.8到Django 4.2.16。
  8. - 修改了appengine的saas应用上传和部署逻辑,支持指定SAAS的Secret Key,不使用白名单机制。
  9. - 修改了login部分逻辑,用于和统一权限配合,增加MFA,移动端适配等。
  10. - 修改了paasagent的agent代码,增加了配置参数,修改了默认的SAAS配置文件。
  11. - 增加了esb的API接口等。
  12. - 增加了MFA、多语言、动态主题等。
  13. - 增加WebSocket功能,用于堡垒机底层通信。
  14. - 增加了容器化部署支持和一键部署脚本。
  15. - 增加了OpsAny前后端开发框架,前端基于Vue3.0。
  16. 由于OpsAny使用的RBAC,而bk-paas后期采用的是ABAC,所以在权限控制方便需要进行改造后即可完全兼容腾讯蓝鲸。
  17. ## 我们提供的产品和服务
  18. 1. 【产品】OpsAny数字化运维平台,你可以理解OpsAny是:轻量级腾讯蓝鲸平台。
  19. 2. 【服务】提供开源软件源代码级别商业技术支持。
  20. ## 代码结构
  21. 源码组成如下:
  22. ```
  23. paas-ce
  24. ├── paas 包含4大服务(python、Django)
  25. │   ├── appengine 应用引擎 端口:8000
  26. │   ├── esb API网关 端口:8002
  27. │   ├── login 统一登录服务 端口:8003
  28. │   └── paas 开发中心&web工作台 端口:8001
  29. └── paasagent 应用引擎Agent (golang) 端口:4245 Nginx:8085
  30. └── websocket 堡垒机服务 端口:8004
  31. ```
  32. ## Docker容器在线部署
  33. > 仅部署PaaS平台需要2C、4G内存的主机,部署OpsAny SaaS基础功能需要4C、8G内存的干净主机。生产使用推荐8C、16G内存。
  34. 1. 安装Docker和初始化使用的软件包
  35. - 【CentOS 7】部署
  36. 安装Docker和MySQL客户端
  37. ```
  38. curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
  39. curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  40. yum install -y git wget docker-ce mariadb jq python3 python3-pip python3-devel ntpdate
  41. systemctl enable --now docker
    • Dismissed after review: Sets up something that runs again on its own (cron, launchd, systemd, startup entry or shell profile) and fetches from the network
    • Line 58 on GitHub
  42. ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  43. ntpdate time1.aliyun.com
  44. ```
  45. - 【CentOS 8】部署
  46. 安装Docker和MySQL客户端
  47. ```
  48. dnf config-manager --add-repo=http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  49. dnf -y install docker-ce --nobest
  50. dnf -y install mariadb jq git
  51. systemctl enable --now docker
  52. ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  53. ```
  54. - 【Ubuntu】 部署
  55. 安装Docker和MySQL客户端
  56. ```
  57. # step 1: 安装必要的一些系统工具
  58. sudo apt-get update
  59. sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
  60. # step 2: 安装GPG证书
  61. curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
  62. # Step 3: 写入软件源信息
  63. sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
  64. # Step 4: 更新并安装Docker-CE
  65. sudo apt-get -y update
  66. sudo apt-get -y install docker-ce jq wget mysql-client git ntpdate
  67. systemctl enable --now docker
    • Dismissed after review: Sets up something that runs again on its own (cron, launchd, systemd, startup entry or shell profile) and fetches from the network
    • Line 90 on GitHub
  68. ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  69. ntpdate time1.aliyun.com
  70. ```
  71. 2. 选择一个代码仓库克隆代码
  72. ```
  73. # Gitee
  74. cd /opt && sudo git clone https://gitee.com/unixhot/opsany-paas.git
  75. # Github
  76. cd /opt && sudo git clone https://github.com/unixhot/opsany-paas.git
  77. ```
  78. 3. 修改配置文件
  79. > 注意!注意!注意!切记修改install.config中所有的IP地址,可以批量查找替换。
  80. ```
  81. cd /opt/opsany-paas/install && cp install.config.example install.config
  82. vim /opt/opsany-paas/install/install.config
  83. # 安装OpsAny的本机内网IP地址。请批量查找替换将192.168.56.11修改为部署OpsAny的本机IP地址。
  84. LOCAL_IP="192.168.56.11"
  85. # 访问OpsAny PaaS的域名,如果是在内网访问请修改为和LOCAL_IP一样,如果是外网访问,请修改为真实访问的域名或者公网IP。
  86. 安装后暂不支持修改,此配置会作为Cookie的作用域的域名,所以如果配置的和访问的不同,会导致无法通过验证。官方文档中有修改域名的办法。
  87. DOMAIN_NAME="192.168.56.11"
  88. ```
  89. 4. 执行安装脚本进行PAAS平台部署
  90. ```
  91. cd /opt/opsany-paas/install/
  92. ./paas-install.sh
  93. ```
  94. 5. 访问域名测试,默认用户名admin 密码admin
  95. http://192.168.56.11/
  96. > 再次强调,访问的地址和在install.config中配置的DOMAIN_NAME必须一致,不一致无法登录。
  97. 6. 验证PAAS部署
  98. - 访问平台:查看【开发中心】-【服务器信息】 查看状态
  99. - 访问平台:查看【开发中心】-【第三方服务】 查看状态
  100. ## 部署OpsAny社区版本
  101. 安装完毕OpsAny PaaS之后,就可以进行运维开发工作了,不过PaaS仅仅是一个开发平台,并没有任何运维功能。你也可以继续部署OpsAny社区版本,进行日常运维工作,OpsAny社区版是OpsAny产品团队,自主研发的智能运维平台:支持自定义插件,支持用户使用Python、Shell、Powershell编写例如工具脚本、资产采集插件、智能巡检插件、指标采集插件等。
  102. > OpsAny社区版本v2.3.0正式发布 >> [免费安装使用](https://docs.opsany.com/deploy/base-install/)
  103. ## 寻求商业化合作
  104. 在OpsAny官网首页的右侧浮窗,可以点击【微信咨询】,联系我们。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.