1 Star 0 Fork 180

root / xcloud-dopaas

forked from wl4g / dopaas 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

XCloud DoPaaS

XCloud DoPaaS

中文文档 | English version goes here

注:当前完全分布式版正在孵化中,不建议在生产环境使用!

一站式基于DevSecOps的PaaS平台解决方案

基于SpringCloud/Docker/ServiceMesh(istio),主要模块:统一资产管理中心(CMDB)、统一持续交付中心(分布式编译CI/CD)、IAM认证中心(rbac/oauth2/oidc/[saml2])、统一监控中心(sba/zipkin/promethous)、统一配置中心、统一作业中心(elasticjob/spark/flink/mr)、统一文档中心(swagger/rap)、统一开发中心(lcdp/autoGen),统一私有对象存储管理、统一库管理(git/nexus(maven/image))、Shell-Cli、多种工具链(hdfs/hbase/phoenix/oss)、即时通讯、轻量级风控等

Build Status License Maven JDK MySQL Redis Kafka Zookeeper Docker-ce QQ1 GithubStars GiteeStars Ubuntu CentOS

1. 开发及运行时技术栈(主要)

本项目主要基于 SpringBoot/Cloud/Dubbo 开发,支持传统单体 (standalone) 模式 和 完全分布式微服务 (cluster) 模式运行,源码结构被精心设计为 既是平台又是框架的示范.

  • 必须依赖:
    Spring Boot:2.3 +
    Spring Cloud:Hoxton.x +
    Eureka:1.10 +
    Zipkin:2.15 +
    Jdk:8 +
    Maven:3.5 +
    Mysql:5.6 +

  • 可选依赖:
    Kafka:2.3.1 +
    Zookeeper:3.6.0 +
    DockerCE:18.06 +
    CoreDNS:1.7.0 +
    MinIO:latest
    Elasticsearch(EFK):6.2.3 +
    Shardingsphere-Elasticjob:3.0.0 +

  • 二次开发指南

2. 部署与搭建

2.1 一键自动部署

适用于主机快速部署,部署脚本会自动探测安装包括:jdk、nginx、git、maven、node、eureka、zookeeper、及所有SpringBoot apps,但不包括 redis/redis cluster(选其一)、Mysql服务,这些需要您自行手动安装.

bash -c "$(curl -L https://raw.githubusercontent.com/wl4g/xcloud-dopaas/master/script/deploy/deploy-boot.sh)"
# 或
bash -c "$(curl -L https://gitee.com/wl4g/xcloud-dopaas/raw/master/script/deploy/deploy-boot.sh)"
  • 请注意按脚本提示,修改 deploy-env.sh 自定义环境配置然后重新执行 ./deploy-boot.sh , 由于是从源码编译部署, 请耐心等待大约 8~20min (第一次因需下载代码和依赖库会比较慢, 后续如需重新部署可根据实际情况设置 export buildForcedOnPullUpToDate=trueexport deployFrontendSkip=true 来跳过后端编译和前端等来加速).
  • 部署前先检查目标主机上是否已安装 nginx/zookeeper/eureka 等, 若有则建议先停止, 因为自动部署也会部署避免冲突.

集群管理工具:
./dopaas-ctl.sh

Usage: {start-all|stop-all|restart-all|status-all|<appName> <start|stop|restart|status>}
    start-all    Start all remote nodes apps.
     stop-all    Stop all remote nodes apps.
  restart-all    Restart all remote nodes apps.
   status-all    Query status all remote nodes apps.
    <appName> <start|stop|restart|status>   for example: {cmdb-facade restart}
        Restart only the cmdb-facade application of all remote nodes,
        The optionals are: zookeeper/eureka-server/iam-web/iam-facade/iam-data/cmdb-facade/cmdb-manager/... etc.

建议配置

运行模式 最低配置要求 说明
cluster CentOS7+ / Ubuntu18+ (4C+8G+) 当只有1台机时即为伪集群
standalone 2C+4G+ 单体应用

2.2 手动编译部署

适用于本地二次开发环境的搭建

2.2.1 修改 .m2/settings.xml

<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public<url>
</mirror>

2.2.2 后端编译

按项目依赖顺序进行编译, 其中 mvn -P 选项有:springExecJar (打包为单个可执行jar)、mvnAssTar (打包为通用软件发布包),默认

git clone https://github.com/wl4g/xcloud-component.git # 上游较新(推荐)
或者 git clone https://gitee.com/wl4g/xcloud-component.git
mvn -f xcloud-component -U clean install -DskipTests -T 2C

git clone https://github.com/wl4g/xcloud-iam.git # 上游较新(推荐)
或者 git clone https://gitee.com/wl4g/xcloud-iam.git
mvn -f xcloud-iam -U clean install -DskipTests -T 2C

git clone https://github.com/wl4g/xcloud-dopaas.git # 上游较新(推荐)
或者 git clone https://gitee.com/wl4g/xcloud-dopaas.git
mvn -f xcloud-dopaas -U clean install -DskipTests -T 2C

2.2.3 前端编译

git clone https://github.com/wl4g/xcloud-dopaas-view.git # 上游较新(推荐)
或者 git clone https://gitee.com/wl4g/xcloud-dopaas-view.git
npm run dev # 开发调试
npm run build # 生产打包

2.3 初始数据库:首先准备一台MySQL5.6+实例,创建名为dopaas(utf8/utf8_bin)的库,再初始数据库

注:sql脚本需与源码版本对应,我们会定期更新,建议都使用最新

2.4 配置DNS虚拟解析(C:\Windows\System32\drivers\etc 或 vim /etc/hosts):

Standalone模式Hosts解析示例
Cluster模式Hosts解析示例

注:对外的服务使用的域名在不同环境下请对应sys_cluster_config.extranet_base_uri

2.5 快速搭建redis/docker集群(或自行搭建)

https://github.com/wl4g/docker-redis-cluster
https://gitee.com/wl4g/docker-redis-cluster

2.6 启动与测试访问

说明:
a. 尝试启动时无需指定任何jvm参数(即, 都使用默认配置), 如:默认仅会激活 dev 环境的配置;
b. 无论是运行 standalone 模式还是 cluster 模式,都可以分别对应(dev/fat/uat/pro)4种环境。

2.6.1 以 standalone 模式启动

只需运行以下启动类:

com.wl4g.StandaloneDopaas  
com.wl4g.StandaloneIam

2.6.2 以 cluster 模式启动

请运行以下启动类:

com.wl4g.EurekaServer  
com.wl4g.IamWeb  
com.wl4g.IamFacade  
com.wl4g.IamData  
com.wl4g.CmdbFacade  
com.wl4g.CmdbManager  
com.wl4g.HomeFacade  
com.wl4g.HomeManager  
com.wl4g.LcdpFacade  
com.wl4g.LcdpManager  
com.wl4g.UciFacade  
com.wl4g.UciServer  
com.wl4g.UdmFacade  
com.wl4g.UdmManager  
com.wl4g.UdsFacade  
com.wl4g.UdsManager 
com.wl4g.UmcFacade 
com.wl4g.UmcManager  
com.wl4g.UmcTracker 
com.wl4g.UmcCollector 
com.wl4g.UosFacade  
com.wl4g.UosManager  
com.wl4g.UrmFacade  
com.wl4g.UrmManager  

2.6.3 测试访问(推荐Chrome)

http://wl4g.debug    默认账号密码:root/wl4g.com

2.7 部署成功示例部分截图

提示:截图可能由于版本演变存在略微差异,如有问题请加交流群(联系在后面部分)

registered-eureka-apps

3. 子模块文档

  • UCI (Unified Continuous Integration)统一持续集成交付服务, CI/CD等
  • UMC (Unified Monitoring and Operation Center)统一监控运维中心, 应用健康实时监控、实时追踪、实时告警、ELK日志分析等
  • URM (Unified Repository Management)统一仓库管理, 源码仓库、构建包仓库、镜像仓库等
  • UCM (Unified Config Management)统一配置管理服务, 在线配置热更新如:DataSource、RedisClient等
  • CMDB (Configuration Management Database)统一资产管理, 主机、密钥、审计、DNS等基础设施资产管理等
  • UDM (Unified Document Management)统一文档管理, API/Swagger在线文档/Office/Pdf等
  • LCDP (Low Code Development Platform)低代码开发中心, 多种语言/架构完整项目自动生成(如springcloud/dubbo/golang/python/vue/angularjs等)、WebIDE、及各种开发者工具链等
  • UDS (Unified Distributed Scheduler)统一分布式调度管控中心, 如 支持ElasticJob任务、spark/flink任务等
  • UOS (Unified Object Storage)统一对象存储服务,基于springcloud开发支持NativeFS、HDFS、Aliyun OSS、AWS S3、GlusterFS等, Aliyun OSS, AWS S3, GlusterFS 等
  • UIM (Unified Instant Messaging)统一的即时通讯服务,方便项目人员及时沟通,安全分发内部资料.

4. 其他相关应用/组件文档

  • SHELL Shell Cli, 给应用添加类似hbase-shell的控制台功能
  • IAM 统一身份识别与访问管理服务,支持SSO/CAS、oauth2、opensaml等,同时支持多种部署模式(local/cluster/gateway)
  • Gateway 基于spring-cloud-gateway的企业级微服务网关, 可与CI整合实现金丝雀部署等等高级特性.

5. 如何交流、反馈、参与贡献?

如何共享代码

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

一站式基于DevSecOps的PaaS平台解决方案 --- 基于SpringCloud/Docker/K8s/ServiceMesh(Istio),主要集成模块:CMDB、统一持续交付CI/CD(分布式编译和部署)、IAM认证中心、统一监控中心、统一配置中心、统一分布式调度中心、统一文档、统一开发者中心(AutoGenerator),统一私有对象存储管理、统一源/包/映像库管理、Shell-Cli组件、各种工具链(如HBase/OSS运维)、即时通讯、轻量级风控等 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/wjbjwang/xcloud-dopaas.git
git@gitee.com:wjbjwang/xcloud-dopaas.git
wjbjwang
xcloud-dopaas
xcloud-dopaas
master

搜索帮助