bf8eb4809a
Using a kolla_logs volume ensures that logs are persistent beyond the lifespan of the bifrost_deploy container. This is necessary to support upgrading the bifrost services. It also opens the possibility of log forwarding, although we do not currently deploy a fluentd container on the bifrost host. Change-Id: If3118cd75ccc87b0d003d5f382695aeaa43ed0f8 Partially-implements: blueprint bifrost-upgrade
40 lines
1.7 KiB
YAML
40 lines
1.7 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'
|