diff --git a/devops/it/src/it/helloworld-backend/expected/Deployment.yaml b/devops/it/src/it/helloworld-backend/expected/Deployment.yaml index 92f2f510..ab4a7343 100644 --- a/devops/it/src/it/helloworld-backend/expected/Deployment.yaml +++ b/devops/it/src/it/helloworld-backend/expected/Deployment.yaml @@ -32,36 +32,36 @@ spec: group: ms.dew.devops.it spec: containers: - - env: - - name: JAVA_OPTIONS - value: ' -Dspring.profiles.active=test -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false - -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=* - -Dmetrics.tags:application=${spring.application.name}' - image: "@ignore@" - imagePullPolicy: IfNotPresent - livenessProbe: - failureThreshold: 6 - httpGet: - path: /actuator/health - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 30 - name: dew-app - ports: - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /actuator/health - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - periodSeconds: 30 - resources: - limits: {} - requests: {} + - env: + - name: JAVA_OPTIONS + value: ' -Dspring.profiles.active=test -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false + -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.* + -Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=helloworld-backend' + image: "@ignore@" + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 6 + httpGet: + path: /actuator/health + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + name: dew-app + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + resources: + limits: {} + requests: {} nodeSelector: group: app diff --git a/devops/it/src/it/helloworld-frontend/.dew b/devops/it/src/it/helloworld-frontend/.dew index 71d73e74..5714128c 100644 --- a/devops/it/src/it/helloworld-frontend/.dew +++ b/devops/it/src/it/helloworld-frontend/.dew @@ -7,9 +7,9 @@ profiles: serverConfig: |- server { listen 80; - server_name brian.com; + server_name localhost; location / { - root html/brian; + root /usr/share/nginx/html; index index.html index.htm; } if ( $http_host ~* "^(.*)") { diff --git a/devops/it/src/it/todo/backend/services/compute/expected/Deployment.yaml b/devops/it/src/it/todo/backend/services/compute/expected/Deployment.yaml index 6b049553..f0b50cf8 100644 --- a/devops/it/src/it/todo/backend/services/compute/expected/Deployment.yaml +++ b/devops/it/src/it/todo/backend/services/compute/expected/Deployment.yaml @@ -6,11 +6,11 @@ metadata: dew.ms/scm-url: "@ignore@" sidecar.jaegertracing.io/inject: 'true' labels: - app: todo-compute + app: compute provider: dew version: "@ignore@" group: ms.dew.devops.it - name: todo-compute + name: compute namespace: dew-prod spec: replicas: 1 @@ -35,8 +35,8 @@ spec: - env: - name: JAVA_OPTIONS value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false - -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=* - -Dmetrics.tags:application=${spring.application.name}' + -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.* + -Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=compute' image: "@ignore@" imagePullPolicy: IfNotPresent livenessProbe: diff --git a/devops/it/src/it/todo/backend/services/kernel/expected/Deployment.yaml b/devops/it/src/it/todo/backend/services/kernel/expected/Deployment.yaml index 30d3b547..b77e0a1f 100644 --- a/devops/it/src/it/todo/backend/services/kernel/expected/Deployment.yaml +++ b/devops/it/src/it/todo/backend/services/kernel/expected/Deployment.yaml @@ -35,8 +35,8 @@ spec: - env: - name: JAVA_OPTIONS value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false - -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=* - -Dmetrics.tags:application=${spring.application.name}' + -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.* + -Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=kernel' image: "@ignore@" imagePullPolicy: IfNotPresent livenessProbe: diff --git a/devops/it/src/it/todo/backend/services/notifier/expected/Deployment.yaml b/devops/it/src/it/todo/backend/services/notifier/expected/Deployment.yaml index 1c8f1b15..81c64b6a 100644 --- a/devops/it/src/it/todo/backend/services/notifier/expected/Deployment.yaml +++ b/devops/it/src/it/todo/backend/services/notifier/expected/Deployment.yaml @@ -35,8 +35,8 @@ spec: - env: - name: JAVA_OPTIONS value: ' -Dspring.profiles.active=prod -Dserver.port=8080 -Dopentracing.jaeger.log-spans=false - -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dmanagement.endpoints.web.exposure.include=* - -Dmetrics.tags:application=${spring.application.name}' + -Dopentracing.jaeger.probabilistic-sampler.sampling-rate=0.1 -Dopentracing.spring.web.skip-pattern=/api-docs.*|/swagger.*|.*\\.png|.*\\.css|.*\\.js|.*\\.html|/favicon.ico|/hystrix.stream|/actuator.* + -Dmanagement.endpoints.web.exposure.include=* -Dmanagement.metrics.tags.application=notifier' image: "@ignore@" imagePullPolicy: IfNotPresent livenessProbe: diff --git a/devops/maven/dew-maven-plugin/src/main/java/ms/dew/devops/kernel/plugin/appkind/jvmservice_springboot/JvmServiceSpringBootAppKindPlugin.java b/devops/maven/dew-maven-plugin/src/main/java/ms/dew/devops/kernel/plugin/appkind/jvmservice_springboot/JvmServiceSpringBootAppKindPlugin.java index 0f130bbb..d05871e6 100644 --- a/devops/maven/dew-maven-plugin/src/main/java/ms/dew/devops/kernel/plugin/appkind/jvmservice_springboot/JvmServiceSpringBootAppKindPlugin.java +++ b/devops/maven/dew-maven-plugin/src/main/java/ms/dew/devops/kernel/plugin/appkind/jvmservice_springboot/JvmServiceSpringBootAppKindPlugin.java @@ -182,7 +182,7 @@ private String setJavaOptionsValue(FinalProjectConfig config) { } if (config.getApp().getMetricsEnabled()) { containerEnvJavaOptionsValue += " -Dmanagement.endpoints.web.exposure.include=*" - + " -Dmetrics.tags:application=${spring.application.name}"; + + " -Dmanagement.metrics.tags.application=" + config.getAppName(); } return containerEnvJavaOptionsValue; } diff --git a/docs/index.html b/docs/index.html index 32768624..2cb0cab2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -531,7 +531,20 @@

Dew:一站式微服务解决方案 [2.x Building…​]

  • 4.1.13. Jaeger
  • -
  • 4.2. DevOps使用手册[TBD]
  • +
  • 4.2. DevOps使用手册[TBD] + +
  • 4.3. DevOps配置速查
  • 6.3. Dew 2.x Migration guide[TBD] @@ -882,6 +896,7 @@

    1.2. 项目结 |- |- |- idempotent-starter // 幂等处理模块 |- |- |- notification // 通知处理模块 |- |- |- test-starter // 单元测试模块 +|- |- |- hbase-starter // Spring Boot HBase Starter 模块 |- |- components // 集成的服务 |- |- |- auth // 认证服务 |- |- |- auth-sdk-starter // 认证服务SDK @@ -1390,6 +1405,10 @@

    Redis集群能力实现

    +

    hbase-starter

    +

    HBase Spring Boot 实现

    + +

    idempotent-starter

    幂等处理模块

    @@ -3577,6 +3596,62 @@

    3.2 +
    +
    Spring Boot HBase
    +
    +

    在集成 HBase 客户端能力的基础之上,支持 Spring Boot 配置管理、支持 Kerberos 认证。

    +
    +
    +
    依赖
    +
    +
    <dependency>
    +    <groupId>ms.dew</groupId>
    +    <artifactId>hbase-starter</artifactId>
    +</dependency>
    +
    +
    +
    +
    配置
    +
    +
    spring:
    +  hbase:
    +    zkQuorum: localhost  # zookeeper url
    +    znodeParent: /hbase-secure # zookeeper znode parent
    +    auth:
    +      type: kerberos # 认证类型,默认是 simple,可选:simple 和 kerberos
    +      principal: # kerberos 下 principal
    +      keytab: # kerberos 下 keytab 路径
    +      hbaseMasterPrincipal: # kerberos 下 hbase master principal
    +      hbaseRegionServerPrincipal: # kerberos 下 hbase region server principal
    +      hbaseClientRetriesNumber: # hbase 客户端重试次数,默认:5
    +      hbaseClientOperationTimeout: # hbase 客户端超时时间,默认:300000
    +      hbaseClientScannerTimeoutPeriod: # hbase 客户端 scan 超时时间,默认:60000
    +      hbaseClientPause: # hbase 重试的休眠时间,默认:30
    +
    +
    +
    +
    使用
    +
    +
    @Autowired
    +private HBaseTemplate hbaseTemplate;
    +
    +hbaseTemplate.get("table_hbase", "0002093140000000",
    +                "0", "reg_platform", (result, row) -> Bytes.toString(result.value()));
    +
    +
    +
    + + + + + +
    + + +HBaseTemplate 其他使用方法可以详见 hbase-starter 模块下的 test 内容。 +
    +
    +
    @@ -4746,7 +4821,7 @@

    4.1.10. Kibana

    metadata: labels: app: kibana - name: kibana + name: dew-kibana spec: capacity: storage: 10Gi @@ -4919,7 +4994,7 @@

    4.1 # 安装,不使用代理要加上 --set kube-state-metrics.image.repository=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-state-metrics # 若要启用对etcd监控,需设置kubeEtcd相关参数。 # grafana.'grafana\.ini'为Grafana的配置参数,请安装时自行修改。 -# 若 Grafana 使用StorageClass,需要进行以下配置,无需创建PV,PVC +# 若 Grafana 使用StorageClass,需要进行以下配置,无需创建PV,PVC # --set grafana.persistence.storageClassName="yourscname" # --set grafana.persistence.size=10Gi # 删去此行配置: --set grafana.persistence.existingClaim=grafana \ @@ -5112,6 +5187,8 @@

    4.1.12. Fluentd

    helm repo add kiwigrid https://kiwigrid.github.io
     
     # 安装,不使用代理要加上 --set image.tag=v2.4.0 --set image.repository=registry.cn-hangzhou.aliyuncs.com/google_containers/fluentd-elasticsearch
    +# 请根据需要进行节点亲和性相关设置,但请保证需要收集日志的节点有Fluentd部署。
    +# e.g. 只收集部署了应用的节点的日志,设置 --set nodeSelector.group=app
     # 若要启用Prometheus进行监控Fluentd,
     # 需要先将Fluentd通过设置service暴露出来,然后设置prometheusRule和serviceMonitor。
     # 此配置需结合Prometheus-operator使用。
    @@ -5126,8 +5203,7 @@ 

    4.1.12. Fluentd

    --set prometheusRule.labels.app=prometheus-operator \ --set prometheusRule.labels.release=dew-prometheus-operator \ --set serviceMonitor.enabled=true \ - --set serviceMonitor.labels.release=dew-prometheus-operator \ - --set nodeSelector.group=devops
    + --set serviceMonitor.labels.release=dew-prometheus-operator \
    @@ -5178,22 +5254,33 @@

    4.1.13. Jaeger

    options: es: server-urls: http://dew-elasticsearch-master:9200 + ingress: + enabled: false # 用于使用下面自定义的Ingress EOF # Jaeger实例可在不同namespace下创建使用,使用中请注意namespace的问题。 # 使用sidecar的方式部署项目:https://github.com/jaegertracing/jaeger-operator#auto-injection-of-jaeger-agent-sidecars # 使用daemonset的方式部署项目:https://github.com/jaegertracing/jaeger-operator#agent-as-daemonset -# 添加Host,修改Jaeger实例的Ingress -kubectl patch ingress jaeger-query -n devops -p "spec: - rules: - - host: jaeger.dew.ms - http: - paths: - - backend: - serviceName: jaeger-query - servicePort: 16686 - path: /" +# 添加Host,为Jaeger实例创建Ingress +# 注意serviceName与Jaeger实例创建的service名称保持一致 +cat <<EOF | kubectl -n devops apply -f - +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: nginx + name: jaeger-query +spec: + rules: + - host: jaeger.dew.ms + http: + paths: + - backend: + serviceName: jaeger-query + servicePort: 16686 + path: / +EOF # Pod的调度 # 目前jaeger-operator暂不支持直接设置,请关注该项目的更新情况。 @@ -5253,41 +5340,234 @@

    4.1.13. Jaeger

    4.2. DevOps使用手册[TBD]

    +
    + + + + + +
    + + +Dew DevOps部分的核心是由 dew-maven-plugin 实现。 +
    +
    +
    +

    4.2.1. 引入方式

    +
    +
    使用 Dew Framework
    -

    CI/CD

    +

    如果您的项目使用 Dew Framework 构建则只要确保引入了 parent-starter 即可。

    +
    +
    +
    不使用 Dew Framework
    -

    通过分支变更触发

    +

    Dew DevOps 完全可以独立于 Dew Framework 使用,只需要在项目的父POM中加上如下配置即可。

    +
    +
    +
    +
    <profile>
    +    <id>devops</id>
    +    <build>
    +        <plugins>
    +            <plugin>
    +                <groupId>ms.dew</groupId>
    +                <artifactId>dew-maven-plugin</artifactId>
    +                <!--生产环境请选择合适的版本!-->
    +                <version>${dew.version}</version>
    +                <executions>
    +                    <execution>
    +                        <goals>
    +                            <goal>init</goal>
    +                            <goal>prepare</goal>
    +                            <goal>build</goal>
    +                            <goal>release</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +        </plugins>
    +    </build>
    +</profile>
    +
    +
    +
    +
    +

    4.2.2. 支持的项目类型

    + +
    +
    +

    4.2.3. 项目配置

    -

    初始化

    +

    Maven配置

    -

    发布

    +

    脚本使用

    +
    +
    +

    4.2.4. 打包与部署

    -

    回滚

    +

    重用版本

    +
    +
    +
    +

    4.2.5. 版本回滚

    + +
    +
    +

    4.2.6. 版本卸载

    + +
    +
    +

    4.2.7. 日志查看

    +
    +
    +

    4.2.8. 伸缩扩展

    + +
    +
    +

    4.2.9. CI/CD工具支持-Gitlab CI

    -

    删除

    +

    通过分支变更触发

    -

    日志查看

    +

    删除

    +
    +
    +
    +

    4.2.10. 执行通知

    +
    +
      +
    1. +

      钉钉 只支持markdown格式的钉钉消息

      +
    2. +
    3. +

      HTTP 数据结构分为以下几种情况

      +
    4. +
    -

    伸缩扩展

    +

    PROCESS_EMPTY(空项目)

    +
    +
    +
    +
    {
    +	"title": "DevOps process successful",      # 消息标题
    +	"content": {                               # 消息内容
    +		"kind": "PROCESS_EMPTY",               # 过程处理类型
    +		"ci": "",                              # ci操作
    +		"message": {}                          # 消息结果内容
    +	}
    +}
    +
    -

    Maven配置

    +

    PROCESS_INIT(初始化)

    +
    +
    +
    +
    {
    +	"title": "DevOps process successful",      # 消息标题
    +	"content": {                               # 消息内容
    +		"kind": "PROCESS_INIT",                # 过程处理类型
    +		"ci": "",                              # ci操作
    +		"message": {                           # 消息结果内容
    +			"profile": "uat",                  # 分支或者环境
    +			"project": "todo-parent",          # 项目名称
    +		}
    +	}
    +}
    +
    -

    重用版本

    +

    PROCESS_EXECUTE_SUCCESS(成功)/PROCESS_EXECUTE_FAILURE(失败)

    +
    +
    +
    +
    {
    +	"title": "DevOps process successful",         # 消息标题
    +	"content": {                                  # 消息内容
    +		"kind": "PROCESS_EXECUTE_SUCCESS",        # 过程处理类型
    +		"ci": "",                                 # ci操作
    +		"message": {                              # 消息结果内容
    +			"mojoName": "release",                # mvn操作步骤
    +            "profile": "uat",                     # 分支或者环境
    +            "project": "todo-parent",             # 项目名称
    +            "successfulFlag": "Successful",       # 成功标识
    +            "group": "ms.dew.devops.it",          # 项目group名称
    +            "message":"***",                      # 错误信息
    +            "throwable":"**"                      # 错误
    +		}
    +	}
    +}
    +
    -

    脚本使用

    +

    PROCESS_GLOBAL_ERROR(全局错误)

    +
    +
    +
    +
    {
    +	"title": "DevOps process successful",         # 消息标题
    +	"content": {                                  # 消息内容
    +		"kind": "PROCESS_GLOBAL_ERROR",           # 过程处理类型
    +		"ci": "",                                 # ci操作
    +		"message": {                              # 消息结果内容
    +			"error": "release",                   # 错误信息
    +            "errorStackTrace": "uat"              # 错误堆栈信息
    +		}
    +	}
    +}
    +
    -

    支持的项目类型

    +

    PROCESS_SHUTDOWN(关闭)

    +
    +
    +
    +
    {
    +	"title": "DevOps process successful",         # 消息标题
    +	"content": {                                  # 消息内容
    +		"kind": "PROCESS_SHUTDOWN",               # 过程处理类型
    +		"ci": "",                                 # ci操作
    +		"message": {                              # 消息结果内容
    +			"successfulExecProjects": [{          # 成功项目
    +			    "groupId":"com.terran.message",   # maven groupId
    +			    "artifactId":"dingtalk",          # maven artifactId
    +			    "execMojos":["release"],          # 执行成功的操作, 有release(发布)、unrelease(卸载)、scale(扩容)、rollback(回滚)四种操作
    +			    "name":"dingtalk"                 # maven项目名称
    +			    "reason":null
    +			}],
    +			"failureExecProjects": [{             # 成功项目
    +                "groupId":"com.terran.message",   # maven groupId
    +                "artifactId":"dingtalk",          # maven artifactId
    +                "execMojos":["release"],          # 执行成功的操作, 有release(发布)、unrelease(卸载)、scale(扩容)、rollback(回滚)四种操作
    +                "name":"dingtalk",                # maven项目名称
    +                "reason":"***"                    # 失败原因
    +            }],
    +			"noneExecProjects": [{                # 成功项目
    +                "groupId":"com.terran.message",   # maven groupId
    +                "artifactId":"dingtalk",          # maven artifactId
    +                "execMojos":["release"],          # 执行成功的操作, 有release(发布)、unrelease(卸载)、scale(扩容)、rollback(回滚)四种操作
    +                "name":"dingtalk",                # maven项目名称
    +                "reason":"***"                    # 未执行原因
    +			}],
    +			"ignoreExecProjects": [{              # 成功项目
    +                "groupId":"com.terran.message",   # maven groupId
    +                "artifactId":"dingtalk",          # maven artifactId
    +                "execMojos":["release"],          # 执行成功的操作, 有release(发布)、unrelease(卸载)、scale(扩容)、rollback(回滚)四种操作
    +                "name":"dingtalk",                # maven项目名称
    +                "reason":"***"                    # 忽略原因
    +			}],
    +		}
    +	}
    +}
    +
    +
    @@ -5341,8 +5621,8 @@

    # 默认环境配置
     namespace: default                      # 命名空间,强烈建议修改为特定的命名空间
    -kind:                                   # 项目类型,默认自动探测,也可以显式指定为 JVM_SERVICE/JVM_LIB/FRONTEND/POM
     skip: false                             # 是否跳过,为true时表示
     disableReuseVersion:                    # 是否禁用重用版本,e.g. 生产环境重用预发环境的最后一个版本(不用重新打包Docker image)
                                             # 默认情况前端工程为true(node编译期会混入环境信息导致无法重用),其它工程为false
    @@ -5382,52 +5661,50 @@ 

    4.3.2. Maven dew.devops.docker.registry.url # Docker Registry Url e.g. https://harbor.dew.ms/v2 dew.devops.docker.registry.username # Docker Registry 用户名 dew.devops.docker.registry.password # Docker Registry 密码 -ew.devops.quiet +dew.devops.quiet # 是否静默处理 # ============= 日志及调试场景使用 ============= dew.devops.podName # 要使用的Pod名称 # ============= 日志场景使用 ============= @@ -5570,11 +5847,11 @@

    /.dew配置说明

    @@ -5743,11 +6034,11 @@

    4.5
    /.dew配置说明
    # 默认通知配置,详见 Dew的通知处理模块
    -#notify:
    -  # type 不填写时默认使用钉钉,也可以选择 type: HTTP / MAIL
    -  #args:
    -    # 通知的URL,可自行修改,详见 https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq
    -    #url: https://oapi.dingtalk.com/robot/send?access_token=8ff65c48001c1981df7d326b5cac497e5ca27190d5e7ab7fe9168ad69b103455
    +notifies:
    +  - type: DD
    +    args:
    +      # 通知的URL,可自行修改,详见 https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq
    +      url: https://oapi.dingtalk.com/robot/send?access_token=8ff65c48001c1981df7d326b5cac497e5ca27190d5e7ab7fe9168ad69b103455
     profiles:
       # 添加uat环境
       uat:
    @@ -5860,6 +6151,11 @@ 

    5.1.1. 代码 dew.devops.docker.registry.password=Dew123456 # Kubernetes base64 configuration dew.devops.kube.config=YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIGNlcnRpZmljYXRlLWF1dGhvcml0eS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJEUlZKVVNVWkpRMEZVUlMwdExTMHRDazFKU1VONVJFTkRRV0pEWjBGM1NVSkJaMGxDUVVSQlRrSm5hM0ZvYTJsSE9YY3dRa0ZSYzBaQlJFRldUVkpOZDBWUldVUldVVkZFUlhkd2NtUlhTbXdLWTIwMWJHUkhWbnBOUWpSWVJGUkZOVTFFVVhoTlZFRXpUVlJCZUU0eGIxaEVWRWsxVFVSUmQwOUVRVE5OVkVGNFRqRnZkMFpVUlZSTlFrVkhRVEZWUlFwQmVFMUxZVE5XYVZwWVNuVmFXRkpzWTNwRFEwRlRTWGRFVVZsS1MyOWFTV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VbGxUVGszSzFnNFV6bG9ObUl4Y0c1c1NtcEdlblpKUkdkMlNVUkpRMDE1YzBkcFlsbGlWRlJ6VjJWRWJVNU9SVVJPQ2padFIzaEJiMGRCUVc5TVZEUmpOMGRJYkRaWlV6SjVRazlJWTJ4UU9FTTNZMnMwVDBFNE0xcFFRbmhGVkVzeGVua3hSblphVlcxb1ZGcDNlbmRJUlVFS1JEWTFUbWhVTW1SWlUwcFNXV3hKZFd0S1ptcEpTV0ZXWjNobVZHdGtTa0lyWlhOYWVtcHNXVkJFYTNWbVEzRmphWEY2UkZSNlptSlZSa29yYWpGMVpBcGhNbU00UlZCV2QyWTJRMWxLV2taYU1FZEpMMkp6VVN0Vk5XVnZZemN3ZW1FeVNtMUlhRVl5YTNocmRIUjZSME0zVTNNOUNpMHRMUzB0UlU1RUlGSlRRU0JRVWtsV1FWUkZJRXRGV1MwdExTMHRDZz09Cg== +# Repository id, must be filled out in version replacement mode +# If the repository needs authentication, the authentication information corresponding to this Id should be added to settings.xml +dew.devops.it.repository.id=trc-releases +# Snapshot repository url, must be filled out in version replacement mode +dew.devops.it.repository.url=http://121.41.17.205:18081/nexus/content/repositories/releases/ # Snapshot repository id, must be filled out in version replacement mode # If the repository needs authentication, the authentication information corresponding to this Id should be added to settings.xml dew.devops.it.snapshotRepository.id=trc-snapshots @@ -7344,7 +7640,31 @@

    6.2.7. Dnsmasq

    -

    6.2.8. Minio

    +

    6.2.8. NTPDate

    +
    + + + + + +
    + + +ntpdate用于服务器间时间同步。 +
    +
    +
    +
    安装配置
    +
    +
    # 在各节点安装
    +yum install -y ntp
    +# 修改个节点/etc/crontab文件
    +echo '*/1 * * * * root ntpdate cn.pool.ntp.org' >> /etc/crontab
    +
    +
    +
    +
    +

    6.2.9. Minio

    安装配置
    @@ -7382,7 +7702,7 @@

    6.2.8. Minio

    -

    6.2.9. NFS

    +

    6.2.10. NFS

    安装配置
    @@ -7420,7 +7740,7 @@

    6.2.9. NFS

    -

    6.2.10. GlusterFS

    +

    6.2.11. GlusterFS

    @@ -7729,7 +8049,7 @@

    6.3.2. 迁移
  • -

    [Dew DevOps] 在项目中添加.gitlab配置,详见 gitlab-ci-template.yml, e.g.

    +

    [Dew DevOps] 在项目中添加.gitlab-ci.yml配置,详见 gitlab-ci-template.yml, e.g.

    stages:
    @@ -7903,10 +8223,6 @@ 

    核心流程

    1. -

      确认Gitlab中的项目已启用CI -(勾选 https://<Gitlab Host>/<Group>/<Project>/settings/ci_cd 中的 Default to Auto DevOps pipeline),

      -
    2. -
    3. 配置 .gitlab-ci.yml,配置参见 devops/cicd/gilabci/.gitlab-ci-template.yml

    4. @@ -8001,11 +8317,11 @@

    - + \ No newline at end of file diff --git a/docs/src/main/asciidoc/_chapter/appendix/middleware.adoc b/docs/src/main/asciidoc/_chapter/appendix/middleware.adoc index 0ba0d42a..541daab6 100644 --- a/docs/src/main/asciidoc/_chapter/appendix/middleware.adoc +++ b/docs/src/main/asciidoc/_chapter/appendix/middleware.adoc @@ -215,6 +215,18 @@ nameserver x.x.x.x # IP当前节点 # @see https://unix.stackexchange.com/questions/163831/nameservers-erased-after-systemctl-restart-network-service ---- +==== NTPDate +TIP: ntpdate用于服务器间时间同步。 + +.安装配置 +[source,bash] +---- +# 在各节点安装 +yum install -y ntp +# 修改个节点/etc/crontab文件 +echo '*/1 * * * * root ntpdate cn.pool.ntp.org' >> /etc/crontab +---- + ==== Minio .安装配置 diff --git a/docs/src/main/asciidoc/_chapter/devops/install.adoc b/docs/src/main/asciidoc/_chapter/devops/install.adoc index 34a4699d..26199446 100644 --- a/docs/src/main/asciidoc/_chapter/devops/install.adoc +++ b/docs/src/main/asciidoc/_chapter/devops/install.adoc @@ -834,22 +834,33 @@ spec: options: es: server-urls: http://dew-elasticsearch-master:9200 + ingress: + enabled: false # 用于使用下面自定义的Ingress EOF # Jaeger实例可在不同namespace下创建使用,使用中请注意namespace的问题。 # 使用sidecar的方式部署项目:https://github.com/jaegertracing/jaeger-operator#auto-injection-of-jaeger-agent-sidecars # 使用daemonset的方式部署项目:https://github.com/jaegertracing/jaeger-operator#agent-as-daemonset -# 添加Host,修改Jaeger实例的Ingress -kubectl patch ingress jaeger-query -n devops -p "spec: - rules: - - host: jaeger.dew.ms - http: - paths: - - backend: - serviceName: jaeger-query - servicePort: 16686 - path: /" +# 添加Host,为Jaeger实例创建Ingress +# 注意serviceName与Jaeger实例创建的service名称保持一致 +cat <