vssue
This commit is contained in:
@ -40,7 +40,7 @@ module.exports = {
|
||||
// set `platform` rather than `api`
|
||||
platform: 'github',
|
||||
locale: 'zh-CN',
|
||||
autoCreateIssue: true,
|
||||
autoCreateIssue: false,
|
||||
admins: ['shaohq'],
|
||||
// all other options of Vssue are allowed
|
||||
owner: 'eip-work',
|
||||
@ -162,10 +162,17 @@ module.exports = {
|
||||
'install-docker-desktop',
|
||||
['install-k8s', '安装Kubernetes单Master节点'],
|
||||
'install-kubernetes',
|
||||
['install-k8s-upgrade', '升级Kubernetes集群'],
|
||||
'install-kubectl'
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '升级 Kubernetes',
|
||||
collapsable: false,
|
||||
children: [
|
||||
// ['install-k8s-upgrade', '升级Kubernetes集群'],
|
||||
'upgrade-k8s/1.15.x-1.15.4',
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '安装 Kuboard',
|
||||
collapsable: false,
|
||||
@ -348,6 +355,7 @@ module.exports = {
|
||||
'k8s-practice/ocp/eureka-server',
|
||||
'k8s-practice/ocp/mysql',
|
||||
'k8s-practice/ocp/redis',
|
||||
'k8s-practice/ocp/auth-server',
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
|
||||
# 只在 master 节点执行
|
||||
|
||||
# 脚本出错时终止执行
|
||||
set -e
|
||||
|
||||
# 查看完整配置选项 https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2
|
||||
rm -f ./kubeadm-config.yaml
|
||||
cat <<EOF > ./kubeadm-config.yaml
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
|
||||
# 脚本出错时终止执行
|
||||
set -e
|
||||
|
||||
# 安装 docker
|
||||
# 参考文档如下
|
||||
# https://docs.docker.com/install/linux/docker-ce/centos/
|
||||
|
||||
@ -3,8 +3,11 @@
|
||||
<div v-for="(item, key) in vssues" :key="key">
|
||||
<Vssue v-if="item" v-show="key === $route.path" :issueId="item" :options="options"/>
|
||||
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
|
||||
<div style="color: red; background-color: yellow;">请创建 VssueId</div>
|
||||
<Vssue :title="$page.path" :options="options"/>
|
||||
<el-button type="danger" @click="vssues[key] = ''">请创建 VssueId</el-button>
|
||||
</div>
|
||||
<div v-if="item === ''">
|
||||
<el-button type="warning" @click="refreshId = $refs.vssue[0].vssue.issue.id">请填写 vusseId <span v-if="refreshId"> - {{refreshId}}</span></el-button>
|
||||
<Vssue ref="vssue" :title="$page.path" :options="options"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -14,7 +17,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
vssues: {}
|
||||
vssues: {},
|
||||
refreshId: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -31,7 +35,7 @@ export default {
|
||||
let result = {
|
||||
platform: 'github',
|
||||
locale: 'zh-CN',
|
||||
autoCreateIssue: false,
|
||||
autoCreateIssue: true,
|
||||
admins: ['shaohq'],
|
||||
// all other options of Vssue are allowed
|
||||
owner: 'eip-work',
|
||||
|
||||
@ -91,6 +91,8 @@ Kubernetes教程的主要依据是:Kubernetes 官网文档,以及使用 Kubo
|
||||
* [构建Docker镜像并推送到仓库](https://kuboard.cn/learning/k8s-practice/ocp/build.html)
|
||||
* [部署顺序](https://kuboard.cn/learning/k8s-practice/ocp/sequence.html)
|
||||
* [在K8S上部署eureka-server](https://kuboard.cn/learning/k8s-practice/ocp/eureka-server.html)
|
||||
* [在K8S上部署mysql](https://kuboard.cn/learning/k8s-practice/ocp/mysql.html)
|
||||
* [在K8S上部署redis](https://kuboard.cn/learning/k8s-practice/ocp/redis.html)
|
||||
* [在K8S上部署auth-server]
|
||||
* [在K8S上部署user-center]
|
||||
* [在K8S上部署api-gateway]
|
||||
|
||||
@ -89,7 +89,9 @@ description: Kubernetes免费中文教程目录
|
||||
* [构建docker镜像并推送到仓库](/learning/k8s-practice/ocp/build.html)
|
||||
* [部署顺序](/learning/k8s-practice/ocp/sequence.html)
|
||||
* [在K8S上部署eureka-server](/learning/k8s-practice/ocp/eureka-server.html)
|
||||
* [在K8S上部署auth-server]
|
||||
* [在K8S上部署mysql](/learning/k8s-practice/ocp/mysql.html)
|
||||
* [在K8S上部署redis](/learning/k8s-practice/ocp/redis.html)
|
||||
* [在K8S上部署auth-center](/learning/k8s-practice/ocp/auth-server.html)
|
||||
* [在K8S上部署user-center]
|
||||
* [在K8S上部署api-gateway]
|
||||
* [在K8S上部署back-center]
|
||||
|
||||
@ -42,4 +42,4 @@ Kubernetes 自动创建包含访问 Kubernetes APIServer 身份信息的 Secret
|
||||
|
||||
## 解码和编辑
|
||||
|
||||
Kubenetes 中,Secret 使用 base64 编码存储,您可以将其 [解码](./decode-edit.html) 获得对饮信息的原文,创建 Secret 之后,您也可以再次 [编辑](./decode-edit.html) Secret
|
||||
Kubenetes 中,Secret 使用 base64 编码存储,您可以将其 [解码](./decode-edit.html) 获得对应信息的原文,创建 Secret 之后,您也可以再次 [编辑](./decode-edit.html) Secret
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
---
|
||||
vssueId: 91
|
||||
layout: LearningLayout
|
||||
description: Kubernetes教程_本文描述如何搭建NFS服务_并在Kubernetes中配置StorageClass使用该NFS服务作为存储
|
||||
---
|
||||
|
||||
113
learning/k8s-practice/ocp/auth-server.md
Normal file
113
learning/k8s-practice/ocp/auth-server.md
Normal file
@ -0,0 +1,113 @@
|
||||
---
|
||||
vssueId: 94
|
||||
layout: LearningLayout
|
||||
description: Kubernetes教程_使用Kuboard在Kubernetes上部署Spring_Cloud_open_capacity_platform微服务能力开放平台_部署auth-center
|
||||
---
|
||||
|
||||
# 在K8S上部署auth-center
|
||||
|
||||
本文假设您已经完成了 [在Kubernetes 上部署 Spring Cloud - OCP](./) 系列教程的前面部分,并已经完成了 eureka-server、auth-center-mysql、redis 在 K8S 上的部署。
|
||||
|
||||
## 理解auth-server
|
||||
|
||||
auth-server 是一个 Spring Boot 项目,其配置文件位于路径 `oauth-center/auth-server/src/main/resources`,该目录内容如下所示:
|
||||
|
||||
``` sh
|
||||
├── application.yml
|
||||
├── bootstrap.yml
|
||||
└── mybatis.cfg.xml
|
||||
```
|
||||
|
||||
### 监听端口
|
||||
|
||||
参考 `bootstrap.yml` 的如下代码片段,auth-server 监听 8000 端口
|
||||
|
||||
``` yaml {3}
|
||||
#端口
|
||||
server:
|
||||
port: 8000
|
||||
# port: ${randomServerPort.value[8000,8000]} #随机端口
|
||||
```
|
||||
|
||||
### 依赖项
|
||||
|
||||
auth-server 的部署依赖有:
|
||||
* eureka-server
|
||||
* mysql
|
||||
* redis
|
||||
|
||||
上述依赖在教程的前面部分都已经完成部署。
|
||||
|
||||
* **eureka-server** 依赖项
|
||||
|
||||
参考 `bootstrap.yml` 的如下代码片段,auth-server 中默认配置的 eureka-server 的地址为 `http://127.0.0.1:1111/eureka`
|
||||
|
||||
``` yaml {5}
|
||||
#eureka client 配置
|
||||
eureka:
|
||||
client:
|
||||
serviceUrl:
|
||||
defaultZone: http://127.0.0.1:1111/eureka #http://130.75.131.241:8761/eureka,http://130.75.131.248:8762/eureka
|
||||
#http://134.224.249.33:1111/eureka/ 正式库
|
||||
#http://134.224.249.33:1111/eureka/ 测试库
|
||||
```
|
||||
|
||||
* **mysql** 依赖项
|
||||
|
||||
参考 `application.yml` 的如下代码片段,auth-server 中默认配置的 mysql 的连接参数如下:
|
||||
|
||||
``` yaml {10,11,12,15,16,17}
|
||||
spring:
|
||||
session:
|
||||
store-type: redis
|
||||
datasource:
|
||||
dynamic:
|
||||
enable: true
|
||||
druid:
|
||||
# JDBC 配置(驱动类自动从url的mysql识别,数据源类型自动识别)
|
||||
core:
|
||||
url: jdbc:mysql://59.110.164.254:3306/oauth-center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
log:
|
||||
url: jdbc:mysql://59.110.164.254:3306/log-center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
```
|
||||
|
||||
* **redis** 依赖项
|
||||
|
||||
参考 `application.yml` 的如下代码片段,auth-server 中默认配置的 redis 的连接参数如下:
|
||||
|
||||
``` yaml {5,6}
|
||||
spring:
|
||||
# ... ... ...
|
||||
redis:
|
||||
################### redis 单机版 start ##########################
|
||||
host: 59.110.164.254
|
||||
port: 6379
|
||||
timeout: 6000
|
||||
database: 3
|
||||
```
|
||||
|
||||
## 确定部署方案
|
||||
|
||||
auth-server 为无状态服务,使用 Deployment 部署,并通过环境变量覆盖如下参数:
|
||||
|
||||
* eureka.client.serviceUrl.defaultZone
|
||||
http://cloud-eureka-0.cloud-eureka.ocp.svc.cluster.local:1111/eureka,http://cloud-eureka-1.cloud-eureka.ocp.svc.cluster.local:1111/eureka,http://cloud-eureka-2.cloud-eureka.ocp.svc.cluster.local:1111/eureka
|
||||
* spring.datasource.druid.core.url
|
||||
|
||||
* spring.datasource.druid.core.username
|
||||
* spring.datasource.druid.core.password
|
||||
* spring.datasource.druid.log.url
|
||||
* spring.datasource.druid.log.username
|
||||
* spring.datasource.druid.log.password
|
||||
* spring.redis.host
|
||||
* spring.redis.port
|
||||
|
||||
## 部署auth-server
|
||||
|
||||
## 检查部署结果
|
||||
@ -23,7 +23,7 @@ Kuboard 网站将陆续 **连载** 如何使用 Kuboard 在 Kubernetes 上部署
|
||||
* [在K8S上部署eureka-server](/learning/k8s-practice/ocp/eureka-server.html)
|
||||
* [在K8S上部署mysql](/learning/k8s-practice/ocp/mysql.html)
|
||||
* [在K8S上部署redis](/learning/k8s-practice/ocp/redis.html)
|
||||
* [在K8S上部署auth-server]
|
||||
* [在K8S上部署auth-server](/learning/k8s-practice/ocp/auth-server.html)
|
||||
* [在K8S上部署user-center]
|
||||
* [在K8S上部署api-gateway]
|
||||
* [在K8S上部署back-center]
|
||||
|
||||
Reference in New Issue
Block a user