diff options
Diffstat (limited to 'ansible/roles/bifrost')
| -rw-r--r-- | ansible/roles/bifrost/defaults/main.yml | 7 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/bootstrap.yml | 28 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/config.yml | 29 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/deploy-servers.yml | 20 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/deploy.yml | 6 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/main.yml | 2 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/precheck.yml | 1 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/reconfigure.yml | 64 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/start.yml | 12 | ||||
| -rw-r--r-- | ansible/roles/bifrost/tasks/upgrade.yml | 4 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/bifrost.yml.j2 | 3 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/dib.yml.j2 | 2 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/id_rsa | 1 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/id_rsa.pub | 1 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/servers.yml.j2 | 1 | ||||
| -rw-r--r-- | ansible/roles/bifrost/templates/ssh_config | 3 |
16 files changed, 0 insertions, 184 deletions
diff --git a/ansible/roles/bifrost/defaults/main.yml b/ansible/roles/bifrost/defaults/main.yml deleted file mode 100644 index 53c51361a..000000000 --- a/ansible/roles/bifrost/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -#################### -# Docker -#################### -bifrost_deploy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-bifrost-deploy" -bifrost_deploy_tag: "{{ openstack_release }}" -bifrost_deploy_image_full: "{{ bifrost_deploy_image }}:{{ bifrost_deploy_tag }}" diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml deleted file mode 100644 index 3d505b3c8..000000000 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Bootstrap bifrost (this may take several minutes) - command: > - docker exec bifrost_deploy - bash -c '/bifrost/scripts/env-setup.sh && source /bifrost/env-vars - && source /opt/stack/ansible/hacking/env-setup && - ansible-playbook -vvvv -i /bifrost/playbooks/inventory/localhost - /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' diff --git a/ansible/roles/bifrost/tasks/config.yml b/ansible/roles/bifrost/tasks/config.yml deleted file mode 100644 index 717c4dead..000000000 --- a/ansible/roles/bifrost/tasks/config.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - recurse: yes - with_items: - - "bifrost" - -- name: Generate bifrost configs - merge_yaml: - sources: - - "{{ role_path }}/templates/{{ item }}.yml.j2" - - "{{ node_custom_config }}/{{ item }}.yml" - - "{{ node_custom_config }}/bifrost/{{ item }}.yml" - dest: "{{ node_config_directory }}/bifrost/{{ item }}.yml" - with_items: - - "bifrost" - - "dib" - - "servers" - -- name: Template ssh keys - template: - src: "{{ item.src }}" - dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}" - with_items: - - { src: "id_rsa", dest: "id_rsa" } - - { src: "id_rsa.pub", dest: "id_rsa.pub" } - - { src: "ssh_config", dest: "ssh_config" } diff --git a/ansible/roles/bifrost/tasks/deploy-servers.yml b/ansible/roles/bifrost/tasks/deploy-servers.yml deleted file mode 100644 index e8d98abda..000000000 --- a/ansible/roles/bifrost/tasks/deploy-servers.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Enrolling physical servers with ironic - command: > - docker exec bifrost_deploy - bash -c 'source /bifrost/env-vars - && source /opt/stack/ansible/hacking/env-setup && - export BIFROST_INVENTORY_SOURCE=/etc/bifrost/servers.yml && - ansible-playbook -vvvv -i /bifrost/playbooks/inventory/bifrost_inventory.py - /bifrost/playbooks/enroll-dynamic.yaml -e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python" - -e @/etc/bifrost/bifrost.yml' - -- name: Deploy physical servers with ironic - command: > - docker exec bifrost_deploy - bash -c 'source /bifrost/env-vars - && source /opt/stack/ansible/hacking/env-setup && - export BIFROST_INVENTORY_SOURCE=/etc/bifrost/servers.yml && - ansible-playbook -vvvv -i /bifrost/playbooks/inventory/bifrost_inventory.py - /bifrost/playbooks/deploy-dynamic.yaml -e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python" - -e @/etc/bifrost/bifrost.yml' diff --git a/ansible/roles/bifrost/tasks/deploy.yml b/ansible/roles/bifrost/tasks/deploy.yml deleted file mode 100644 index fe58cc3f7..000000000 --- a/ansible/roles/bifrost/tasks/deploy.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: config.yml - -- include: start.yml - -- include: bootstrap.yml diff --git a/ansible/roles/bifrost/tasks/main.yml b/ansible/roles/bifrost/tasks/main.yml deleted file mode 100644 index b017e8b4a..000000000 --- a/ansible/roles/bifrost/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: "{{ action }}.yml" diff --git a/ansible/roles/bifrost/tasks/precheck.yml b/ansible/roles/bifrost/tasks/precheck.yml deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/bifrost/tasks/precheck.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/bifrost/tasks/reconfigure.yml b/ansible/roles/bifrost/tasks/reconfigure.yml deleted file mode 100644 index fdd316fcc..000000000 --- a/ansible/roles/bifrost/tasks/reconfigure.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- name: Ensuring the containers up - kolla_docker: - name: "{{ item.name }}" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: inventory_hostname in groups[item.group] - with_items: - - { name: bifrost-deploy, group: bifrost-deploy } - -- include: config.yml - -- name: Check the configs - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: check_results - when: inventory_hostname in groups[item.group] - with_items: - - { name: bifrost-deploy, group: bifrost-deploy } - -# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS' -# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', -# just remove the container and start again -- name: Containers config strategy - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: container_envs - when: inventory_hostname in groups[item.group] - with_items: - - { name: bifrost-deploy, group: bifrost-deploy } - -- name: Remove the containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_containers - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: bifrost-deploy, group: bifrost-deploy }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" - -- include: start.yml - when: remove_containers.changed - -- name: Restart containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "restart_container" - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == 'COPY_ALWAYS' - - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: bifrost-deploy, group: bifrost-deploy }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" diff --git a/ansible/roles/bifrost/tasks/start.yml b/ansible/roles/bifrost/tasks/start.yml deleted file mode 100644 index 58b247b66..000000000 --- a/ansible/roles/bifrost/tasks/start.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Starting bifrost deploy container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ bifrost_deploy_image_full }}" - name: "bifrost_deploy" - privileged: True - volumes: - - "{{ node_config_directory }}/bifrost/:/etc/bifrost:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/dev:/dev" diff --git a/ansible/roles/bifrost/tasks/upgrade.yml b/ansible/roles/bifrost/tasks/upgrade.yml deleted file mode 100644 index 1f16915ad..000000000 --- a/ansible/roles/bifrost/tasks/upgrade.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- include: config.yml - -- include: start.yml diff --git a/ansible/roles/bifrost/templates/bifrost.yml.j2 b/ansible/roles/bifrost/templates/bifrost.yml.j2 deleted file mode 100644 index 224d11a08..000000000 --- a/ansible/roles/bifrost/templates/bifrost.yml.j2 +++ /dev/null @@ -1,3 +0,0 @@ -mysql_service_name: mysql -ansible_python_interpreter: /var/lib/kolla/venv/bin/python -network_interface: "{{ bifrost_network_interface }}" diff --git a/ansible/roles/bifrost/templates/dib.yml.j2 b/ansible/roles/bifrost/templates/dib.yml.j2 deleted file mode 100644 index 9e54fba23..000000000 --- a/ansible/roles/bifrost/templates/dib.yml.j2 +++ /dev/null @@ -1,2 +0,0 @@ -create_image_via_dib: "true" -dib_os_element: "debian" diff --git a/ansible/roles/bifrost/templates/id_rsa b/ansible/roles/bifrost/templates/id_rsa deleted file mode 100644 index d1d3a9ed4..000000000 --- a/ansible/roles/bifrost/templates/id_rsa +++ /dev/null @@ -1 +0,0 @@ -{{ bifrost_ssh_key.private_key }} diff --git a/ansible/roles/bifrost/templates/id_rsa.pub b/ansible/roles/bifrost/templates/id_rsa.pub deleted file mode 100644 index 173bbb204..000000000 --- a/ansible/roles/bifrost/templates/id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -{{ bifrost_ssh_key.public_key }} diff --git a/ansible/roles/bifrost/templates/servers.yml.j2 b/ansible/roles/bifrost/templates/servers.yml.j2 deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/bifrost/templates/servers.yml.j2 +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/bifrost/templates/ssh_config b/ansible/roles/bifrost/templates/ssh_config deleted file mode 100644 index 41dff51a6..000000000 --- a/ansible/roles/bifrost/templates/ssh_config +++ /dev/null @@ -1,3 +0,0 @@ -Host * - StrictHostKeyChecking no - UserKnownHostsFile /dev/null |
