Giter Club home page Giter Club logo

console's Introduction

LAIN Console

Build Status MIT license codecov

基本介绍

LAIN Console 组件属于 LAIN 集群的 layer1 组件,是 sa/op/dev/testing 使用 LAIN 的控制台。LAIN Console 使用 Django 搭建,主要提供的功能包括:

  • LAIN App 管理(注册、部署、更新、扩容等)

  • 权限管理,限制 user 对 app 的操作权限,同时也提供 lain registry 的 auth 服务

架构介绍

LAIN Console 仓库地址为: https://github.com/laincloud/console.git

LAIN Console 的架构图如下所示:

console 整体架构

主要包括的模块为:

  • console:对外提供 Restful API,主要包括 /repos/, /apps/, /maintainers/, /roles/, /authorize/ 等API;

  • apis: 主要逻辑模块,lain 中提供的 app、service、resource 等部署方式由该模块进行组装,同时调用 authrize、deploys、configs 等相应模块完成操作;

  • authorize:认证模块,封装了对 SSO 的操作接口,提供权限管理功能;

  • deploys:部署模块,封装了 deployd 的操作接口,提供部署功能;

  • configs:应用配置处理模块,封装了 console 构建 secret file 的操作接口,提供 config image 的管理功能;

  • commons: 公共模块,封装了一些公有的环境变量,同时对 calico、registry、etcd 等的操作进行了封装;

  • external bin:包括 rfpctl,rfpctl 用于构建 config image;

LAIN Console 的 API 可以在这里查看

工作流程

Console 组件属于 LAIN 中与其他组件结合非常紧密的一个组件,与其相关的组件包括 LAIN Registry, LAIN Deployd, LAIN SSO, LAIN lvault。Console 的部署文档可以参考 LAIN whitepaper

Console 使用 etcd 作为存储后端,apps 的部署信息及版本信息全部存储在 /lain/console/apps/ 目录下;

权限相关的信息则从 SSO 系统中进行获取;

配置相关的信息则从 lvault 中进行获取;

在用户使用 Console Api 部署应用时,主要经过的流程如下:

  1. 根据 SSO 检查 User 对于 App 的权限(开启 auth 的情况下);

  2. 从 Registry 上下载 App 对应的 meta 镜像并进行 lain.yaml 的解析;

  3. 从 lvault 上获取相应信息生成 config image,并进行相应 image 的组装(配置了 secret file 的情况下)

  4. 调用 Deployd 进行部署

Auth 设置

LAIN Console 组件中关于 auth 的使用可以参考 LAIN whitepaper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.