Teuthology的使用与Ceph自动化测试用例的编写(二)

本文详细介绍了Teuthology中常用的tasks,包括Install、ceph、interactive和rados等,用于Ceph集群的自动化测试。Teuthology提供设置与拆卸Ceph集群、等待daemon故障、管理ceph进程等功能,辅助进行Ceph自动化测试。
摘要由CSDN通过智能技术生成

Teuthology常用的task

下面列举了一些常用的tasks,还有很多没列出来,可以自己去查看tasks。这也是这个系列的最后一篇了吧,其他,比如代码执行流程之类的,代码比较简单也有什么好写的了,如果有需要可以写一写。

CentOS下搭建Teuthology Ceph自动化测试平台(一)
CentOS下搭建Teuthology Ceph自动化测试平台(二)
CentOS下搭建Teuthology Ceph自动化测试平台(三)
CentOS下搭建Teuthology Ceph自动化测试平台(四)
CentOS下搭建Teuthology Ceph自动化测试平台(五)
Teuthology节点的部署——Ceph自动化测试平台(六)
Teuthology的使用与Ceph自动化测试用例的编写(一)
Teuthology的使用与Ceph自动化测试用例的编写(二)

Install

Install packages for a given project.

Install packages for a given project.

    tasks:
    - install:
        project: ceph
        branch: bar
    - install:
        project: samba
        branch: foo
        extra_packages: ['samba']
    - install:
        rhbuild: 1.3.0
        playbook: downstream_setup.yml
        vars:
           yum_repos:
             - url: "http://location.repo"
               name: "ceph_repo"

Overrides are project specific:

    overrides:
      install:
        ceph:
          sha1: ...

Debug packages may optionally be installed:

    overrides:
      install:
        ceph:
          debuginfo: true

Default package lists (which come from packages.yaml) may be overridden:

    overrides:
      install:
        ceph:
          packages:
            deb:
            - ceph-osd
            - ceph-mon
            rpm:
            - ceph-devel
            - rbd-fuse

    When tag, branch and sha1 do not reference the same commit hash, the
    tag takes precedence over the branch and the branch takes precedence
over the sha1.

    When the overrides have a sha1 that is different from the sha1 of
    the project to be installed, it will be a noop if the project has
    a branch or tag, because they take precedence over the sha1. For
instance:

    overrides:
      install:
        ceph:
          sha1: 1234
    tasks:
    - install:
        project: ceph
          sha1: 4567
          branch: foobar # which has sha1 4567

    The override will transform the tasks as follows:
    tasks:
    - install:
        project: ceph
          sha1: 1234
          branch: foobar # which has sha1 4567

    But the branch takes precedence over the sha1 and foobar
    will be installed. The override of the sha1 has no effect.
    When passed 'rhbuild' as a key, it will attempt to install an rh ceph build
using ceph-deploy

    Reminder regarding teuthology-suite side effects:
    The teuthology-suite command always adds the following:
    overrides:
      install:
        ceph:
          sha1: 1234

    where sha1 matches the --ceph argument. For instance if
    teuthology-suite is called with --ceph master, the sha1 will be
    the tip of master. If called with --ceph v0.94.1, the sha1 will be
    the v0.94.1 (as returned by git rev-parse v0.94.1 which is not to
    be confused with git rev-parse v0.94.1^{commit})

Upgrades packages for a given project

Upgrades packages for a given project. example: {cmd_parameter} = ceph_deploy_upgrade 


    For example::
        tasks:
        - install.{cmd_parameter}:
             all:
                branch: end

    or specify specific roles::
        tasks:
        - install.{cmd_parameter}:
             mon.a:
                branch: end
             osd.0:
                branch: other

    or rely on the overrides for the target version::
        overrides:
          install:
            ceph:
              sha1: ...
        tasks:
        - install.{cmd_parameter}:
            all:
    (HACK: the overrides will *only* apply the sha1/branch/tag if those
    keys are not present in the config.)

    It is also possible to attempt to exclude packages from the upgrade set:
        tasks:
        - install.{cmd_parameter}:
            exclude_packages: ['ceph-test', 'ceph-test-dbg']

ceph

Set up and tear down a Ceph cluster

Set up and tear down a Ceph cluster.

    For example::
        tasks:
        - ceph:
        - interactive:

    You can also specify what branch to run::
        tasks:
        - ceph:
            branch: foo

    
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值