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