Merge "Remove tripleo.sh --bootstrap-subnodes add ceph loop device"
This commit is contained in:
commit
617c1a3e96
|
@ -0,0 +1,24 @@
|
|||
- hosts: subnodes
|
||||
name: Bootstrap subnodes - setup ceph-ansible /dev/loop3 /var/lib/ceph-osd.img
|
||||
vars:
|
||||
ceph_loop_device: /dev/loop3
|
||||
ceph_loop_device_file: /var/lib/ceph-osd.img
|
||||
tasks:
|
||||
- name: stat ceph_loop_device see if it already exists
|
||||
stat:
|
||||
path: "{{ ceph_loop_device }}"
|
||||
register: dev_loop3_res
|
||||
- name: log to syslog if ceph_loop_device exists
|
||||
syslogger:
|
||||
msg: "boostrap-subnodes - warning {{ ceph_loop_device }} already exists"
|
||||
when: dev_loop3_res.stat.exists
|
||||
- name: Make sure we have losetup installed/latest
|
||||
package:
|
||||
name: util-linux
|
||||
state: latest
|
||||
- name: Use dd and losetup to create the loop device
|
||||
become: true
|
||||
shell: |
|
||||
dd if=/dev/zero of={{ ceph_loop_device_file }} bs=1 count=0 seek=7G
|
||||
losetup {{ ceph_loop_device }} {{ ceph_loop_device_file }}
|
||||
lsblk
|
|
@ -175,33 +175,3 @@ function sanitize_ip_address {
|
|||
echo $ip
|
||||
fi
|
||||
}
|
||||
|
||||
function echo_vars_to_deploy_env_oooq {
|
||||
CALLER=$(caller)
|
||||
echo "# Written via echo_vars_to_deploy_env from $CALLER" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
for VAR in NODEPOOL_CENTOS_MIRROR http_proxy MY_IP no_proxy NODECOUNT SSH_OPTIONS STABLE_RELEASE TRIPLEO_ROOT TOCI_JOBTYPE JOB_NAME SUBNODES_SSH_KEY FEATURE_BRANCH BOOTSTRAP_SUBNODES_MINIMAL; do
|
||||
if [ -n "${!VAR:+x}" ]; then
|
||||
echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
fi
|
||||
done
|
||||
# TODO(gcerami) uncomment this code if 3nodes jobs are implemented before the bootstrap role
|
||||
# in quickstart. If the bootstrap role is implemented first, this function can be completely
|
||||
# removed
|
||||
#for role in $OVERCLOUD_ROLES; do
|
||||
# eval hosts=\${${role}_hosts}
|
||||
# echo "export ${role}_hosts=\"${hosts}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
#done
|
||||
}
|
||||
|
||||
function subnodes_scp_deploy_env {
|
||||
for ip in $(cat /etc/nodepool/sub_nodes_private); do
|
||||
sanitized_address=$(sanitize_ip_address $ip)
|
||||
ssh $SSH_OPTIONS -tt -i /etc/nodepool/id_rsa $ip \
|
||||
sudo mkdir -p $TRIPLEO_ROOT/tripleo-ci
|
||||
scp $SSH_OPTIONS -i /etc/nodepool/id_rsa \
|
||||
$TRIPLEO_ROOT/tripleo-ci/deploy.env ${sanitized_address}:
|
||||
ssh $SSH_OPTIONS -tt -i /etc/nodepool/id_rsa $ip \
|
||||
sudo cp deploy.env $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -240,26 +240,6 @@ else
|
|||
undercloud_haproxy_admin_ip=$undercloud_net_range"3"
|
||||
export no_proxy=$undercloud_services_ip,$undercloud_haproxy_public_ip,$undercloud_haproxy_admin_ip,$MY_IP,$MY_IP_eth1
|
||||
|
||||
|
||||
|
||||
# multinode bootstrap script
|
||||
export DO_BOOTSTRAP_SUBNODES=${DO_BOOTSTRAP_SUBNODES:-1}
|
||||
export BOOTSTRAP_SUBNODES_MINIMAL=1
|
||||
overcloud_release=${UPGRADE_RELEASE:-$STABLE_RELEASE}
|
||||
if [ "${overcloud_release}" = "newton" ]; then
|
||||
BOOTSTRAP_SUBNODES_MINIMAL=0
|
||||
fi
|
||||
|
||||
echo_vars_to_deploy_env_oooq
|
||||
subnodes_scp_deploy_env
|
||||
if [ "$DO_BOOTSTRAP_SUBNODES" = "1" ]; then
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh \
|
||||
--bootstrap-subnodes \
|
||||
2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S |"), $0; fflush(); }' | sudo tee /var/log/bootstrap-subnodes.log \
|
||||
|| (tail -n 50 /var/log/bootstrap-subnodes.log && false)
|
||||
fi
|
||||
|
||||
|
||||
# finally, run quickstart
|
||||
./toci_quickstart.sh
|
||||
fi
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
- playbooks/nodepool-provider/pre.yaml
|
||||
- playbooks/multinode-networking/pre.yaml
|
||||
- playbooks/openstack-zuul-jobs/legacy/pre.yaml
|
||||
- playbooks/tripleo-ci/ceph.yaml
|
||||
run: playbooks/tripleo-ci/run-v3.yaml
|
||||
post-run: playbooks/tripleo-ci/post.yaml
|
||||
irrelevant-files:
|
||||
|
|
Loading…
Reference in New Issue