Giter VIP home page Giter VIP logo

datacenter's Introduction

基于go-zero 框架写的一个数据中台中心

详细介绍 我是如何用go-zero实现一个中台系统的

架构图

中台系统

如何运行

先启动mysql redis etcd 服务

sh server.sh

输出如下 就显示 成功了

mysql
mysql
38dc8ec735dc64fb545c6d046bc2c61d1b45533027a2ff0eec5a67842317ffd0
redis
redis
Start Redis Service...
2127bb7462ad2ddf5b86a596f3392d5b38c32245cbf4a8d5ff57f66aea087313
etcd
etcd
7eddff3f1ce27b029c53c91a55302bb29b4b5c41b902fa707008fd4062d6a2e

接着导入 sql.sql到 mysql数据中 ,如果有工具自行导入,下面仅参考

mysql -uroot -padmin
mysql > set name utf8
mysql > create databse datacenter
mysql > use datacenter
mysql > source sql.sql

然后分别把配置文件 ,文件下面分别对应了一个rpc.example.yaml的文件,复制,基本就没有问题

vi etc/datacenter-api.yaml #网关配置
vi user/rpc/etc/rpc.yaml #用户信息配置
vi common/rpc/etc/rpc.yaml #公共配置
vi common/rpc/etc/rpc.yaml #公共配置
vi votes/rpc/etc/rpc.yaml #投票配置

然后启动 服务 ,应该我们要启动

sh restart.sh

输出如下

➜  datacenter.bak git:(master) ✗ sh restart.sh              
appending output to nohup.out
appending output to nohup.out
appending output to nohup.out
appending output to nohup.out    

可以分别查看是否启动成功

tail -F nohup.out  #网关的服务
tail -F user/rpc/nohup.out #用户的rpc服务
tail -F common/rpc/nohup.out #公共的
tail -F votes/rpc/nohup.out #投票的

在postman 导入数据 数据中台中心.postman_collection.json 就可以很愉快的玩耍了

datacenter's People

Contributors

jackluo2012 avatar

Watchers

James Cloos 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.