table of Contents
Ceph automated deployment ---- Ceph-ansible
Operating System: rhel-7.5
I. Introduction --Ceph of several different deployment
- Manual Deployment
- Helm + kubernetes deployment
- Ceph-deploy deployment
- Ceph-ansible部署
Second, use deployment Ceph Ceph-ansible
From the above GIT copy of the source code to local
# git clone https://github.com/ceph/ceph-ansible.git
Switch to the stable-3.1 version (use git-related details, please inquire on their own)
# cd ceph-ansible //进入到ceph-ansible目录下 # git branch -r //查看系统分支 # git fetch origin stable-3.1 //将远端得3.1拉到本地 # git chechout stable-3.1 //切换到3.1分支
Installation ansible, use pip to install ansible.
# pip install -r requirements.txt
Creating Inventory List
Only creates the following roles, we only have to deploy Ceph basic functions
[mons] node1 node2 node3 [osds] node1 node2 node3 [rgws] node1 node2 node3 [clients] node1 node2 node3 [mgrs] node1 node2 node3
Copy group_vars / all.yml.sample to group_vars / all.yml, and modify all.yml file, add the following parameters:
ceph_origin: repository ceph_repository: community ceph_mirror: https://mirrors.163.com/ceph/ ceph_stable_release: luminous ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}" ceph_stable_redhat_distro: el7 monitor_interface: eth1 journal_size: 1024 public_network: 192.168.9.0/24 cluster_network: 192.168.10.0/24 osd_objectstore: filestore radosgw_interface: "{{ monitor_interface }}" osd_auto_discovery: true
Copy site.yml.sample to site.yml (commented Some host, the following effects :)
- hosts: - mons - agents - osds # - mdss - rgws # - nfss # - restapis # - rbdmirrors - clients - mgrs # - iscsigws # - iscsi-gws # for backward compatibility only!
Perform deployment operations
ansible-playbook -i hosts site.yml
Precautions:
Before deploying a cluster, but also to do something:
1, do address resolution on each server
2, do mutual trust between the server (you can avoid dense login)
3, do time synchronization using chrony
Third, subsequent updates. . .