diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index 39548812cc..e5eed08125 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -54,3 +54,5 @@ galera_address: "{{ internal_lb_vip_address }}" ansible_hostname: "{{ container_name }}" is_metal: "{{ properties.is_metal|default(false) }}" + vars_files: + - vars/repo_packages/openstack_services.yml diff --git a/playbooks/roles/os_heat/defaults/main.yml b/playbooks/roles/os_heat/defaults/main.yml index 9b06e3ec5c..fb69aee7c9 100644 --- a/playbooks/roles/os_heat/defaults/main.yml +++ b/playbooks/roles/os_heat/defaults/main.yml @@ -102,6 +102,11 @@ heat_watch_port: 8003 heat_watch_server_uri: "{{ heat_watch_proto }}://{{ external_lb_vip_address }}:{{ heat_watch_port }}" heat_watch_server_url: "{{ heat_watch_server_uri }}" +## Plugin dirs +heat_plugin_dirs: + - /usr/lib/heat + - /usr/local/lib/heat + heat_apt_packages: - rsync - libxslt1.1 diff --git a/playbooks/roles/os_heat/tasks/heat_install_plugins.yml b/playbooks/roles/os_heat/tasks/heat_install_plugins.yml new file mode 100644 index 0000000000..8a9116539c --- /dev/null +++ b/playbooks/roles/os_heat/tasks/heat_install_plugins.yml @@ -0,0 +1,41 @@ +--- +# Copyright 2014, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Clone heat repo + git: + repo: "{{ heat_git_repo }}" + dest: "{{ heat_git_dest }}" + version: "{{ heat_git_install_branch }}" + register: git_clone + until: git_clone|success + retries: 5 + delay: 2 + tags: + - heat-git-clone + +- name: Install git repo plugins + shell: | + python setup.py install + args: + chdir: "{{ heat_git_dest }}/{{ item.path }}/{{ item.package }}" + with_items: heat_repo_plugins + register: pip_install + until: pip_install|success + retries: 5 + delay: 2 + notify: + - Restart heat services + tags: + - heat-plugin-install diff --git a/playbooks/roles/os_heat/tasks/heat_pre_install.yml b/playbooks/roles/os_heat/tasks/heat_pre_install.yml index f6683b5b7f..bc0835c20a 100644 --- a/playbooks/roles/os_heat/tasks/heat_pre_install.yml +++ b/playbooks/roles/os_heat/tasks/heat_pre_install.yml @@ -49,6 +49,16 @@ tags: - heat-dirs +- name: Create heat plugin dirs + file: + path: "{{ item }}" + state: directory + owner: "{{ heat_system_user_name }}" + group: "{{ heat_system_group_name }}" + with_items: heat_plugin_dirs + tags: + - heat-dirs + - name: Test for log directory or link shell: | if [ -h "/var/log/heat" ]; then diff --git a/playbooks/roles/os_heat/tasks/main.yml b/playbooks/roles/os_heat/tasks/main.yml index f447468f1a..fbeeca5abf 100644 --- a/playbooks/roles/os_heat/tasks/main.yml +++ b/playbooks/roles/os_heat/tasks/main.yml @@ -16,6 +16,10 @@ - include: heat_pre_install.yml - include: heat_install.yml +- include: heat_install_plugins.yml + when: > + inventory_hostname in groups['heat_engine'] + - include: heat_domain_setup.yml when: > inventory_hostname == groups['heat_all'][0] diff --git a/playbooks/roles/os_heat/templates/heat.conf.j2 b/playbooks/roles/os_heat/templates/heat.conf.j2 index a685b3a2e7..aded1a728f 100644 --- a/playbooks/roles/os_heat/templates/heat.conf.j2 +++ b/playbooks/roles/os_heat/templates/heat.conf.j2 @@ -30,6 +30,10 @@ rabbit_password = {{ rabbitmq_password }} rabbit_hosts = {{ rabbitmq_servers }} +## Plugin dirs +plugin_dirs = {{ heat_plugin_dirs | join(',') }} + + [clients] endpoint_type = {{ heat_client_endpoint }} diff --git a/playbooks/vars/repo_packages/openstack_services.yml b/playbooks/vars/repo_packages/openstack_services.yml index cded5676ae..0c885ccd4f 100644 --- a/playbooks/vars/repo_packages/openstack_services.yml +++ b/playbooks/vars/repo_packages/openstack_services.yml @@ -44,7 +44,8 @@ glance_git_dest: "/opt/glance_{{ glance_git_install_branch | replace('/', '_') } heat_git_repo: https://github.com/openstack/heat heat_git_install_branch: 2014.2.2 heat_git_dest: "/opt/heat_{{ heat_git_install_branch | replace('/', '_') }}" - +heat_repo_plugins: + - { path: "contrib", package: "extraroute" } ## Horizon service horizon_git_repo: https://github.com/openstack/horizon