]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
import ceph pacific 16.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / ci / cephadm / bootstrap-cluster.sh
CommitLineData
b3b6e05e
TL
1#!/usr/bin/env bash
2
3export PATH=/root/bin:$PATH
4mkdir /root/bin
5{% if ceph_dev_folder is defined %}
6 cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm
7{% else %}
8 cd /root/bin
9 curl --silent --remote-name --location https://raw.githubusercontent.com/ceph/ceph/master/src/cephadm/cephadm
10{% endif %}
11chmod +x /root/bin/cephadm
12mkdir -p /etc/ceph
13mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
14{% if ceph_dev_folder is defined %}
15 cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
16{% else %}
17 cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate
18{% endif %}
19fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
20{% for number in range(1, nodes) %}
21 ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
22{% endfor %}