mirror of https://github.com/ceph/ceph-ansible.git
parent
b5544a1be7
commit
860125ff8f
|
@ -37,7 +37,7 @@ More details:
|
||||||
Run your virtual machines:
|
Run your virtual machines:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ vagrant up
|
$ vagrant up --provider=virtualbox
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
|
|
|
@ -16,6 +16,7 @@ SUBNET = settings['subnet']
|
||||||
BOX = settings['vagrant_box']
|
BOX = settings['vagrant_box']
|
||||||
MEMORY = settings['memory']
|
MEMORY = settings['memory']
|
||||||
STORAGECTL = settings['vagrant_storagectl']
|
STORAGECTL = settings['vagrant_storagectl']
|
||||||
|
ETH = settings['eth']
|
||||||
|
|
||||||
ansible_provision = proc do |ansible|
|
ansible_provision = proc do |ansible|
|
||||||
ansible.playbook = 'site.yml'
|
ansible.playbook = 'site.yml'
|
||||||
|
@ -38,7 +39,7 @@ ansible_provision = proc do |ansible|
|
||||||
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
|
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
|
||||||
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
|
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
|
||||||
journal_size: 100,
|
journal_size: 100,
|
||||||
monitor_interface: 'eth1',
|
monitor_interface: ETH,
|
||||||
cluster_network: "#{SUBNET}.0/24",
|
cluster_network: "#{SUBNET}.0/24",
|
||||||
public_network: "#{SUBNET}.0/24",
|
public_network: "#{SUBNET}.0/24",
|
||||||
devices: "[ '/dev/sdb', '/dev/sdc' ]",
|
devices: "[ '/dev/sdb', '/dev/sdc' ]",
|
||||||
|
|
|
@ -26,5 +26,6 @@ if [[ -x $(which lsb_release 2>/dev/null) ]]; then
|
||||||
apt-get install -y ansible
|
apt-get install -y ansible
|
||||||
fi
|
fi
|
||||||
elif [[ -r /etc/redhat-release ]]; then
|
elif [[ -r /etc/redhat-release ]]; then
|
||||||
|
yum install -y epel-release
|
||||||
yum install -y ansible
|
yum install -y ansible
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -70,6 +70,14 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
|
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
|
||||||
|
|
||||||
|
- name: create ceph conf directory
|
||||||
|
file:
|
||||||
|
path: /etc/ceph
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
- name: generate ceph configuration file
|
- name: generate ceph configuration file
|
||||||
template:
|
template:
|
||||||
src: ceph.conf.j2
|
src: ceph.conf.j2
|
||||||
|
|
|
@ -11,6 +11,14 @@
|
||||||
state: present
|
state: present
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: create bootstrap-osd
|
||||||
|
file:
|
||||||
|
path: /var/lib/ceph/bootstrap-osd/
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 600
|
||||||
|
|
||||||
- name: copy osd bootstrap key
|
- name: copy osd bootstrap key
|
||||||
copy:
|
copy:
|
||||||
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
|
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
|
||||||
|
|
|
@ -11,15 +11,22 @@ client_vms: 0
|
||||||
subnet: 192.168.42
|
subnet: 192.168.42
|
||||||
|
|
||||||
# MEMORY
|
# MEMORY
|
||||||
|
# set 1024 for CentOS
|
||||||
memory: 256
|
memory: 256
|
||||||
|
|
||||||
|
# Ethernet interface name
|
||||||
|
# use eth1 for ubuntu, enp0s8 for CentOS
|
||||||
|
eth: 'eth1'
|
||||||
|
|
||||||
# VAGRANT BOX
|
# VAGRANT BOX
|
||||||
# Fedora: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
# Fedora: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
||||||
# Ubuntu: ubuntu/trusty64
|
# Ubuntu: ubuntu/trusty64
|
||||||
# CentOS: chef/centos-7.0
|
# CentOS: bento/centos-7.1
|
||||||
# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
|
# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
|
||||||
# For more boxes have a look at:
|
# For more boxes have a look at:
|
||||||
# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
|
# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
|
||||||
# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
|
# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
|
||||||
vagrant_box: ubuntu/trusty64
|
vagrant_box: ubuntu/trusty64
|
||||||
|
|
||||||
|
# use vagrant_storagectl: 'SATA Controller' for CentOS
|
||||||
vagrant_storagectl: 'SATAController'
|
vagrant_storagectl: 'SATAController'
|
||||||
|
|
Loading…
Reference in New Issue