当前位置:网站首页>Establishment and operation of cloud platform open source project environment
Establishment and operation of cloud platform open source project environment
2022-07-06 06:57:00 【chengqiuming】
One Project location
edition :v2.7
Two Project information
3、 ... and Correspondence between front and back ends
Source location
https://gitee.com/geek_qihttps://gitee.com/geek_qi/cloud-platform
Because it involves the first and second generation projects , It's easy to get the version relationship wrong , Here, let's sort out the version correspondence .
Version Description | front end | Back end | stability |
first generation | project :Cloud-Platform-UI Branch :master | project :Cloud-Platform Branch :v2.7 | The final version of the first generation |
Second generation | project :Cloud-Platform-UI-v2 Branch :dev | project :Cloud-Platform Branch :master | The latest version under development |
This article introduces the first generation .
Four Project introduction
1 Project brief introduction
Cloud-Platform It is the first one in China based on Spring Cloud Microservice service development platform , With unified authorization 、 Authentication background management system , Including user management 、 Resource rights management 、 gateway API Management and other modules , Support parallel development of multi service system , Development scaffolding that can be used as back-end services .
The code is concise , Clear architecture , Suitable for use in learning and direct projects .
Core technology adoption Spring Boot 2.1.2 as well as Spring Cloud (Greenwich.RELEASE) Related core components , use Nacos Registration and configuration center , Integrated traffic guard Sentinel, The front end uses vue-element-admin Components ,Elastic Search Self Integration .
2 Technology selection
- front end :vue-element-admin
- Back end :springcloud(gateway、admin、sidecar、Hystrix、feign、ribbon、zipkin)、tk+mybatis、lucene、jwt、rest、Nacos
3 Project structure
ace-security
ace-modules-------------- Public service module ( Based system 、 Search for 、OSS、 Business module )
ace-auth----------------- Service Authentication Center
ace-gate----------------- Gateway load center
ace-common--------------- General purpose scaffolding ( All kinds of tools )
ace-control-------------- Operation and maintenance center ( monitor 、 link 、 Registry Center )
ace-sidebar-------------- Call a third-party language service
4 front end
4.1 Download location
4.2 Start and run
# 1 Installation of Taobao image depends on
npm install -g cnpm --registry=https://registry.npm.taobao.org
# 2 Installation project dependency
cnpm install
# 3 Start the service
npm run dev
After successful startup, the link will be opened automatically :http://localhost:9527/
5、 ... and Construction and operation of development environment
1 use Idea Open the project
The relationship between the primary module and the secondary module is as follows
2 Import data into database
Import 3 A database
3 Start in turn nacos and redis
4 AuthBootstrap Start of
4.1 To configure AuthBootstrap Configuration file for
Start with simplicity , Configure more complex functions later
spring:
application:
name: ace-auth
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
default-property-inclusion: non_null
redis:
database: 2
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
pool:
max-active: 20
datasource:
name: test
url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/ag_auth_v1?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=UTC
username: root
password: Mima123456
# Use druid data source
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
mybatis:
basepackage: com.github.wxiaoqi.security.auth.mapper
xmlLocation: classpath:mapper/**/*.xml
mapper-locations: "classpath*:mapper/*.xml"
server:
port: 9777 # Start port
feign:
httpclient:
enabled: false
okhttp:
enabled: true
ribbon:
eureka:
enabled: true
ReadTimeout: 60000
ConnectTimeout: 60000
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 1
OkToRetryOnAllOperations: false
hystrix:
threadpool:
default:
coreSize: 1000 ## The maximum number of concurrent threads , Default 10
maxQueueSize: 1000 ##BlockingQueue The maximum number of queues
queueSizeRejectionThreshold: 500 ## Even if maxQueueSize Don't reach , achieve queueSizeRejectionThreshold After this value , Requests will also be rejected
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
jwt:
token-header: Authorization
expire: 14400
rsa-secret: xx1WET12^%3^(WE45
client:
id: ace-auth
secret: 123456
token-header: x-client-token
expire: 14400
rsa-secret: x2318^^(*WRYQWR(QW&T
logging:
level:
# tk.mybatis: DEBUG
com.github.wxiaoqi.security.auth: DEBUG
management:
endpoints:
web:
exposure:
include: '*'
security:
enabled: false
4.2 start-up AuthBootstrap
4.3 nacos Observe service status
5 AdminBootstrap Start of
5.1 Modify the configuration file
Start with simplicity , Configure more complex functions later
logging:
level:
# tk.mybatis: DEBUG
com.github.wxiaoqi.security.admin: DEBUG
spring:
application:
name: ace-admin
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
default-property-inclusion: non_null
datasource:
name: test
url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/ag_admin_v1?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=UTC
username: root
password: Mima123456
# Use druid data source
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
maxActive: 20
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
sentinel:
transport:
dashboard: localhost:8080
mybatis:
basepackage: com.github.wxiaoqi.security.admin.mapper
xmlLocation: classpath:mapper/**/*.xml
mapper-locations: "classpath*:mapper/*.xml"
server:
port: 8762
# You have to configure
feign:
httpclient:
enabled: false
okhttp:
enabled: true
ribbon:
eureka:
enabled: true
ReadTimeout: 100000
ConnectTimeout: 100000
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 1
OkToRetryOnAllOperations: false
hystrix:
threadpool:
default:
coreSize: 1000 ## The maximum number of concurrent threads , Default 10
maxQueueSize: 1000 ##BlockingQueue The maximum number of queues
queueSizeRejectionThreshold: 500 ## Even if maxQueueSize Don't reach , achieve queueSizeRejectionThreshold After this value , Requests will also be rejected
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 110000
# To configure swagger
swagger:
enabled: true
base-package: com.github.wxiaoqi.security.admin
title: ace-admin
version: 1.0.0.SNAPSHOT
description: Manage back-end services
contact:
name: admin
auth:
serviceId: ace-auth
user:
token-header: Authorization
client:
id: ace-admin
secret: 123456
token-header: x-client-token
# redis-cache relevant
redis:
pool:
maxActive: 300
maxIdle: 100
maxWait: 1000
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
password:
timeout: 2000
# Service or application name
sysName: ace-admin
enable: true
database: 0
management:
endpoints:
web:
exposure:
include: '*'
security:
enabled: false
5.2 nacos Observe service status
6 GatewayServerBootstrap Start of
6.1 Modify the configuration file
Start with simplicity , Configure more complex functions later
server:
port: 8765
# Requests and responses GZIP Compression support
feign:
httpclient:
enabled: false
okhttp:
enabled: true
compression:
request:
enabled: true
mime-types: text/xml,application/xml,application/json
min-request-size: 2048
response:
enabled: true
spring:
application:
name: ace-gateway
redis:
database: 2
host: 127.0.0.1
jedis:
pool:
max-active: 20
rabbitmq:
host: ${RABBIT_MQ_HOST:localhost}
port: ${RABBIT_MQ_PORT:5672}
username: guest
password: guest
sleuth:
enabled: true
http:
legacy:
enabled: true
cloud:
gateway:
discovery:
locator:
lowerCaseServiceId: true
enabled: true
routes:
# =====================================
- id: ace-auth
uri: lb://ace-auth
order: 8000
predicates:
- Path=/api/auth/**
filters:
- StripPrefix=2
- id: ace-admin
uri: lb://ace-admin
order: 8001
predicates:
- Path=/api/admin/**
filters:
- StripPrefix=2
nacos:
discovery:
server-addr: 127.0.0.1:8848
sentinel:
transport:
dashboard: localhost:8080
logging:
level:
com.github.wxiaoqi.security.gate.v2: info
management:
endpoints:
web:
exposure:
include: '*'
security:
enabled: false
gate:
ignore:
startWith: /auth/jwt
auth:
serviceId: ace-auth
user:
token-header: Authorization
client:
token-header: x-client-token
id: ace-gate # If it is not filled in, it will read by default spring.application.name
secret: 123456
ribbon:
eureka:
enabled: true
ReadTimeout: 60000
ConnectTimeout: 60000
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 1
OkToRetryOnAllOperations: false
hystrix:
threadpool:
default:
coreSize: 1000 ## The maximum number of concurrent threads , Default 10
maxQueueSize: 1000 ##BlockingQueue The maximum number of queues
queueSizeRejectionThreshold: 500 ## Even if maxQueueSize Don't reach , achieve queueSizeRejectionThreshold After this value , Requests will also be rejected
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
6.2 nacos Observe service status
6、 ... and Front end login
After the backend service is started , You can start debugging the front end .
1 Browser input http://localhost:9527/
2 The username and password are both admin
3 How it looks after login
7、 ... and Problem records and solutions
1 start-up AuthBootstrap newspaper Failure to find org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
2 start-up AuthBootstrap newspaper java.sql.SQLException: is unrecognized or represents more than one time zone. You must configure
边栏推荐
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- PCL实现选框裁剪点云
- 【Hot100】739. 每日温度
- Depth residual network
- SSO process analysis
- BUU的MISC(不定时更新)
- Simple query cost estimation
- 雲上有AI,讓地球科學研究更省力
- Oracle数据库11gr2使用tde透明数据加密报错ora28353,如果运行关闭wallet会报错ora28365,运行打开wallet就报错ora28353无法打开wallet
- 因高额网络费用,Arbitrum 奥德赛活动暂停,Nitro 发行迫在眉睫
猜你喜欢
3. Business and load balancing of high architecture
Windows Server 2016 standard installing Oracle
Every API has its foundation when a building rises from the ground
Interface automation test framework: pytest+allure+excel
[brush questions] how can we correctly meet the interview?
Database basics exercise part 2
Map of mL: Based on the adult census income two classification prediction data set (whether the predicted annual income exceeds 50K), use the map value to realize the interpretable case of xgboost mod
18.多级页表与快表
hydra常用命令
UWA Pipeline 2.2.1 版本更新说明
随机推荐
A brief introduction of reverseme in misc in the world of attack and defense
BIO模型实现多人聊天
C language_ Double create, pre insert, post insert, traverse, delete
Zhongqing reading news
软件测试外包到底要不要去?三年真实外包感受告诉你
Basic commands of MySQL
【Hot100】739. Daily temperature
ROS learning_ Basics
开源的网易云音乐API项目都是怎么实现的?
Missing monitoring: ZABBIX monitors the status of Eureka instance
How to find a medical software testing institution? First flight software evaluation is an expert
Pymongo gets a list of data
26岁从财务转行软件测试,4年沉淀我已经是25k的测开工程师...
UWA pipeline version 2.2.1 update instructions
3. Business and load balancing of high architecture
因高额网络费用,Arbitrum 奥德赛活动暂停,Nitro 发行迫在眉睫
Attributeerror: can 't get attribute' sppf 'on < module' models. Common 'from' / home / yolov5 / Models / comm
AI on the cloud makes earth science research easier
[daily question] 729 My schedule I
pymongo获取一列数据