Ceph-install-by-ceph-ansible

Test Picture

摘要:

概述

  • 操作系统:Centos 7.2
  • Vagrant:2.1.2
  • VirtualBox-5.1
  • Ansible:2.6.2
  • pip
  • git

安装Vagrant

第1步:在CentOS 7上安装VirtualBox 5.1

尽管在www.howtoing.com上有几个关于安装virtualBox的教程(例如, 在CentOS 7上安装VirtualBox ),但是,我将很快通过virtualbox 5.1安装。

首先安装VirtualBox依赖项。

1
2
# yum -y install gcc dkms make qt libgomp patch 
# yum -y install kernel-headers kernel-devel binutils glibc-headers glibc-devel font-forge

接下来添加VirtualBox库。

1
2
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

现在安装和构建内核模块。

1
2
# yum install -y VirtualBox-5.1
# /sbin/rcvboxdrv setup

Bug fix: yum install kernel-devel-3.10.0-862.3.3.el7.x86_64

第2步:在CentOS 7上安装Vagrant

在这里,我们将使用yum命令下载并安装Vagrant的最新版本(即在编写时为1.9.6)。

—————- For 64-bit machine —————-

1
# yum -y install https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.rpm

安装pip

需要先安装扩展源EPEL。EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。

1
2
# sudo yum -y install epel-release
# sudo yum -y install python-pip

Ceph-Ansible

You can install directly from the source on GitHub by following these steps:

  • Clone the repository:

    1
    git clone https://github.com/ceph/ceph-ansible.git
  • Next, you must decide which branch of ceph-ansible you wish to use. There are stable branches to choose from or you could use the master branch:

    1
    git checkout $branch
  • Next, use pip and the provided requirements.txt to install ansible and other needed python libraries:

    1
    pip install -r requirements.txt

Ansible on RHEL and CentOS

You can acquire Ansible on RHEL and CentOS by installing from Ansible channel.

On RHEL:

1
subscription-manager repos --enable=rhel-7-server-ansible-2-rpms

(CentOS does not use subscription-manager and already has “Extras” enabled by default.)

1
sudo yum install ansible

Ansible on Ubuntu

You can acquire Ansible on Ubuntu by using the Ansible PPA.

1
2
3
sudo add-apt-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible

Releases

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.0 Support for ceph versions jewel and luminous. This branch supports ansible versions 2.4 and 2.5.
  • stable-3.1 Support for ceph version luminous and mimic. This branch supports ansible versions 2.4 and 2.5
  • master Support for ceph versions luminous, and 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.

在VM中需要配置V-TX;

参考

  1. http://docs.ceph.com/ceph-ansible/master/index.html

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×