]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
bump version to 17.2.5-pve1
[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 13bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate'
2a845540
TL
14
15# commenting the below lines. Uncomment it when any extra options are
16# needed for the bootstrap.
17# bootstrap_extra_options_not_expanded=''
18# {% if expanded_cluster is not defined %}
19# bootstrap_extra_options+=" ${bootstrap_extra_options_not_expanded}"
20# {% endif %}
20effc67
TL
21
22cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --shared_ceph_folder /mnt/{{ ceph_dev_folder }} ${bootstrap_extra_options}
522d829b 23
b3b6e05e 24fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
a4b75251 25cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"
522d829b 26
b3b6e05e 27{% for number in range(1, nodes) %}
20effc67 28 ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}
522d829b 29 {% if expanded_cluster is defined %}
20effc67 30 ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}
522d829b 31 {% endif %}
b3b6e05e 32{% endfor %}
522d829b
TL
33
34{% if expanded_cluster is defined %}
a4b75251 35 ${cephadm_shell} ceph orch apply osd --all-available-devices
522d829b 36{% endif %}