接口测试 HttpRunnerManager docker 及 k8s 部署方式

regend · 2018年12月29日 · 1089 次阅读

docker 方式下:

通过-e 传入数据库配置和 mq 的配置

docker run -d -p 8000:8000 --name httprunnermanager -e DB_USERNAME=root -e DB_PWD=123456 -e DB_HOST=192.168.2.114 -e DB_PORT=3006 -e MQ_URL=guest:guest@192.168.2.1:30672 registry.cn-hongkong.aliyuncs.com/regend/httprunner:latest

k8s yaml 文件:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: httprunnermanager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: httprunnermanager
  template:
    metadata:
      labels:
        app: httprunnermanager
    spec:
      containers:
      - image: registry.cn-hongkong.aliyuncs.com/regend/httprunner:latest
        imagePullPolicy: Always
        name: httprunnermanager
        ports:
        - containerPort: 8000
        env:
          - name: "DB_USERNAME"
            value: "root"
          - name: "DB_PWD"
            value: "123456"
          - name: "DB_HOST"
            value: "127.0.0.1"
          - name: "DB_PORT"
            value: "3306"
          - name: "MQ_URL"
            value: "guest:guest@192.168.0.1:5672"
          - name: "MAIL_NAME"
            value: "aa@qq.com"
          - name: "MAIL_PWD"
            value: "123456"
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册