diff options
| author | Steven Dake <stdake@cisco.com> | 2016-11-15 19:01:25 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2016-11-15 21:34:17 -0700 |
| commit | 3fcef82946f7053affcfb0b1b3ef4292beb9fa95 (patch) | |
| tree | 0b9083d2cbf7d6c8d372de6b016419d6a719d424 /ansible/roles/nova | |
| parent | 0963c2255a9718419c1cf8deaff350ea6ddc8472 (diff) | |
| download | kolla-3fcef82946f7053affcfb0b1b3ef4292beb9fa95.tar.gz kolla-3fcef82946f7053affcfb0b1b3ef4292beb9fa95.zip | |
Remove Ansible from Kolla
Change-Id: I5396e4b9927d3e65b6aa4185238a43a4765a996b
Diffstat (limited to 'ansible/roles/nova')
39 files changed, 0 insertions, 1624 deletions
diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml deleted file mode 100644 index bf24c02f7..000000000 --- a/ansible/roles/nova/defaults/main.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -project_name: "nova" - -#################### -# Ceph -#################### -ceph_nova_pool_type: "{{ ceph_pool_type }}" -ceph_nova_cache_mode: "{{ ceph_cache_mode }}" - -# Due to Ansible issues on include, you cannot override these variables. Please -# override the variables they reference instead. -nova_pool_name: "{{ ceph_nova_pool_name }}" -nova_pool_type: "{{ ceph_nova_pool_type }}" -nova_cache_mode: "{{ ceph_nova_cache_mode }}" - -# Discard option for nova managed disks. Requires libvirt (1, 0, 6) or later and -# qemu (1, 6, 0) or later. Set to "" to disable. -nova_hw_disk_discard: "unmap" - - -#################### -# Database -#################### -nova_database_name: "nova" -nova_database_user: "nova" -nova_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" - -nova_api_database_name: "nova_api" -nova_api_database_user: "nova_api" -nova_api_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" - -#################### -# Docker -#################### -nova_libvirt_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-libvirt" -nova_libvirt_tag: "{{ openstack_release }}" -nova_libvirt_image_full: "{{ nova_libvirt_image }}:{{ nova_libvirt_tag }}" - -nova_ssh_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-ssh" -nova_ssh_tag: "{{ openstack_release }}" -nova_ssh_image_full: "{{ nova_ssh_image }}:{{ nova_ssh_tag }}" - -nova_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-conductor" -nova_conductor_tag: "{{ openstack_release }}" -nova_conductor_image_full: "{{ nova_conductor_image }}:{{ nova_conductor_tag }}" - -nova_consoleauth_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-consoleauth" -nova_consoleauth_tag: "{{ openstack_release }}" -nova_consoleauth_image_full: "{{ nova_consoleauth_image }}:{{ nova_consoleauth_tag }}" - -nova_novncproxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-novncproxy" -nova_novncproxy_tag: "{{ openstack_release }}" -nova_novncproxy_image_full: "{{ nova_novncproxy_image }}:{{ nova_novncproxy_tag }}" - -nova_spicehtml5proxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-spicehtml5proxy" -nova_spicehtml5proxy_tag: "{{ openstack_release }}" -nova_spicehtml5proxy_image_full: "{{ nova_spicehtml5proxy_image }}:{{ nova_spicehtml5proxy_tag }}" - -nova_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-scheduler" -nova_scheduler_tag: "{{ openstack_release }}" -nova_scheduler_image_full: "{{ nova_scheduler_image }}:{{ nova_scheduler_tag }}" - -nova_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-compute" -nova_compute_tag: "{{ openstack_release }}" -nova_compute_image_full: "{{ nova_compute_image }}:{{ nova_compute_tag }}" - -nova_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-api" -nova_api_tag: "{{ openstack_release }}" -nova_api_image_full: "{{ nova_api_image }}:{{ nova_api_tag }}" - -nova_compute_ironic_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-compute-ironic" -nova_compute_ironic_tag: "{{ openstack_release }}" -nova_compute_ironic_image_full: "{{ nova_compute_ironic_image }}:{{ nova_compute_ironic_tag }}" - -#################### -# OpenStack -#################### -nova_legacy_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ nova_api_port }}/v2/%(tenant_id)s" -nova_legacy_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ nova_api_port }}/v2/%(tenant_id)s" -nova_legacy_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ nova_api_port }}/v2/%(tenant_id)s" - -nova_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ nova_api_port }}/v2.1/%(tenant_id)s" -nova_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ nova_api_port }}/v2.1/%(tenant_id)s" -nova_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ nova_api_port }}/v2.1/%(tenant_id)s" - -nova_logging_debug: "{{ openstack_logging_debug }}" - -openstack_nova_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}'}" - -nova_ssh_port: "8022" diff --git a/ansible/roles/nova/meta/main.yml b/ansible/roles/nova/meta/main.yml deleted file mode 100644 index 6b4fff8fe..000000000 --- a/ansible/roles/nova/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - { role: common } diff --git a/ansible/roles/nova/tasks/bootstrap.yml b/ansible/roles/nova/tasks/bootstrap.yml deleted file mode 100644 index dd2222591..000000000 --- a/ansible/roles/nova/tasks/bootstrap.yml +++ /dev/null @@ -1,79 +0,0 @@ ---- -- name: Creating Nova database - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_db - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ nova_database_name }}'" - register: database - changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and - (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['nova-api'][0] }}" - -- name: Reading json from variable - set_fact: - database_created: "{{ (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - -- name: Creating Nova-api database - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_db - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ nova_api_database_name }}'" - register: database_api - changed_when: "{{ database_api.stdout.find('localhost | SUCCESS => ') != -1 and - (database_api.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database_api.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['nova-api'][0] }}" - -- name: Reading json from variable - set_fact: - database_api_created: "{{ (database_api.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - -- name: Creating Nova database user and setting permissions - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_user - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ nova_database_name }}' - password='{{ nova_database_password }}' - host='%' - priv='{{ nova_database_name }}.*:ALL' - append_privs='yes'" - register: database_user_create - changed_when: "{{ database_user_create.stdout.find('localhost | SUCCESS => ') != -1 and - (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database_user_create.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['nova-api'][0] }}" - -- name: Creating Nova-api database user and setting permissions - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m mysql_user - -a "login_host='{{ database_address }}' - login_port='{{ database_port }}' - login_user='{{ database_user }}' - login_password='{{ database_password }}' - name='{{ nova_api_database_name }}' - password='{{ nova_api_database_password }}' - host='%' - priv='{{ nova_api_database_name }}.*:ALL' - append_privs='yes'" - register: database_api_user_create - changed_when: "{{ database_api_user_create.stdout.find('localhost | SUCCESS => ') != -1 and - (database_api_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database_api_user_create.stdout.split()[2] != 'SUCCESS' - run_once: True - delegate_to: "{{ groups['nova-api'][0] }}" - -- include: bootstrap_service.yml - when: database_created diff --git a/ansible/roles/nova/tasks/bootstrap_service.yml b/ansible/roles/nova/tasks/bootstrap_service.yml deleted file mode 100644 index 33ce56728..000000000 --- a/ansible/roles/nova/tasks/bootstrap_service.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Running Nova bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ nova_api_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_nova" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/nova-api/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - run_once: True - delegate_to: "{{ groups['nova-api'][0] }}" diff --git a/ansible/roles/nova/tasks/ceph.yml b/ansible/roles/nova/tasks/ceph.yml deleted file mode 100644 index 36a2dfc2a..000000000 --- a/ansible/roles/nova/tasks/ceph.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -- name: Ensuring config directory exists - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - with_items: - - "nova-compute" - - "nova-libvirt/secrets" - when: inventory_hostname in groups['compute'] - -- name: Copying over config(s) - template: - src: roles/ceph/templates/ceph.conf.j2 - dest: "{{ node_config_directory }}/{{ item }}/ceph.conf" - with_items: - - "nova-compute" - - "nova-libvirt" - when: inventory_hostname in groups['compute'] - -- include: ../../ceph_pools.yml - vars: - pool_name: "{{ nova_pool_name }}" - pool_type: "{{ nova_pool_type }}" - cache_mode: "{{ nova_cache_mode }}" - -# TODO(SamYaple): Improve changed_when tests -- name: Pulling cephx keyring for nova - command: docker exec ceph_mon ceph auth get-or-create client.nova mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool={{ ceph_cinder_pool_name }}, allow rwx pool={{ ceph_cinder_pool_name }}-cache, allow rwx pool={{ ceph_nova_pool_name }}, allow rwx pool={{ ceph_nova_pool_name }}-cache, allow rwx pool={{ ceph_glance_pool_name }}, allow rwx pool={{ ceph_glance_pool_name }}-cache' - register: cephx_key - delegate_to: "{{ groups['ceph-mon'][0] }}" - changed_when: False - run_once: True - -# TODO(SamYaple): Improve failed_when and changed_when tests -- name: Pulling cephx keyring for libvirt - command: docker exec ceph_mon ceph auth get-key client.nova - register: cephx_raw_key - delegate_to: "{{ groups['ceph-mon'][0] }}" - changed_when: False - run_once: True - -- name: Pushing cephx keyring for nova - copy: - content: "{{ cephx_key.stdout }}\n\r" - dest: "{{ node_config_directory }}/nova-compute/ceph.client.nova.keyring" - mode: "0600" - when: inventory_hostname in groups['compute'] - -- name: Pushing secrets xml for libvirt - template: - src: "secret.xml.j2" - dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ rbd_secret_uuid }}.xml" - mode: "0600" - when: inventory_hostname in groups['compute'] - -- name: Pushing secrets key for libvirt - copy: - content: "{{ cephx_raw_key.stdout }}" - dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ rbd_secret_uuid }}.base64" - mode: "0600" - when: inventory_hostname in groups['compute'] diff --git a/ansible/roles/nova/tasks/config-nova-fake.yml b/ansible/roles/nova/tasks/config-nova-fake.yml deleted file mode 100644 index 2bd74e115..000000000 --- a/ansible/roles/nova/tasks/config-nova-fake.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/nova-compute-fake-{{ item }}" - state: "directory" - recurse: yes - with_sequence: start=1 end={{ num_nova_fake_per_node }} - -- name: Copying over config.json files for services - template: - src: "nova-compute.json.j2" - dest: "{{ node_config_directory }}/nova-compute-fake-{{ item }}/config.json" - with_sequence: start=1 end={{ num_nova_fake_per_node }} - -- name: Copying over nova.conf - merge_configs: - vars: - service_name: "{{ item }}" - sources: - - "{{ role_path }}/templates/nova.conf.j2" - - "{{ node_config_directory }}/config/global.conf" - - "{{ node_config_directory }}/config/database.conf" - - "{{ node_config_directory }}/config/messaging.conf" - - "{{ node_config_directory }}/config/nova.conf" - - "{{ node_config_directory }}/config/nova/{{ item }}.conf" - - "{{ node_config_directory }}/config/nova/{{ inventory_hostname }}/nova.conf" - dest: "{{ node_config_directory }}/nova-compute-fake-{{ item }}/nova.conf" - with_sequence: start=1 end={{ num_nova_fake_per_node }} diff --git a/ansible/roles/nova/tasks/config.yml b/ansible/roles/nova/tasks/config.yml deleted file mode 100644 index e7c7a06e3..000000000 --- a/ansible/roles/nova/tasks/config.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -- name: Setting sysctl values - sysctl: name={{ item.name }} value={{ item.value }} sysctl_set=yes - with_items: - - { name: "net.bridge.bridge-nf-call-iptables", value: 1} - - { name: "net.bridge.bridge-nf-call-ip6tables", value: 1} - - { name: "net.ipv4.conf.all.rp_filter", value: 0} - - { name: "net.ipv4.conf.default.rp_filter", value: 0} - when: - - set_sysctl | bool - - inventory_hostname in groups['compute'] - -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - recurse: yes - with_items: - - "nova-api" - - "nova-compute" - - "nova-compute-ironic" - - "nova-conductor" - - "nova-consoleauth" - - "nova-libvirt" - - "nova-novncproxy" - - "nova-scheduler" - - "nova-spicehtml5proxy" - - "nova-ssh" - -- name: Copying over config.json files for services - template: - src: "{{ item }}.json.j2" - dest: "{{ node_config_directory }}/{{ item }}/config.json" - with_items: - - "nova-api" - - "nova-compute" - - "nova-compute-ironic" - - "nova-conductor" - - "nova-consoleauth" - - "nova-libvirt" - - "nova-novncproxy" - - "nova-scheduler" - - "nova-spicehtml5proxy" - - "nova-ssh" - -- name: Copying over nova.conf - merge_configs: - vars: - service_name: "{{ item }}" - sources: - - "{{ role_path }}/templates/nova.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/database.conf" - - "{{ node_custom_config }}/messaging.conf" - - "{{ node_custom_config }}/nova.conf" - - "{{ node_custom_config }}/nova/{{ item }}.conf" - - "{{ node_custom_config }}/nova/{{ inventory_hostname }}/nova.conf" - dest: "{{ node_config_directory }}/{{ item }}/nova.conf" - with_items: - - "nova-api" - - "nova-compute" - - "nova-compute-ironic" - - "nova-conductor" - - "nova-consoleauth" - - "nova-novncproxy" - - "nova-scheduler" - - "nova-spicehtml5proxy" - -- name: Copying over libvirt configuration - template: - src: "{{ item.src }}" - dest: "{{ node_config_directory }}/nova-libvirt/{{ item.dest }}" - with_items: - - { src: "qemu.conf.j2", dest: "qemu.conf" } - - { src: "libvirtd.conf.j2", dest: "libvirtd.conf" } - -- name: Copying files for nova-ssh - template: - src: "{{ item.src }}" - dest: "{{ node_config_directory }}/nova-ssh/{{ item.dest }}" - with_items: - - { src: "sshd_config.j2", dest: "sshd_config" } - - { src: "id_rsa", dest: "id_rsa" } - - { src: "id_rsa.pub", dest: "id_rsa.pub" } - - { src: "ssh_config.j2", dest: "ssh_config" } - -- name: Check if policies shall be overwritten - local_action: stat path="{{ node_custom_config }}/nova/policy.json" - register: nova_policy - -- name: Copying over existing policy.json - template: - src: "{{ node_custom_config }}/nova/policy.json" - dest: "{{ node_config_directory }}/{{ item }}/policy.json" - with_items: - - "nova-api" - - "nova-compute" - - "nova-compute-ironic" - - "nova-conductor" - - "nova-consoleauth" - - "nova-novncproxy" - - "nova-scheduler" - - "nova-spicehtml5proxy" - when: - nova_policy.stat.exists diff --git a/ansible/roles/nova/tasks/deploy.yml b/ansible/roles/nova/tasks/deploy.yml deleted file mode 100644 index 21efc2b2e..000000000 --- a/ansible/roles/nova/tasks/deploy.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- include: ceph.yml - when: - - enable_ceph | bool and nova_backend == "rbd" - - inventory_hostname in groups['ceph-mon'] or - inventory_hostname in groups['compute'] or - inventory_hostname in groups['nova-api'] or - inventory_hostname in groups['nova-conductor'] or - inventory_hostname in groups['nova-consoleauth'] or - inventory_hostname in groups['nova-novncproxy'] or - inventory_hostname in groups['nova-scheduler'] - -- include: external-ceph.yml - when: - - enable_ceph | bool == False and nova_backend == "rbd" - - inventory_hostname in groups['compute'] - -- include: register.yml - when: inventory_hostname in groups['nova-api'] - -- include: config.yml - when: inventory_hostname in groups['compute'] or - inventory_hostname in groups['nova-api'] or - inventory_hostname in groups['nova-conductor'] or - inventory_hostname in groups['nova-consoleauth'] or - inventory_hostname in groups['nova-novncproxy'] or - inventory_hostname in groups['nova-scheduler'] - -- include: config-nova-fake.yml - when: - - enable_nova_fake | bool - - inventory_hostname in groups['compute'] - -- include: bootstrap.yml - when: inventory_hostname in groups['nova-api'] or - inventory_hostname in groups['compute'] - -- include: start.yml - when: inventory_hostname in groups['compute'] or - inventory_hostname in groups['nova-api'] or - inventory_hostname in groups['nova-conductor'] or - inventory_hostname in groups['nova-consoleauth'] or - inventory_hostname in groups['nova-novncproxy'] or - inventory_hostname in groups['nova-scheduler'] diff --git a/ansible/roles/nova/tasks/external-ceph.yml b/ansible/roles/nova/tasks/external-ceph.yml deleted file mode 100644 index 8743e7702..000000000 --- a/ansible/roles/nova/tasks/external-ceph.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- name: Ensuring config directory exists - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - with_items: - - "nova-compute" - - "nova-libvirt/secrets" - when: inventory_hostname in groups['compute'] - -- name: Find keyring files - local_action: find paths="{{ node_custom_config }}/nova/" patterns="^ceph\.client\..*?\.keyring$" use_regex=True - register: cephx_keyring_files - -- name: Copy over ceph keyring file - copy: - src: "{{ cephx_keyring_files.files[0].path }}" - dest: "{{ node_config_directory }}/{{item}}/" - with_items: - - nova-compute - - nova-libvirt - when: inventory_hostname in groups['compute'] - -- name: Copy over ceph.conf - copy: - src: "{{ node_custom_config }}/nova/ceph.conf" - dest: "{{ node_config_directory }}/{{ item }}/" - with_items: - - nova-compute - - nova-libvirt - when: inventory_hostname in groups['compute'] - -- name: Pushing secrets xml for libvirt - template: - src: "secret.xml.j2" - dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ rbd_secret_uuid }}.xml" - mode: "0600" - when: inventory_hostname in groups['compute'] - -- name: Extract key from file - local_action: shell cat {{ cephx_keyring_files.files[0].path }} | grep -E 'key\s*=' | awk '{ print $3 }' - register: cephx_raw_key - -- name: Pushing secrets key for libvirt - copy: - content: "{{ cephx_raw_key.stdout }}" - dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ rbd_secret_uuid }}.base64" - mode: "0600" - when: inventory_hostname in groups['compute'] diff --git a/ansible/roles/nova/tasks/main.yml b/ansible/roles/nova/tasks/main.yml deleted file mode 100644 index b017e8b4a..000000000 --- a/ansible/roles/nova/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: "{{ action }}.yml" diff --git a/ansible/roles/nova/tasks/precheck.yml b/ansible/roles/nova/tasks/precheck.yml deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/nova/tasks/precheck.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/nova/tasks/pull.yml b/ansible/roles/nova/tasks/pull.yml deleted file mode 100644 index 6d067ab7e..000000000 --- a/ansible/roles/nova/tasks/pull.yml +++ /dev/null @@ -1,78 +0,0 @@ ---- -- name: Pulling nova-api image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_api_image_full }}" - when: inventory_hostname in groups['nova-api'] - -- name: Pulling nova-compute image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_compute_image_full }}" - when: - - inventory_hostname in groups['compute'] - - not enable_nova_fake | bool - -- name: Pulling nova-compute-ironic image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_compute_ironic_image_full }}" - when: - - inventory_hostname in groups['nova-compute-ironic'] - - enable_ironic | bool - -- name: Pulling nova-conductor image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_conductor_image_full }}" - when: inventory_hostname in groups['nova-conductor'] - -- name: Pulling nova-consoleauth image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_consoleauth_image_full }}" - when: inventory_hostname in groups['nova-consoleauth'] - -- name: Pulling nova-libvirt image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_libvirt_image_full }}" - when: inventory_hostname in groups['compute'] - -- name: Pulling nova-ssh image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_ssh_image_full }}" - when: inventory_hostname in groups['compute'] - -- name: Pulling nova-novncproxy image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_novncproxy_image_full }}" - when: - - inventory_hostname in groups['nova-novncproxy'] - - nova_console == 'novnc' - -- name: Pulling nova-scheduler image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_scheduler_image_full }}" - when: inventory_hostname in groups['nova-scheduler'] - -- name: Pulling nova-spicehtml5proxy image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ nova_spicehtml5proxy_image_full }}" - when: - - inventory_hostname in groups['nova-spicehtml5proxy'] - - nova_console == 'spice' diff --git a/ansible/roles/nova/tasks/reconfigure.yml b/ansible/roles/nova/tasks/reconfigure.yml deleted file mode 100644 index b551dd92a..000000000 --- a/ansible/roles/nova/tasks/reconfigure.yml +++ /dev/null @@ -1,318 +0,0 @@ ---- -- name: Ensuring the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers are 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: nova_libvirt, group: compute } - - { name: nova_ssh, group: compute } - - { name: nova_conductor, group: nova-conductor } - - { name: nova_api, group: nova-api } - - { name: nova_consoleauth, group: nova-consoleauth } - - { name: nova_scheduler, group: nova-scheduler } - -- name: Ensuring the nova_compute container is up - kolla_docker: - name: "nova_compute" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: - - not enable_nova_fake | bool - - inventory_hostname in groups['compute'] - -- name: Ensuring the nova_compute_ironic container is up - kolla_docker: - name: "nova_compute_ironic" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: - - enable_ironic | bool - - inventory_hostname in groups['nova-compute-ironic'] - -- name: Ensuring the nova_novncproxy container is up - kolla_docker: - name: "nova_novncproxy" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: - - nova_console == 'novnc' - - inventory_hostname in groups['nova-novncproxy'] - -- name: Ensuring the nova_spicehtml5proxy container is up - kolla_docker: - name: "nova_spicehtml5proxy" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: - - nova_console == 'spice' - - inventory_hostname in groups['nova-spicehtml5proxy'] - -- include: config.yml - -- name: Check the configs for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers - 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: nova_libvirt, group: compute } - - { name: nova_ssh, group: compute } - - { name: nova_conductor, group: nova-conductor } - - { name: nova_api, group: nova-api } - - { name: nova_consoleauth, group: nova-consoleauth } - - { name: nova_scheduler, group: nova-scheduler } - -- name: Check the configs in the nova_compute container - command: docker exec nova_compute /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: nova_compute_check_result - when: - - not enable_nova_fake | bool - - inventory_hostname in groups['compute'] - -- name: Check the configs in the nova_compute_ironic container - command: docker exec nova_compute_ironic /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: nova_compute_ironic_check_result - when: - - enable_ironic | bool - - inventory_hostname in groups['nova-compute-ironic'] - -- name: Check the configs in the nova_novncproxy container - command: docker exec nova_novncproxy /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: nova_novncproxy_check_result - when: - - nova_console == 'novnc' - - inventory_hostname in groups['nova-novncproxy'] - -- name: Check the configs in the nova_spicehtml5proxy container - command: docker exec nova_spicehtml5proxy /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: nova_spicehtml5proxy_check_result - when: - - nova_console == 'spice' - - inventory_hostname in groups['nova-spicehtml5proxy'] - -# 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 for nova libvirt, ssh, conductor, api, consoleauth and scheduler containers - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: container_envs - when: inventory_hostname in groups[item.group] - with_items: - - { name: nova_libvirt, group: compute } - - { name: nova_ssh, group: compute } - - { name: nova_conductor, group: nova-conductor } - - { name: nova_api, group: nova-api } - - { name: nova_consoleauth, group: nova-consoleauth } - - { name: nova_scheduler, group: nova-scheduler } - -- name: Container config strategy for nova_compute - kolla_docker: - name: nova_compute - action: "get_container_env" - register: nova_compute_container_env - when: - - not enable_nova_fake | bool - - inventory_hostname in groups['compute'] - -- name: Container config strategy for nova_compute_ironic - kolla_docker: - name: nova_compute_ironic - action: "get_container_env" - register: nova_compute_ironic_container_env - when: - - enable_ironic | bool - - inventory_hostname in groups['nova-compute-ironic'] - -- name: Container config strategy for nova_novncproxy - kolla_docker: - name: nova_novncproxy - action: "get_container_env" - register: nova_novncproxy_container_env - when: - - nova_console == 'novnc' - - inventory_hostname in groups['nova-novncproxy'] - -- name: Container config strategy for nova_spicehtml5proxy - kolla_docker: - name: nova_spicehtml5proxy - action: "get_container_env" - register: nova_spicehtml5proxy_container_env - when: - - nova_console == 'spice' - - inventory_hostname in groups['nova-spicehtml5proxy'] - -- name: Remove the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_containers - until: remote_container|success - retries: "{{ item[0]['retries']|default(0) }}" - 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: - # NOTE(Jeffrey4l): retry 1 to remove nova_libvirt container because when - # guests running, nova_libvirt will raise error even though it is removed. - - [{ name: nova_libvirt, group: compute, retries: 1 }, - { name: nova_ssh, group: compute }, - { name: nova_conductor, group: nova-conductor }, - { name: nova_api, group: nova-api }, - { name: nova_consoleauth, group: nova-consoleauth }, - { name: nova_scheduler, group: nova-scheduler }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" - -- name: Remove nova_compute container - kolla_docker: - name: nova_compute - action: "remove_container" - register: remove_nova_compute_container - when: - - not enable_nova_fake | bool - - inventory_hostname in groups['compute'] - - config_strategy == 'COPY_ONCE' or nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - nova_compute_check_result['rc'] == 1 - -- name: Remove nova_compute_ironic container - kolla_docker: - name: nova_compute_ironic - action: "remove_container" - register: remove_nova_compute_ironic_container - when: - - enable_ironic | bool - - inventory_hostname in groups['nova-compute-ironic'] - - config_strategy == 'COPY_ONCE' or nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - nova_compute_ironic_check_result['rc'] == 1 - -- name: Remove nova_novncproxy container - kolla_docker: - name: nova_novncproxy - action: "remove_container" - register: remove_nova_novncproxy_container - when: - - nova_console == 'novnc' - - inventory_hostname in groups['nova-novncproxy'] - - config_strategy == 'COPY_ONCE' or nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - nova_novncproxy_check_result['rc'] == 1 - -- name: Remove nova_spicehtml5proxy container - kolla_docker: - name: nova_spicehtml5proxy - action: "remove_container" - register: remove_nova_spicehtml5proxy_container - when: - - nova_console == 'spice' - - inventory_hostname in groups['nova-spicehtml5proxy'] - - config_strategy == 'COPY_ONCE' or nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - nova_spicehtml5proxy_check_result['rc'] == 1 - -- include: start.yml - when: remove_containers.changed - -- include: start.yml - when: - - not enable_nova_fake | bool - - remove_nova_compute_container.changed - -- include: start.yml - when: - - enable_ironic | bool - - remove_nova_compute_ironic_container.changed - -- include: start.yml - when: - - enable_ironic | bool - - remove_nova_compute_ironic_container.changed - -- include: start.yml - when: - - nova_console == 'novnc' - - remove_nova_novncproxy_container.changed - -- include: start.yml - when: - - nova_console == 'spice' - - remove_nova_spicehtml5proxy_container.changed - -- name: Restart the nova libvirt, ssh, conductor, api, consoleauth and scheduler containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "restart_container" - when: - - config_strategy == 'COPY_ALWAYS' - - inventory_hostname in groups[item[0]['group']] - - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: nova_libvirt, group: compute }, - { name: nova_ssh, group: compute }, - { name: nova_conductor, group: nova-conductor }, - { name: nova_api, group: nova-api }, - { name: nova_consoleauth, group: nova-consoleauth }, - { name: nova_scheduler, group: nova-scheduler }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" - -- name: Restart the nova_compute container - kolla_docker: - name: "nova_compute" - action: "restart_container" - when: - - not enable_nova_fake | bool - - config_strategy == 'COPY_ALWAYS' - - inventory_hostname in groups['compute'] - - nova_compute_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - nova_compute_check_result['rc'] == 1 - -- name: Restart the nova_compute_ironic container - kolla_docker: - name: "nova_compute_ironic" - action: "restart_container" - when: - - enable_ironic | bool - - config_strategy == 'COPY_ALWAYS' - - inventory_hostname in groups['nova-compute-ironic'] - - nova_compute_ironic_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - nova_compute_ironic_check_result['rc'] == 1 - -- name: Restart the nova_novncproxy container - kolla_docker: - name: "nova_novncproxy" - action: "restart_container" - when: - - nova_console == 'novnc' - - config_strategy == 'COPY_ALWAYS' - - inventory_hostname in groups['nova-novncproxy'] - - nova_novncproxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - nova_novncproxy_check_result['rc'] == 1 - -- name: Restart the nova_spicehtml5proxy container - kolla_docker: - name: "nova_spicehtml5proxy" - action: "restart_container" - when: - - nova_console == 'spice' - - config_strategy == 'COPY_ALWAYS' - - inventory_hostname in groups['nova-spicehtml5proxy'] - - nova_spicehtml5proxy_container_env['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - nova_spicehtml5proxy_check_result['rc'] == 1 diff --git a/ansible/roles/nova/tasks/register.yml b/ansible/roles/nova/tasks/register.yml deleted file mode 100644 index a1b87e5c1..000000000 --- a/ansible/roles/nova/tasks/register.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Creating the Nova service and endpoint - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_service - -a "service_name={{ item.name }} - service_type={{ item.service_type }} - description='{{ item.description }}' - endpoint_region={{ openstack_region_name }} - url='{{ item.url }}' - interface='{{ item.interface }}' - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_nova_auth }}' }}" - -e "{'openstack_nova_auth':{{ openstack_nova_auth }}}" - register: nova_endpoint - changed_when: "{{ nova_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (nova_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: nova_endpoint.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True - with_items: - - {'name': 'nova_legacy', 'service_type': 'compute_legacy', 'interface': 'admin', 'url': '{{ nova_legacy_admin_endpoint }}', 'description': 'OpenStack Compute Service (Legacy 2.0)'} - - {'name': 'nova_legacy', 'service_type': 'compute_legacy', 'interface': 'internal', 'url': '{{ nova_legacy_internal_endpoint }}', 'description': 'OpenStack Compute Service (Legacy 2.0)'} - - {'name': 'nova_legacy', 'service_type': 'compute_legacy', 'interface': 'public', 'url': '{{ nova_legacy_public_endpoint }}', 'description': 'OpenStack Compute Service (Legacy 2.0)'} - - {'name': 'nova', 'service_type': 'compute', 'interface': 'admin', 'url': '{{ nova_admin_endpoint }}', 'description': 'OpenStack Compute Service'} - - {'name': 'nova', 'service_type': 'compute', 'interface': 'internal', 'url': '{{ nova_internal_endpoint }}', 'description': 'OpenStack Compute Service'} - - {'name': 'nova', 'service_type': 'compute', 'interface': 'public', 'url': '{{ nova_public_endpoint }}', 'description': 'OpenStack Compute Service'} - -- name: Creating the Nova project, user, and role - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_user - -a "project=service - user=nova - password={{ nova_keystone_password }} - role=admin - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_nova_auth }}' }}" - -e "{'openstack_nova_auth':{{ openstack_nova_auth }}}" - register: nova_user - changed_when: "{{ nova_user.stdout.find('localhost | SUCCESS => ') != -1 and (nova_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: nova_user.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True diff --git a/ansible/roles/nova/tasks/reload.yml b/ansible/roles/nova/tasks/reload.yml deleted file mode 100644 index 6b37a9091..000000000 --- a/ansible/roles/nova/tasks/reload.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# This play calls sighup on every service to refresh upgrade levels -- name: Sighup nova-api - command: docker exec -t nova_api kill -1 1 - when: inventory_hostname in groups['nova-api'] - -- name: Sighup nova-conductor - command: docker exec -t nova_conductor kill -1 1 - when: inventory_hostname in groups['nova-conductor'] - -- name: Sighup nova-consoleauth - command: docker exec -t nova_consoleauth kill -1 1 - when: inventory_hostname in groups['nova-consoleauth'] - -- name: Sighup nova-scheduler - command: docker exec -t nova_scheduler kill -1 1 - when: inventory_hostname in groups['nova-scheduler'] - -- name: Sighup nova-compute - command: docker exec -t nova_compute kill -1 1 - when: inventory_hostname in groups['compute'] diff --git a/ansible/roles/nova/tasks/start.yml b/ansible/roles/nova/tasks/start.yml deleted file mode 100644 index 659729b19..000000000 --- a/ansible/roles/nova/tasks/start.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: start_controllers.yml - -- include: start_conductors.yml - -- include: start_compute.yml diff --git a/ansible/roles/nova/tasks/start_compute.yml b/ansible/roles/nova/tasks/start_compute.yml deleted file mode 100644 index d40e7a007..000000000 --- a/ansible/roles/nova/tasks/start_compute.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -- name: Starting nova-libvirt container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_libvirt_image_full }}" - name: "nova_libvirt" - pid_mode: "host" - privileged: True - volumes: - - "{{ node_config_directory }}/nova-libvirt/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/lib/modules:/lib/modules:ro" - - "/run/:/run/:shared" - - "/dev:/dev" - - "/sys/fs/cgroup:/sys/fs/cgroup" - - "kolla_logs:/var/log/kolla/" - - "libvirtd:/var/lib/libvirt" - - "nova_compute:/var/lib/nova/" - - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - - "nova_libvirt_qemu:/etc/libvirt/qemu" - register: start_nova_libvirt_container - # NOTE(Jeffrey4l): retry 5 to remove nova_libvirt container because when - # guests running, nova_libvirt will raise error even though it is removed. - retries: 5 - until: start_nova_libvirt_container|success - when: inventory_hostname in groups['compute'] - -- name: Prepare volumes list - set_fact: - mounts: - - "{{ node_config_directory }}/nova-compute/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/lib/modules:/lib/modules:ro" - - "/run:/run:shared" - - "/dev:/dev" - - "kolla_logs:/var/log/kolla/" - - "{% if enable_iscsid | bool %}iscsi_info:/etc/iscsi{% endif %}" - - "libvirtd:/var/lib/libvirt" - - "nova_compute:/var/lib/nova/" - - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - -- name: Starting nova-compute container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_compute_image_full }}" - name: "nova_compute" - privileged: True - volumes: '{{ mounts | reject("equalto", "") | list}}' - when: - - inventory_hostname in groups['compute'] - - not enable_nova_fake | bool - - not enable_ironic | bool - -- name: Starting nova-compute-ironic container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_compute_ironic_image_full }}" - name: "nova_compute_ironic" - volumes: - - "{{ node_config_directory }}/nova-compute-ironic/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: - - inventory_hostname in groups['nova-compute-ironic'] - - enable_ironic | bool - -- name: Starting nova-compute-fake containers - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_compute_image_full }}" - name: "nova_compute_fake_{{ item }}" - privileged: True - volumes: - - "{{ node_config_directory }}/nova-compute-fake-{{ item }}/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/lib/modules:/lib/modules:ro" - - "/run:/run:shared" - - "kolla_logs:/var/log/kolla/" - with_sequence: start=1 end={{ num_nova_fake_per_node }} - when: - - inventory_hostname in groups['compute'] - - enable_nova_fake | bool - -- name: Starting nova-ssh container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_ssh_image_full }}" - name: "nova_ssh" - volumes: - - "{{ node_config_directory }}/nova-ssh/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla" - - "nova_compute:/var/lib/nova" - - "/var/lib/nova/mnt:/var/lib/nova/mnt:shared" - - "heka_socket:/var/lib/kolla/heka/" - # TODO(jeffrey4l): how to handle the nova-compute-fake and - # nova-compute-ironic - when: inventory_hostname in groups['compute'] diff --git a/ansible/roles/nova/tasks/start_conductors.yml b/ansible/roles/nova/tasks/start_conductors.yml deleted file mode 100644 index aa5fe4dd0..000000000 --- a/ansible/roles/nova/tasks/start_conductors.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Starting nova-conductor container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - name: "nova_conductor" - image: "{{ nova_conductor_image_full }}" - volumes: - - "{{ node_config_directory }}/nova-conductor/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['nova-conductor'] diff --git a/ansible/roles/nova/tasks/start_controllers.yml b/ansible/roles/nova/tasks/start_controllers.yml deleted file mode 100644 index 184927281..000000000 --- a/ansible/roles/nova/tasks/start_controllers.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -- name: Starting nova-api container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_api_image_full }}" - name: "nova_api" - privileged: True - volumes: - - "{{ node_config_directory }}/nova-api/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/lib/modules:/lib/modules:ro" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['nova-api'] - -- name: Starting nova-consoleauth container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_consoleauth_image_full }}" - name: "nova_consoleauth" - volumes: - - "{{ node_config_directory }}/nova-consoleauth/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['nova-consoleauth'] - -- name: Starting nova-novncproxy container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_novncproxy_image_full }}" - name: "nova_novncproxy" - volumes: - - "{{ node_config_directory }}/nova-novncproxy/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: - - inventory_hostname in groups['nova-novncproxy'] - - nova_console == 'novnc' - -- name: Starting nova-scheduler container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_scheduler_image_full }}" - name: "nova_scheduler" - volumes: - - "{{ node_config_directory }}/nova-scheduler/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: inventory_hostname in groups['nova-scheduler'] - -- name: Starting nova-spicehtml5proxy container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ nova_spicehtml5proxy_image_full }}" - name: "nova_spicehtml5proxy" - volumes: - - "{{ node_config_directory }}/nova-spicehtml5proxy/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" - when: - - inventory_hostname in groups['nova-spicehtml5proxy'] - - nova_console == 'spice' diff --git a/ansible/roles/nova/tasks/upgrade.yml b/ansible/roles/nova/tasks/upgrade.yml deleted file mode 100644 index bc24e375e..000000000 --- a/ansible/roles/nova/tasks/upgrade.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Create new set of configs on nodes -- include: config.yml - -# TODO(inc0): since nova is creating new database in L->M, we need to call it. -# It should be removed later -- include: bootstrap.yml - -- include: bootstrap_service.yml - -- include: register.yml - -- name: Checking if conductor container needs upgrading - kolla_docker: - action: "compare_image" - common_options: "{{ docker_common_options }}" - name: "nova_conductor" - image: "{{ nova_conductor_image_full }}" - when: inventory_hostname in groups['nova-conductor'] - register: conductor_differs - -# Short downtime here, but from user perspective his call will just timeout or execute later -- name: Stopping all nova_conductor containers - kolla_docker: - action: "stop_container" - common_options: "{{ docker_common_options }}" - name: "nova_conductor" - when: - - inventory_hostname in groups['nova-conductor'] - - conductor_differs['result'] - -- include: start_conductors.yml - -- include: start_controllers.yml - -- include: start_compute.yml - -- include: reload.yml diff --git a/ansible/roles/nova/templates/id_rsa b/ansible/roles/nova/templates/id_rsa deleted file mode 100644 index 173a4b3e1..000000000 --- a/ansible/roles/nova/templates/id_rsa +++ /dev/null @@ -1 +0,0 @@ -{{ nova_ssh_key.private_key }} diff --git a/ansible/roles/nova/templates/id_rsa.pub b/ansible/roles/nova/templates/id_rsa.pub deleted file mode 100644 index 16bd674f2..000000000 --- a/ansible/roles/nova/templates/id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -{{ nova_ssh_key.public_key }} diff --git a/ansible/roles/nova/templates/libvirtd.conf.j2 b/ansible/roles/nova/templates/libvirtd.conf.j2 deleted file mode 100644 index 70e958929..000000000 --- a/ansible/roles/nova/templates/libvirtd.conf.j2 +++ /dev/null @@ -1,6 +0,0 @@ -listen_tcp = 1 -auth_tcp = "none" -ca_file = "" -log_level = 3 -log_outputs = "3:file:/var/log/kolla/libvirt/libvirtd.log" -listen_addr = "{{ api_interface_address }}" diff --git a/ansible/roles/nova/templates/nova-api.json.j2 b/ansible/roles/nova/templates/nova-api.json.j2 deleted file mode 100644 index 28642bd59..000000000 --- a/ansible/roles/nova/templates/nova-api.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-api", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-compute-ironic.json.j2 b/ansible/roles/nova/templates/nova-compute-ironic.json.j2 deleted file mode 100644 index 94e2b5fae..000000000 --- a/ansible/roles/nova/templates/nova-compute-ironic.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-compute", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-compute.json.j2 b/ansible/roles/nova/templates/nova-compute.json.j2 deleted file mode 100644 index 018bf7a80..000000000 --- a/ansible/roles/nova/templates/nova-compute.json.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{ - "command": "nova-compute", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - }{% if nova_backend == "rbd" %}, - { - "source": "{{ container_config_directory }}/ceph.*", - "dest": "/etc/ceph/", - "owner": "nova", - "perm": "0700" - }{% endif %} - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - }, - { - "path": "/var/lib/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-conductor.json.j2 b/ansible/roles/nova/templates/nova-conductor.json.j2 deleted file mode 100644 index 6a7328713..000000000 --- a/ansible/roles/nova/templates/nova-conductor.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-conductor", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-consoleauth.json.j2 b/ansible/roles/nova/templates/nova-consoleauth.json.j2 deleted file mode 100644 index 9cc3240d7..000000000 --- a/ansible/roles/nova/templates/nova-consoleauth.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-consoleauth", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-libvirt.json.j2 b/ansible/roles/nova/templates/nova-libvirt.json.j2 deleted file mode 100644 index aa19f7a39..000000000 --- a/ansible/roles/nova/templates/nova-libvirt.json.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{ - "command": "/usr/sbin/libvirtd --listen", - "config_files": [ - { - "source": "{{ container_config_directory }}/libvirtd.conf", - "dest": "/etc/libvirt/libvirtd.conf", - "owner": "root", - "perm": "0644" - }, - { - "source": "{{ container_config_directory }}/qemu.conf", - "dest": "/etc/libvirt/qemu.conf", - "owner": "root", - "perm": "0644" - }{% if nova_backend == "rbd" %}, - { - "source": "{{ container_config_directory }}/secrets", - "dest": "/etc/libvirt/secrets", - "owner": "root", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/ceph.conf", - "dest": "/etc/ceph/ceph.conf", - "owner": "root", - "perm": "0600" - }{% endif %} - ] -} diff --git a/ansible/roles/nova/templates/nova-network.json.j2 b/ansible/roles/nova/templates/nova-network.json.j2 deleted file mode 100644 index 53e93e692..000000000 --- a/ansible/roles/nova/templates/nova-network.json.j2 +++ /dev/null @@ -1,11 +0,0 @@ -{ - "command": "nova-network", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ] -} diff --git a/ansible/roles/nova/templates/nova-novncproxy.json.j2 b/ansible/roles/nova/templates/nova-novncproxy.json.j2 deleted file mode 100644 index d34efb3d6..000000000 --- a/ansible/roles/nova/templates/nova-novncproxy.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-novncproxy", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-scheduler.json.j2 b/ansible/roles/nova/templates/nova-scheduler.json.j2 deleted file mode 100644 index 36638987a..000000000 --- a/ansible/roles/nova/templates/nova-scheduler.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-scheduler", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-spicehtml5proxy.json.j2 b/ansible/roles/nova/templates/nova-spicehtml5proxy.json.j2 deleted file mode 100644 index e12354bf4..000000000 --- a/ansible/roles/nova/templates/nova-spicehtml5proxy.json.j2 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "command": "nova-spicehtml5proxy", - "config_files": [ - { - "source": "{{ container_config_directory }}/nova.conf", - "dest": "/etc/nova/nova.conf", - "owner": "nova", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/nova", - "owner": "nova:nova", - "recurse": true - } - ] -} diff --git a/ansible/roles/nova/templates/nova-ssh.json.j2 b/ansible/roles/nova/templates/nova-ssh.json.j2 deleted file mode 100644 index 1fb041ecc..000000000 --- a/ansible/roles/nova/templates/nova-ssh.json.j2 +++ /dev/null @@ -1,29 +0,0 @@ -{ - "command": "/usr/sbin/sshd -D", - "config_files": [ - { - "source": "{{ container_config_directory }}/sshd_config", - "dest": "/etc/ssh/sshd_config", - "owner": "root", - "perm": "0644" - }, - { - "source": "{{ container_config_directory }}/ssh_config", - "dest": "/var/lib/nova/.ssh/config", - "owner": "nova", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/id_rsa", - "dest": "/var/lib/nova/.ssh/id_rsa", - "owner": "nova", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/id_rsa.pub", - "dest": "/var/lib/nova/.ssh/authorized_keys", - "owner": "nova", - "perm": "0600" - } - ] -} diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 deleted file mode 100644 index a686e0dc3..000000000 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ /dev/null @@ -1,209 +0,0 @@ -# nova.conf -[DEFAULT] -debug = {{ nova_logging_debug }} - -log_dir = /var/log/kolla/nova -use_forwarded_for = true - -state_path = /var/lib/nova - -{% if kolla_enable_tls_external | bool %} -secure_proxy_ssl_header = X-Forwarded-Proto -{% endif %} - -osapi_compute_listen = {{ api_interface_address }} -osapi_compute_listen_port = {{ nova_api_port }} -osapi_compute_workers = {{ openstack_service_workers }} -metadata_workers = {{ openstack_service_workers }} - -metadata_listen = {{ api_interface_address }} -metadata_listen_port = {{ nova_metadata_port }} - -use_neutron = True -firewall_driver = nova.virt.firewall.NoopFirewallDriver - -{% if neutron_plugin_agent == "openvswitch" %} -linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver -{% elif neutron_plugin_agent == "linuxbridge" %} -linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver -{% endif %} - -allow_resize_to_same_host = true - -{% if enable_ironic | bool %} -scheduler_host_manager = ironic_host_manager -{% endif %} - -{% if service_name == "nova-compute-ironic" %} -compute_driver = ironic.IronicDriver -vnc_enabled = False -ram_allocation_ratio = 1.0 -reserved_host_memory_mb = 0 -{% elif enable_nova_fake | bool %} -scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter -host = {{ ansible_hostname }}_{{ item }} -compute_driver = fake.FakeDriver -{% else %} -compute_driver = libvirt.LibvirtDriver -{% endif %} - -# Though my_ip is not used directly, lots of other variables use $my_ip -my_ip = {{ api_interface_address }} - -{% if enable_ceilometer | bool %} -instance_usage_audit = True -instance_usage_audit_period = hour -notify_on_state_change = vm_and_task_state -{% if enable_watcher | bool %} -compute_monitors=nova.compute.monitors.cpu.virt_driver -{% endif %} -{% endif %} - -transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{% if orchestration_engine == 'KUBERNETES' %}rabbitmq{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} - -[conductor] -workers = {{ openstack_service_workers }} - -{% if nova_console == 'novnc' %} -[vnc] -novncproxy_host = {{ api_interface_address }} -novncproxy_port = {{ nova_novncproxy_port }} -vncserver_listen = {{ api_interface_address }} -vncserver_proxyclient_address = {{ api_interface_address }} -{% if inventory_hostname in groups['compute'] %} -novncproxy_base_url = {{ public_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}kolla_kubernetes_external_vip{% else %}{{ kolla_external_fqdn }}{% endif %}:{{ nova_novncproxy_port }}/vnc_auto.html -{% endif %} -{% elif nova_console == 'spice' %} -[vnc] -# We have to turn off vnc to use spice -enabled = false -[spice] -enabled = true -server_listen = {{ api_interface_address }} -server_proxyclient_address = {{ api_interface_address }} -{% if inventory_hostname in groups['compute'] %} -html5proxy_base_url = {{ public_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}kolla_kubernetes_external_vip{% else %}{{ kolla_external_fqdn }}{% endif %}:{{ nova_spicehtml5proxy_port }}/spice_auto.html -{% endif %} -html5proxy_host = {{ api_interface_address }} -html5proxy_port = {{ nova_spicehtml5proxy_port }} -{% endif %} - -{% if service_name == "nova-compute-ironic" %} -[ironic] -username = {{ ironic_keystone_user }} -password = {{ ironic_keystone_password }} -auth_url = {{ openstack_auth.auth_url }}/v3 -auth_type = password -project_name = service -user_domain_name = default -project_domain_name = default -api_endpoint = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ ironic_api_port }}/v1 -{% endif %} - -[oslo_concurrency] -lock_path = /var/lib/nova/tmp - -[glance] -api_servers = {% for host in groups['glance-api'] %}{{ internal_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}glance-api{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ glance_api_port }}{% if not loop.last %},{% endif %}{% endfor %} - -num_retries = {{ groups['glance-api'] | length }} - -[cinder] -catalog_info = volumev2:cinderv2:internalURL - -[neutron] -{% if orchestration_engine == 'KUBERNETES' %} -url = {{ internal_protocol }}://neutron-server:{{ neutron_server_port }} -{% else %} -url = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ neutron_server_port }} -{% endif %} -metadata_proxy_shared_secret = {{ metadata_secret }} -service_metadata_proxy = true - -auth_url = {{ keystone_admin_url }} -auth_type = password -project_domain_name = default -user_domain_id = default -project_name = service -username = {{ neutron_keystone_user }} -password = {{ neutron_keystone_password }} - -[database] -connection = mysql+pymysql://{{ nova_database_user }}:{{ nova_database_password }}@{{ nova_database_address }}/{{ nova_database_name }} -max_pool_size = 50 -max_overflow = 1000 -max_retries = -1 - -[api_database] -connection = mysql+pymysql://{{ nova_api_database_user }}:{{ nova_api_database_password }}@{{ nova_api_database_address }}/{{ nova_api_database_name }} -max_retries = -1 - -[cache] -backend = oslo_cache.memcache_pool -enabled = True -memcache_servers = {% for host in groups['memcached'] %}{% if orchestration_engine == 'KUBERNETES' %}memcached{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} - - -[keystone_authtoken] -{% if orchestration_engine == 'KUBERNETES' %} -auth_uri = {{ keystone_internal_url }} -auth_url = {{ keystone_admin_url }} -{% else %} -auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} -auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} -{% endif %} -auth_type = password -project_domain_id = default -user_domain_id = default -project_name = service -username = {{ nova_keystone_user }} -password = {{ nova_keystone_password }} - -memcache_security_strategy = ENCRYPT -memcache_secret_key = {{ memcache_secret_key }} -memcached_servers = {% for host in groups['memcached'] %}{% if orchestration_engine == 'KUBERNETES' %}memcached{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif%}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} - - -[libvirt] -connection_uri = "qemu+tcp://{{ api_interface_address }}/system" -{% if enable_ceph | bool and nova_backend == "rbd" %} -images_type = rbd -images_rbd_pool = {{ ceph_nova_pool_name }} -images_rbd_ceph_conf = /etc/ceph/ceph.conf -rbd_user = nova -disk_cachemodes="network=writeback" -{% if nova_hw_disk_discard != '' %} -hw_disk_discard = {{ nova_hw_disk_discard }} -{% endif %} -{% endif %} -{% if nova_backend == "rbd" %} -rbd_secret_uuid = {{ rbd_secret_uuid }} -{% endif %} - - -[upgrade_levels] -compute = auto - -[oslo_messaging_notifications] -{% if enable_ceilometer | bool or enable_designate | bool %} -driver = messagingv2 -{% set topics=["notifications" if enable_ceilometer|bool else "", "notifications_designate" if enable_designate|bool else ""] %} -topcis = {{ topics|reject("equalto", "")|list|join(",") }} -{% else %} -driver = noop -{% endif %} - -[privsep_entrypoint] -helper_command=sudo nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-file /etc/nova/nova.conf - -[glance] -debug = {{ nova_logging_debug }} - -[guestfs] -debug = {{ nova_logging_debug }} - -[wsgi] -api_paste_config = /etc/nova/api-paste.ini - -[scheduler] -max_attempts = 10 diff --git a/ansible/roles/nova/templates/qemu.conf.j2 b/ansible/roles/nova/templates/qemu.conf.j2 deleted file mode 100644 index 16bd9d4d9..000000000 --- a/ansible/roles/nova/templates/qemu.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -stdio_handler = "file" diff --git a/ansible/roles/nova/templates/secret.xml.j2 b/ansible/roles/nova/templates/secret.xml.j2 deleted file mode 100644 index eab903be4..000000000 --- a/ansible/roles/nova/templates/secret.xml.j2 +++ /dev/null @@ -1,6 +0,0 @@ -<secret ephemeral='no' private='no'> - <uuid>{{ rbd_secret_uuid }}</uuid> - <usage type='ceph'> - <name>client.nova secret</name> - </usage> -</secret> diff --git a/ansible/roles/nova/templates/ssh_config.j2 b/ansible/roles/nova/templates/ssh_config.j2 deleted file mode 100644 index 7c5c962f9..000000000 --- a/ansible/roles/nova/templates/ssh_config.j2 +++ /dev/null @@ -1,4 +0,0 @@ -Host * - StrictHostKeyChecking no - UserKnownHostsFile /dev/null - port {{ nova_ssh_port }} diff --git a/ansible/roles/nova/templates/sshd_config.j2 b/ansible/roles/nova/templates/sshd_config.j2 deleted file mode 100644 index 29bea8dea..000000000 --- a/ansible/roles/nova/templates/sshd_config.j2 +++ /dev/null @@ -1,5 +0,0 @@ -Port {{ nova_ssh_port }} -ListenAddress {{ api_interface_address }} - -SyslogFacility AUTHPRIV -UsePAM yes |
