]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / ci / cephadm / bootstrap-cluster.sh
CommitLineData
b3b6e05e
TL
1#!/usr/bin/env bash
2
20effc67
TL
3set -x
4
b3b6e05e
TL
5export PATH=/root/bin:$PATH
6mkdir /root/bin
522d829b
TL
7
8cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm
b3b6e05e
TL
9chmod +x /root/bin/cephadm
10mkdir -p /etc/ceph
11mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
522d829b 12
20effc67
TL
13bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate'
14bootstrap_extra_options_not_expanded='--skip-monitoring-stack'
15{% if expanded_cluster is not defined %}
16 bootstrap_extra_options+=" ${bootstrap_extra_options_not_expanded}"
17{% endif %}
18
19cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --shared_ceph_folder /mnt/{{ ceph_dev_folder }} ${bootstrap_extra_options}
522d829b 20
b3b6e05e 21fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
a4b75251 22cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"
522d829b 23
b3b6e05e 24{% for number in range(1, nodes) %}
20effc67 25 ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}
522d829b 26 {% if expanded_cluster is defined %}
20effc67 27 ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}
522d829b 28 {% endif %}
b3b6e05e 29{% endfor %}
522d829b
TL
30
31{% if expanded_cluster is defined %}
a4b75251 32 ${cephadm_shell} ceph orch apply osd --all-available-devices
522d829b 33{% endif %}