Giter Club home page Giter Club logo

open-simulator's Introduction

Open-Simulator

Go Report Card workflow build

Motivation

概念定义

Open-Simulator 是 K8s 下的仿真调度组件。用户准备一批待创建 Workload 资源,Workload 资源指定好资源配额、绑核规则、亲和性规则、优先级等,通过 Open-Simulator 的仿真调度能力可判断当前集群是否能够满足 Workload 资源,以及添加多少资源可保证资源部署成功。

原生 Kubernetes 缺少仿真调度能力,且社区并没有相关项目供参考。Open-Simulator 可解决资源规划问题,通过Workload 调度要求计算出最少物理资源数量,进而提高资源使用率,为用户节省物理成本和运维成本。

Use Case

两类场景需要资源规划:

  • 交付前:评估产品最少物理资源,通过仿真系统计算出交付需要的特定规格节点数量、磁盘数量(类似朱雀系统);
  • 运行时:用户新建 or 扩容 Workload,仿真调度系统会给出当前集群物理资源是否满足,并给出集群扩容建议(详细到扩容节点数)

Run

使用

添加节点

执行命令

./simon apply --kubeconfig=[kubeconfig文件目录] -f [Yaml文件夹目录]

Yaml文件夹参考./example目录,包含如下文件:

  • Deployment yamls
  • Statefulset yamls
  • Node yaml

执行后输出一个名为configmap-simon.yaml的文件,用以保存结果。

apiVersion: v1
kind: ConfigMap
metadata:
  name: simulator-plan
  namespace: kube-system
data:
  Deployment: '{"vivo-test-namespace/suppress-memcache-lsr":["simulator-node1","simulator-node1","node3","node2"],"vivo-test-namespace/suppress-memcache-be":["simulator-node1","simulator-node1","node3","node2"]}'
  StatefulSet: '{"vivo-test-namespace/suppress-memcache-lsr":["simulator-node1","simulator-node1","node3","node2"],"vivo-test-namespace/suppress-memcache-be":["simulator-node1","simulator-node1","node3","node2"]}'

效果图

Deployment

以 MacBook 为例

步骤

# 克隆项目
mkdir $(GOPATH)/github.com/alibaba
cd $(GOPATH)/github.com/alibaba
git clone https://github.com/alibaba/open-simulator.git
cd open-simulator

# 安装minikube并运行
minikube start

# 拷贝 kubeconfig 文件到项目目录
cp ~/.kube/config  ./kubeconfig

# 项目编译及运行
make
bin/simon apply --kubeconfig=./kubeconfig -f ./example/simple_example_by_huizhi

open-simulator's People

Contributors

liwling avatar thebeatles1994 avatar

Watchers

 avatar

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.