配置 Ansible 用于 Teuthology
截至2015年7月8日,teuthology(Ceph 集成测试软件)已从使用 Chef 切换到使用 Ansible。为了使其正常工作,必须创建两个文件。/etc/ansible/hosts/group_vars/all.yml 文件,内容如下:
modify_fstab: false
modify_fstab 对于 OpenStack 调配的实例是必需的,但即使始终存在也不会造成损害(唯一的缺点是挂载选项不会持久保存到 /etc/fstab 中,但它们会按应有的方式设置)。然后,必须用以下内容填充 /etc/ansible/hosts/mylab 文件:
[testnodes] ovh224000.teuthology ovh224001.teuthology ...
其中 ovh224000.teuthology 等是所有将用作 teuthology 目标的机器的完全限定域名。Ansible playbook 将期望在 [testnodes] 部分下找到所有目标。teuthology 任务的输出应显示正在使用 Ansible playbook,例如:
... teuthology.run_tasks:Running task ansible.cephlab... ... INFO:teuthology.task.ansible.out:PLAY [all] ***** ... TASK: [ansible-managed | Create the sudo group.] ****************************** ...
在 teuthology 使用的角色不应需要 secrets 仓库 之前,以下内容必须位于 /etc/ansible/hosts/group_vars/all.yml 中。
lab_domain: teuthology
ansible_sudo: true ansible_user: ubuntu
将 64.90.32.37 apt-mirror.front.sepia.ceph.com 添加到 /etc/hosts
mirror_host: apt-mirror.front.sepia.ceph.com git_mirror_host: git.ceph.com kernel_options: '' lab_name: lab ansible_user_ssh_keys: [] ntp_servers
- 0.us.pool.ntp.org
- 1.us.pool.ntp.org
- 2.us.pool.ntp.org
- 3.us.pool.ntp.org gitbuilder_host: gitbuilder.ceph.com epel_mirror_baseurl: "http://dl.fedoraproject.org/pub/epel" teuthology_user: "ubuntu" admin_users: [] lab_users: [] resolvconf: [] modify_fstab: false