]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
buildsys: switch source download to quincy
[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
522d829b
TL
5
6cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm
b3b6e05e
TL
7chmod +x /root/bin/cephadm
8mkdir -p /etc/ceph
9mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
522d829b 10
a4b75251 11cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --skip-monitoring-stack --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
522d829b 12
b3b6e05e 13fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
a4b75251 14cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"
522d829b 15
b3b6e05e
TL
16{% for number in range(1, nodes) %}
17 ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
522d829b 18 {% if expanded_cluster is defined %}
a4b75251 19 ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}.{{ domain }}
522d829b 20 {% endif %}
b3b6e05e 21{% endfor %}
522d829b
TL
22
23{% if expanded_cluster is defined %}
a4b75251 24 ${cephadm_shell} ceph orch apply osd --all-available-devices
522d829b 25{% endif %}