-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit_repo.sh
executable file
·37 lines (32 loc) · 1.03 KB
/
init_repo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Installs dependencies and boots a cluster so that tests can be run.
# This is to reproduce the results found in the paper, and other clusters will
# require modifications in the configuration (e.g., different drive configs).
set -e
# We need a hostfile describing the cluster config
HOSTFILE="hosts16.yml"
# We also can use SSD or HDD for our disk backend.
USESSD=false
# Dependency usage:
# virtualenv: install ansible via pip
# fio: for RBD benchmarks
sudo apt-get update
sudo apt-get install -y virtualenv fio
virtualenv -p python3 ceph-ansible/venv
source ceph-ansible/venv/bin/activate
# We need ansible
pip3 install -r ceph-ansible/requirements.txt
cd ceph-ansible
# We perform drive partitioning for OSDs via LVM
if ${USESSD};
then
echo "Using NVME"
ansible-playbook -i ${HOSTFILE} partition_cluster_lvm.yml \
--extra-vars "OSDDrive=nvme0n1"
else
echo "Using SDB"
ansible-playbook -i ${HOSTFILE} partition_cluster_lvm.yml \
--extra-vars "OSDDrive=sdb"
fi
# We install Ceph
ansible-playbook -i ${HOSTFILE} site.yml