• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

尚医通项目上云

武飞扬头像
拾 -.-
帮助2

1、项目架构

学新通

学新通
项目地址
https://gitee.com/leifengyang/yygh-parent
https://gitee.com/leifengyang/yygh-admin
https://gitee.com/leifengyang/yygh-site

2、中间件

中间件 集群内地址 外部访问地址
Nacos his-nacos.his:8848 http://139.198.165.238:30349/nacos
MySQL his-mysql.his:3306 139.198.165.238:31840
Redis his-redis.his:6379 139.198.165.238:31840
Sentinel his-sentinel.his:8858 139.198.165.238:31840
MongoDB hismongodb.his:27017 139.198.165.238:31840
RabbitMQ his-rabbitm-rabbitmq.his:5672 139.198.165.238:31840
ElasticSearch his-es.his:9200 139.198.165.238:31840

3、生产与开发配置隔离

学新通

4、deploy.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: service-cart
  name: service-cart
  namespace: his   #一定要写名称空间
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: service-cart
  strategy:
    rollingUpdate:
      maxSurge: 50%
      maxUnavailable: 50%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: service-cart
    spec:
      imagePullSecrets:
        - name: aliyun-docker-hub  #提前在项目下配置访问阿里云的账号密码
      containers:
        - image: $REGISTRY/$ALIYUNHUB_NAMESPACE/service-cart
          readinessProbe:
            httpGet:
              path: /actuator/health
              port: 8080
            timeoutSeconds: 10
            failureThreshold: 30
            periodSeconds: 5
          imagePullPolicy: Always
          name: app
          ports:
            - containerPort: 8080
              protocol: TCP
          resources:
            limits:
              cpu: 300m
              memory: 600Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: service-cart
  name: service-cart
  namespace: his
spec:
  ports:
    - name: http
      port: 8080
      protocol: TCP
      targetPort: 8080
  selector:
    app: service-cart
  sessionAffinity: None
  type: ClusterIP
学新通

4、devops实战

第一步:拉取代码

学新通

第二部,项目编译

1、修改maven让他从阿里云下载镜像
● 使用admin登陆ks
● 进入集群管理
● 进入配置中心
● 找到配置
○ ks-devops-agent
○ 修改这个配置。加入maven阿里云镜像加速地址
学新通
shell:script mvn clean package -Dmavernetest.skip=true
学新通
2、缓存机制
已经下载过的jar包,下一次流水线的启动,不会重复下载

第三步,构建镜像

学新通

并行构建镜像

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhiejech
系列文章
更多 icon
同类精品
更多 icon
继续加载