2f25d43566
Using Docker volumes for persistent data in the bifrost container is necessary for upgrading the bifrost services. This change adds the following volumes: * bifrost_httpboot * bifrost_ironic * bifrost_mariadb * bifrost_rabbitmq * bifrost_tftpboot Ironic creates hardlinks between the TFTP master image store and the HTTP root path when iPXE is enabled. With different Docker volumes used for these locations we run into https://bugs.launchpad.net/ironic/+bug/1507894 during deployment. If we use a directory under /httpboot to store the master images this issue is avoided. Change-Id: I8653268d3598e7a59d2eb45c8750d45b6fc9e35f Partially-implements: blueprint bifrost-upgrade
54 lines
2.2 KiB
YAML
54 lines
2.2 KiB
YAML
---
|
|
- name: Ensure log directories exist
|
|
command: >
|
|
docker exec bifrost_deploy
|
|
bash -c 'mkdir -p /var/log/kolla/ironic &&
|
|
chown ironic:ironic /var/log/kolla/ironic &&
|
|
mkdir -p /var/log/kolla/ironic-inspector &&
|
|
chown ironic:ironic /var/log/kolla/ironic-inspector &&
|
|
mkdir -p /var/log/kolla/nginx &&
|
|
chown nginx:nginx /var/log/kolla/nginx'
|
|
|
|
- name: Bootstrap bifrost (this may take several minutes)
|
|
command: >
|
|
docker exec bifrost_deploy
|
|
bash -c '/bifrost/scripts/env-setup.sh && source /bifrost/env-vars
|
|
&& cp /etc/bifrost/rabbitmq-env.conf /etc/rabbitmq/rabbitmq-env.conf &&
|
|
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target
|
|
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
|
|
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
|
|
|
|
- name: Installing ssh keys
|
|
command: >
|
|
docker exec bifrost_deploy
|
|
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;
|
|
cp -f /etc/bifrost/id_rsa /root/.ssh/id_rsa &&
|
|
cp -f /etc/bifrost/id_rsa.pub /root/.ssh/id_rsa.pub &&
|
|
cp -f /etc/bifrost/ssh_config /root/.ssh/config &&
|
|
cp -f /etc/bifrost/id_rsa /home/ironic/.ssh/id_rsa &&
|
|
cp -f /etc/bifrost/id_rsa.pub /home/ironic/.ssh/id_rsa.pub &&
|
|
cp -f /etc/bifrost/ssh_config /home/ironic/.ssh/config &&
|
|
chmod 600 /root/.ssh/id_rsa &&
|
|
chmod 600 /root/.ssh/id_rsa.pub &&
|
|
chmod 600 /root/.ssh/config &&
|
|
chmod 600 /home/ironic/.ssh/id_rsa &&
|
|
chmod 600 /home/ironic/.ssh/id_rsa.pub &&
|
|
chmod 600 /home/ironic/.ssh/config &&
|
|
chown ironic:ironic /home/ironic/.ssh/id_rsa &&
|
|
chown ironic:ironic /home/ironic/.ssh/id_rsa.pub &&
|
|
chown ironic:ironic /home/ironic/.ssh/config'
|
|
|
|
# Ironic creates hardlinks between the TFTP master image store and the
|
|
# HTTP root path when iPXE is enabled. With Docker volumes used for these
|
|
# locations we run into https://bugs.launchpad.net/ironic/+bug/1507894
|
|
# during deployment. If we use a directory under /httpboot to store the
|
|
# master images this issue is avoided.
|
|
- name: Configuring TFTP master image path
|
|
command: |
|
|
docker exec bifrost_deploy
|
|
bash -c 'cat >> /etc/ironic/ironic.conf << EOF
|
|
[pxe]
|
|
tftp_master_path = /httpboot/master_images
|
|
EOF
|
|
systemctl restart ironic-conductor'
|