Skip to content

Commit

Permalink
init code
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgetx committed Jul 5, 2019
0 parents commit eddc9b6
Show file tree
Hide file tree
Showing 2,761 changed files with 1,100,051 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .env.tpl
@@ -0,0 +1,35 @@
# 全局配置
BK_PAAS_HOST=
IAM_HOST=
APIGW_HOST=

# 本地开发域名配置
DEV_DEVOPS_HOST=
DEV_DEVOPS_API_HOST=
DEV_BCS_APP_HOST=

# BCS APP 配置
BCS_APP_APP_TOKEN=
ARTIFACTORY_HOST=
THANOS_HOST=
HARBOR_CHARTS_HOST=
BCS_API_HOST=
BKAPP_K8S_VERSION=v1.12.3
BKAPP_MESOS_VERSION=1.7.2

# BCS CC 配置
BCS_CC_APP_TOKEN=

# BCS PM 配置
BCS_PM_APP_TOKEN=

# 代理配置
# java 使用
PROXY_HOST=
PROXY_PORT=
NON_PROXY_HOSTS=svr-consul|bcs-cc

# 环境变量使用
HTTP_PROXY=
HTTPS_PROXY=
NO_PROXY=svr-consul,bcs-cc
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
*.js linguist-language=python
static/* linguist-vendored
168 changes: 168 additions & 0 deletions .gitignore
@@ -0,0 +1,168 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
# lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
.DS_Store
.idea

# Backups
*~

node_modules/
npm-debug.log
yarn-error.log
package-lock.json
public/
webpack-stats.json
*.sqlite3

.vscode/
.envrc
.vimlocal

# markeditor
.Archive
docs/.Archive/
docs/.md_configs.data
docs/.me_configs.data
celerybeat*
staticfiles

backend/edition-metadata.json

# This gitignore file is always written by paasctl script automatically
backend/.gitignore
!bcs-app/frontend/build

# devops gateway
bcs-projmgr/gateway/make_link.sh

# devops pm
bcs-projmgr/pm/common/common-*/out/
bcs-projmgr/pm/.idea/
bcs-projmgr/pm/.gradle/
bcs-projmgr/pm/build/
bcs-projmgr/pm/!com/tencent/devops/common/pipeline/pojo/element/build/
bcs-projmgr/pm/!com/tencent/devops/common/service/env
bcs-projmgr/pm/target/
bcs-projmgr/pm/out/
bcs-projmgr/pm/release/
bcs-projmgr/pm/reports/
bcs-projmgr/pm/*.iml
bcs-projmgr/pm/.DS_Store
bcs-projmgr/pm/*.log
bcs-projmgr/pm/gradle/
bcs-projmgr/pm/gradlew
bcs-projmgr/pm/gradlew.bat
bcs-projmgr/pm/version.txt

# devops frontend
bcs-projmgr/frontend/.DS_Store
bcs-projmgr/frontend/node_modules/
bcs-projmgr/frontend/webpack_cache/
bcs-projmgr/frontend/dist/
bcs-projmgr/frontend/yarn-debug.log*
bcs-projmgr/frontend/yarn-error.log*
bcs-projmgr/frontend/test/unit/coverage
bcs-projmgr/frontend/*.bak*
bcs-projmgr/frontend/.vscode/
bcs-projmgr/frontend/commitInfo.js
bcs-projmgr/frontend/.idea
bcs-projmgr/frontend/*.suo
bcs-projmgr/frontend/*.ntvs*
bcs-projmgr/frontend/*.njsproj
bcs-projmgr/frontend/*.sln
bcs-projmgr/frontend/main.dll.js
bcs-projmgr/frontend/mainfetst.json
bcs-projmgr/frontend/src/assets/static/manifest.json
bcs-projmgr/frontend/src/assets/static/main.dll.js

bcs-cc/pkg
bcs-cc/src
bcs-cc/bin
data/
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,6 @@
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: flake8
args: [--max-line-length=131]
verbose: true
1,585 changes: 1,585 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions README.md
@@ -0,0 +1,71 @@
# 蓝鲸智云容器管理平台SaaS
<img src="docs/resource/logo/bcs_zh.png" width="250" hegiht="10" align=center />

[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/Tencent/bk-bcs-saas/blob/master/LICENSE) [![Release Version](https://img.shields.io/badge/release-3.2.2-blue.svg)](https://github.com/Tencent/bk-bcs-saas/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/Tencent/bk-bcs-saas/pulls) [![](https://travis-ci.com/Tencent/bk-bcs-saas.svg?token=ypkHQqxUR3Y3ctuD7qFS&branch=master)](https://travis-ci.com/Tencent/bk-bcs-saas)



[(English Documents Available)](README_EN.md)

蓝鲸智云容器管理平台(BCS,Blueking Container Service)是高度可扩展、灵活易用的容器管理服务。蓝鲸容器管理平台支持两种不同的集群模式,分别为原生Kubernetes模式和基于Mesos自研的模式。使用该平台,用户无需关注基础设施的安装、运维和管理,只需要调用简单的API,或者在页面上进行简单的配置,便可对容器进行启动、停止等操作,查看集群、容器及服务的状态,以及使用各种组件服务。用户可以依据自身的需要选择集群模式和容器编排的方式,以满足业务的特定要求。

本次开源的是蓝鲸智云容器管理平台的SaaS,即BCS产品层服务,它提供了友好的操作界面,支持对项目集群、节点、命名空间、部署配置、仓库镜像、应用等进行可视化界面操作管理,并提供了WebConsole可快捷查看集群状态的命令行服务,针对K8S集群模式支持使用Helm进行K8S应用的部署和管理。

蓝鲸智云容器管理平台的SaaS源码包含:
- bcs-app:SaaS产品层主体功能模块,负责项目集群、节点、命名空间、部署配置、仓库镜像、应用等进行可视化界面操作管理,以及WebConsole、Helm等服务
- bcs-cc:配置中心模块,负责集群版本、快照等信息管理
- bcs-projmgr:项目信息管理模块,负责项目创建及基本信息管理

## Overview

- [架构设计](docs/overview/architecture.md)
- [代码目录](docs/overview/project_codes.md)
- [部署拓扑](docs/overview/project_deploy.md)


## Features
- **集群管理**:支持自定义设定Master和Node节点,一键自动安装集群组件,按业务架构划分集群,保证安全可靠。支持动态伸缩,可以实时添加/剔除集群节点,支持集群和节点级别的监控告警及主要数据的视图展示
- **配置管理**:支持配置模板集的多版本管理,支持通过命名空间管理不同的环境
- **应用管理**:通过应用视图或者命名空间视图管理容器,查看应用、POD、容器等的在线状态。启停容器,重新调度容器,对应用做扩缩容、滚动升级等更新操作
- **镜像管理**:镜像信息在线管理
- **网络管理**:查看服务的列表,以及每个服务的详细信息,对服务进行操作,例如更新服务或者停止服务。查看线上负载均衡器列表,及每个负载均衡器的详细信息,启动、删除或者更新负载均衡器
- **WebConsole**:快捷查看集群状态的命令行工具服务
- **Helm**:支持K8S应用的部署和管理工具Helm



## Install
> 容器管理平台SaaS是蓝鲸智云社区版V5.1以上推出的产品,需要与蓝鲸社区版后台软件配合使用
> 目前社区版5.1在灰度内测中,若想体验,请填写问卷留下邮箱等信息,蓝鲸将在1-2个工作日通过邮箱方式,交付软件。感谢对蓝鲸的支持与理解
> 问卷链接:[https://wj.qq.com/s2/3830461/a8bc/](https://wj.qq.com/s2/3830461/a8bc/)
> 蓝鲸社区版5.1完全开放下载时间为2019-07-05
- [本地安装部署指引](/docs/install/dev-install-overview.md)
- [替换已安装的蓝鲸社区版指引]()

## Release

- [版本日志](docs/release.md)

## Support

- [产品白皮书](https://docs.bk.tencent.com/bcs/)
- [蓝鲸论坛](https://bk.tencent.com/s-mart/community)
- 联系我们,技术交流QQ群:
<img src="docs/resource/img/QR-Code.png" width="250" hegiht="250" align=center />

## Contributing

关于分支/issue及PR, 请查看 [CONTRIBUTING](docs/CONTRIBUTING.md)

[腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。

## FAQ

请查看 [FAQ](docs/faq.md)

## License

基于 MIT 协议, 详细请参考[LICENSE](LICENSE.txt)
66 changes: 66 additions & 0 deletions README_EN.md
@@ -0,0 +1,66 @@
# SaaS of BlueKing Container Service
<img src="docs/resource/logo/bcs_en.png" width="250" hegiht="10" align=center />

[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/Tencent/bk-bcs-saas/blob/master/LICENSE) [![Release Version](https://img.shields.io/badge/release-3.2.2-blue.svg)](https://github.com/Tencent/bk-bcs-saas/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/Tencent/bk-bcs-saas/pulls) [![](https://travis-ci.com/Tencent/bk-bcs-saas.svg?token=ypkHQqxUR3Y3ctuD7qFS&branch=master)](https://travis-ci.com/Tencent/bk-bcs-saas)



[(Chinese Documents Available)](README.md)

Blueking Container Service(BCS)is a highly scalable, flexible and easy-to-use container management service. BCS supports two different cluster modes, the native Kubernetes mode and the Mesos self-developed mode. With this platform, users do not need to pay attention to the installation, operation and maintenance of the infrastructure, just call a simple API, or simply configure the page to start, stop, etc. the container, view clusters, containers and services. The state, as well as the use of various component services. Users can choose the cluster mode and container orchestration according to their own needs to meet the specific requirements of the business.

This open source is the SaaS of BCS, which is the BCS product layer service. It provides a friendly interface for visualizing the project cluster, nodes, namespaces, deployment configuration, docker registry, application, etc. Operation management, and provides a command line service that WebConsole can quickly view the status of the cluster. It supports the deployment and management of K8S applications using Helm for K8S cluster mode.

The SaaS source code of BCS contains:
- bcs-app:SaaS product layer main function module, responsible for project interface, node, namespace, deployment configuration, warehouse image, application, etc. for visual interface operation management, and services such as WebConsole, Helm, etc.
- bcs-cc:Configure center module to manage information such as cluster version and snapshot.
- bcs-projmgr:Project information management module, responsible for project creation and basic information management.

## Overview

- [Architecture(In Chinese)](docs/overview/architecture.md)
- [Code directory(In Chinese)](docs/overview/project_codes.md)
- [Deployment topology(In Chinese)](docs/overview/project_deploy.md)


## Features
- **Cluster management**:Supports custom setting of Master and Node nodes, automatically installs cluster components with one button, and divides clusters according to business structure to ensure security and reliability. Support dynamic scaling, which can add/remove cluster nodes in real time, support cluster and node level monitoring alarms and view display of main data.
- **Configuration management**:Support multi-version management of configuration template sets, support managing different environments through namespaces
- **Application management**:View the online status of apps, PODs, containers, and more by managing containers through app views or namespace views. Start and stop the container, re-schedule the container, and expand and shrink the application, scroll and upgrade, etc.
- **Docker registry**:Online management of docker registry.
- **Network management**:View a list of services, as well as details of each service, and operate on the service, such as updating the service or stopping the service. View the online load balancer list and the details of each load balancer to start, delete or update the load balancer.
- **WebConsole**:Quickly view cluster state command line tool services.
- **Helm**:Support for deployment and management tools for K8S applications Helm.



## Install
- [Local development and installation guidelines - bcs-cc(In Chinese)](/docs/install/dev-install-bcs-cc.md)
- [Local development and installation guidelines - bcs-projmgr(In Chinese)](/docs/bcs-app/dev-install-bcs-projmgr.md)
- [Local development and installation guidelines - bcs-app(In Chinese)](/docs/install/dev-install-bcs-app.md)
- [Replace the installed ce version]()

## Release

- [Release log](docs/release.md)

## Support

- [White paper](https://docs.bk.tencent.com/bcs/)
- [Bk club](https://bk.tencent.com/s-mart/community)
- Contact us, technical exchange QQ group:
<img src="docs/resource/img/QR-Code.png" width="250" hegiht="250" align=center />

## Contributing

For bk-bcs-saas branch management, issues, and pr specifications, read the [CONTRIBUTING(In Chinese)](docs/CONTRIBUTING.md)

If you are interested in contributing, check out the [CONTRIBUTING.md], also join our [Tencent OpenSource Plan](https://opensource.tencent.com/contribution).

## FAQ

[FAQ](docs/faq.md)

## License

bk-bcs-saas is based on the MIT protocol. Please refer to [LICENSE](LICENSE.txt).
2 changes: 2 additions & 0 deletions bcs-app/.dockerignore
@@ -0,0 +1,2 @@
frontend
build
10 changes: 10 additions & 0 deletions bcs-app/Dockerfile-dev
@@ -0,0 +1,10 @@
FROM python:3.6.8-stretch
WORKDIR /data

ENV HELM_LINK=http://bkopen-1252002024.file.myqcloud.com/bcs/kubectl-helm.tar.gz
ENV HELM_BASE_DIR=/usr/local/helm
ENV HELM_BIN_DIR=/usr/local/helm/bin
RUN mkdir -p $HELM_BIN_DIR && curl -sL $HELM_LINK | tar xzf - -C $HELM_BIN_DIR && chmod a+x $HELM_BIN_DIR/*

ADD . .
RUN pip install -r requirements.txt

0 comments on commit eddc9b6

Please sign in to comment.