Run your virtual machines:
```bash
-$ vagrant up
+$ vagrant up --provider=virtualbox
...
...
...
BOX = settings['vagrant_box']
MEMORY = settings['memory']
STORAGECTL = settings['vagrant_storagectl']
+ETH = settings['eth']
ansible_provision = proc do |ansible|
ansible.playbook = 'site.yml'
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
- monitor_interface: 'eth1',
+ monitor_interface: ETH,
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
devices: "[ '/dev/sdb', '/dev/sdc' ]",
apt-get install -y ansible
fi
elif [[ -r /etc/redhat-release ]]; then
+ yum install -y epel-release
yum install -y ansible
fi
sudo: false
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
template:
src: ceph.conf.j2
state: present
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
copy:
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
subnet: 192.168.42
# MEMORY
+# set 1024 for CentOS
memory: 256
+# Ethernet interface name
+# use eth1 for ubuntu, enp0s8 for CentOS
+eth: 'eth1'
+
# 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
# 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'
# For more boxes have a look at:
# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
vagrant_box: ubuntu/trusty64
+
+# use vagrant_storagectl: 'SATA Controller' for CentOS
vagrant_storagectl: 'SATAController'