- 操作系统：Centos 7.2
第1步：在CentOS 7上安装VirtualBox 5.1
尽管在www.howtoing.com上有几个关于安装virtualBox的教程（例如， 在CentOS 7上安装VirtualBox ），但是，我将很快通过virtualbox 5.1安装。
# yum -y install gcc dkms make qt libgomp patch
# yum install -y VirtualBox-5.1
Bug fix： yum install kernel-devel-3.10.0-862.3.3.el7.x86_64
—————- For 64-bit machine —————-
# yum -y install https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.rpm
需要先安装扩展源EPEL。EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造，为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。
# sudo yum -y install epel-release
You can install directly from the source on GitHub by following these steps:
Clone the repository:
git clone https://github.com/ceph/ceph-ansible.git
Next, you must decide which branch of
ceph-ansibleyou wish to use. There are stable branches to choose from or you could use the master branch:
git checkout $branch
Next, use pip and the provided requirements.txt to install ansible and other needed python libraries:
pip install -r requirements.txt
You can acquire Ansible on RHEL and CentOS by installing from Ansible channel.
subscription-manager repos --enable=rhel-7-server-ansible-2-rpms
(CentOS does not use subscription-manager and already has “Extras” enabled by default.)
sudo yum install ansible
You can acquire Ansible on Ubuntu by using the Ansible PPA.
sudo add-apt-repository ppa:ansible/ansible
The following branches should be used depending on your requirements. The
stable-*branches have been QE tested and sometimes recieve backport fixes throughout their lifecycle. The
master branch should be considered experimental and used with caution.
stable-3.0Support for ceph versions
luminous. This branch supports ansible versions
stable-3.1Support for ceph version
mimic. This branch supports ansible versions
masterSupport for ceph versions
mimic. This branch supports ansible version 2.5``.
We will customize the following sample files for sandbox deployment: vagrant_variables.yml.sample
options that ought to be supplied to Vagrantfile the instructions from Vagrantfile
need to be built and the actions to provision them. site.yml.sample
: This file presents a sample of configuration to describe the types of virtual machine that
. The vagrant command uses : This represents a set of sample Ansible tasks as a part of
main Ansible playbook. The vagrant provisioner that runs after you start all the virtual machines is tasked with the responsibility of running this playbook. This playbook is responsible for completing the final step of bringing the Ceph cluster up. group_vars/all.yml.sample
: The all .yml.sample present within group_vars/
directory contains an Ansible-specific configuration that applies to all virtual machine hostgroups. These variables will be consumed by the Ansible playbook when the vagrant provisioner runs it.