kuboard.cn
This commit is contained in:
@ -63,7 +63,9 @@ import NavLink from '@theme/components/NavLink.vue'
|
||||
|
||||
export default {
|
||||
components: { NavLink },
|
||||
|
||||
mounted () {
|
||||
window.document.title = 'Kuboard 官网'
|
||||
},
|
||||
computed: {
|
||||
data () {
|
||||
return this.$page.frontmatter
|
||||
@ -71,7 +73,7 @@ export default {
|
||||
|
||||
actionLink () {
|
||||
return {
|
||||
link: `http://demo.eip.work/#/login?isReadOnly=true&token=${this.$site.themeConfig.kuboardToken}`,
|
||||
link: `http://demo.kuboard.cn/#/login?isReadOnly=true&token=${this.$site.themeConfig.kuboardToken}`,
|
||||
text: this.data.actionText
|
||||
}
|
||||
},
|
||||
|
||||
@ -79,7 +79,7 @@ metadata:
|
||||
k8s.eip.work/name: cloud-eureka
|
||||
spec:
|
||||
rules:
|
||||
- host: cloud-eureka.example.demo.eip.work
|
||||
- host: cloud-eureka.example.demo.kuboard.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
@ -350,7 +350,7 @@ metadata:
|
||||
k8s.eip.work/name: web-example
|
||||
spec:
|
||||
rules:
|
||||
- host: web-example.example.demo.eip.work
|
||||
- host: web-example.example.demo.kuboard.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<div style="text-align: center; margin-top: 5vh;">
|
||||
<strong>在线体验</strong>
|
||||
<div>
|
||||
<a target="_blank" :href="`http://demo.eip.work/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
<a target="_blank" :href="`http://demo.kuboard.cn/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
<p>
|
||||
<img :src="demo_img" style="width: 226px; height: 127px;"></img>
|
||||
</p>
|
||||
|
||||
@ -3,7 +3,7 @@ home: true
|
||||
# heroImage: /overview.png
|
||||
layout: HomePage
|
||||
actionText: 在线体验
|
||||
# actionLink: `http://demo.eip.work/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`
|
||||
# actionLink: `http://demo.kuboard.cn/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`
|
||||
actionText2: 开始使用 →
|
||||
actionLink2: /overview/
|
||||
features:
|
||||
|
||||
@ -78,7 +78,7 @@ example中用到了存储卷声明,请在 Kuboard 中 [创建存储类](/guide
|
||||
|
||||
| 字段名称 | 填写内容 | 说明 |
|
||||
| ---------------- | ---------------------------------- | ------------------------------------------------------------ |
|
||||
| cloud-eureka域名 | cloud-eureka.example.demo.eip.work | 使用您自己的域名,<br />在测试环境建议使用如下域名格式:<br />workloadname.namespace-name.cluster-name.domain.com<br />该域名应该解析到您worker节点的外网地址,或者worker 节点 80/443 端口对应负载均衡服务器的外网地址。 |
|
||||
| cloud-eureka域名 | cloud-eureka.example.demo.kuboard.cn | 使用您自己的域名,<br />在测试环境建议使用如下域名格式:<br />workloadname.namespace-name.cluster-name.domain.com<br />该域名应该解析到您worker节点的外网地址,或者worker 节点 80/443 端口对应负载均衡服务器的外网地址。 |
|
||||
| web-example | web-example.example.demo.eip | |
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ example中用到了存储卷声明,请在 Kuboard 中 [创建存储类](/guide
|
||||
|
||||

|
||||
|
||||
* 点击 互联网入口中的域名 ***http://web-example.example.demo.eip.work***
|
||||
* 点击 互联网入口中的域名 ***http://web-example.example.demo.kuboard.cn***
|
||||
|
||||
**Example 部署成功**
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
Spring Cloud on Kubernetes 并不对 Spring Cloud 架构、组件等做过多解释,而是将重点放在如何将 Spring Cloud 的各类型组件顺利部署到 Kubernetes 环境中。
|
||||
|
||||
为了更好地阐述此主题,作者准备了一个最简单的微服务 example 作为例子,该 example 只实现了对一张简单数据库表执行 CRUD 操作的功能,该 example 的部署架构如下图所示,源代码请参考 [kuboard-example](https://github.com/eip-work/kuboard-example),您也可以直接通过 Kuboard [导入 example 微服务](/guide/example/import.html) 完成该 example 的部署
|
||||
为了更好地阐述此主题,作者准备了一个最简单的微服务 example 作为例子,该 example 只实现了对一张简单数据库表执行 CRUD 操作的功能,该 example 的部署架构如下图所示,源代码请参考 [kuboard-example](https://github.com/eip-work/kuboard-example),您也可以直接通过 Kuboard [导入 example 微服务](/guide/example/import.html)
|
||||
|
||||

|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# 部署 cloud-eureka
|
||||
|
||||
|
||||
本文所使用的代码请参考 [cloud-eureka](https://github.com/eip-work/kuboard-example/tree/master/cloud-eureka)
|
||||
|
||||
## 检查 cloud-eureka 项目的配置
|
||||
|
||||
@ -107,7 +107,7 @@ java -jar /eip-work/app.jar
|
||||
|
||||
**访问方式及互联网入口**
|
||||
|
||||
Eureka 运行在 9200 端口。Spring Cloud 的微服务通过 CLOUD_EUREKA_DEFAULT_ZONE 中的配置直接与 Eureka 服务通信。
|
||||
Eureka 运行在 9200 端口。Spring Cloud 的微服务组件通过 CLOUD_EUREKA_DEFAULT_ZONE 中的配置直接与 Eureka 容器组通信。
|
||||
|
||||
是否配置访问方式及互联网入口?
|
||||
|
||||
|
||||
77
micro-service/spring-cloud/db-example.md
Normal file
77
micro-service/spring-cloud/db-example.md
Normal file
@ -0,0 +1,77 @@
|
||||
# 部署 db-example
|
||||
|
||||
本文所使用的代码请参考 [db-example](https://github.com/eip-work/kuboard-example/tree/master/db-example)
|
||||
|
||||
## 检查 db-example 项目的配置
|
||||
|
||||
**项目结构解读**
|
||||
|
||||
|
||||
|
||||
**部署类型**
|
||||
|
||||
关于 MySQL 数据库的部署,Kuboard 建议的做法如下:
|
||||
* 在开发环境、测试环境使用 Kuboard 部署一个副本数为 1 的 StatefulSet,以便可以快速复制 开发环境、测试环境
|
||||
* 在准上线环境和生产环境,使用 IaaS 服务商提供的 RDS 服务,原因是:
|
||||
* 直接将 MySQL 部署到 Kubernetes 虽然简便,但是数据库的运维仍然有大量的事情需要考虑,例如数据的备份、恢复、迁移等
|
||||
* Kubernetes 管理无状态服务已经非常成熟,在管理有状态的容器例如 MySQL 时,仍然需要等待更好的解决方案。当下这方面最新的进展是 [Kubernetes Operator](http://dockone.io/article/8769)
|
||||
|
||||
|
||||
**环境变量**
|
||||
|
||||
检查 [Dockerfile](https://github.com/eip-work/kuboard-example/blob/master/db-example/Dockerfile)
|
||||
|
||||
|
||||
``` Dockerfile
|
||||
FROM eipwork/mysql:5.7.26-1.1.11
|
||||
|
||||
LABEL maintainer="shaohq@foxmail.com"
|
||||
|
||||
#把数据库初始化数据的文件复制到工作目录下
|
||||
RUN mv /etc/my.cnf /etc/my.cnf.backup
|
||||
COPY docker/my.cnf /etc/my.cnf
|
||||
COPY docker/init_sql/*.sql /init_sql/
|
||||
|
||||
EXPOSE 3306
|
||||
EXPOSE 9104
|
||||
|
||||
ENV ENABLE_EUREKA_CLIENT=TRUE
|
||||
ENV eureka.name=db-example
|
||||
ENV eureka.port=80
|
||||
ENV eureka.management.port=9104
|
||||
ENV eureka.serviceUrl.default=http://monitor-eureka:9000/eureka
|
||||
```
|
||||
|
||||
Dockerfile 中定义了环境变量 ENABLE_EUREKA_CLIENT=TRUE,这个环境变量用于 Prometheus [监控套件](/guide/monitor/) 的服务发现。在不启用监控套件的情况下,应该将 ENABLE_EUREKA_CLIENT 这个环境变量设置为 FALSE。
|
||||
|
||||
::: tip
|
||||
可以在部署时覆盖环境变量的值,无需修改 Dockerfile。
|
||||
:::
|
||||
|
||||
**容器 Command 参数**
|
||||
|
||||
容器镜像 eipwork/mysql:5.7.26-1.1.11 的 Dockerfile 指定了容器的启动方式,此处无需为容器额外设置 Command 参数。
|
||||
|
||||
**访问方式及互联网入口**
|
||||
|
||||
|
||||
|
||||
|
||||
## 部署 db-example
|
||||
|
||||
**创建ConfigMap**
|
||||
|
||||
|
||||
|
||||
**创建工作负载**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 检查部署结果
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -17,14 +17,14 @@ Kuboard 的主要特点:
|
||||
## 在线体验
|
||||
|
||||
<p>
|
||||
<a target="_blank" :href="`http://demo.eip.work/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
<a target="_blank" :href="`http://demo.kuboard.cn/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
Kuboard 在线体验
|
||||
</a>
|
||||
</p>
|
||||
为保证环境的稳定性,在线 Demo 中只提供只读权限。<span style="color: #F56C6C; font-weight: 500;">(请在PC浏览器中打开)</span>
|
||||
|
||||
<p>
|
||||
<a target="_blank" :href="`http://demo.eip.work/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
<a target="_blank" :href="`http://demo.kuboard.cn/#/login?isReadOnly=true&token=${$site.themeConfig.kuboardToken}`">
|
||||
<img src="./README.assets/image-20190728145108904.png"></img>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user