Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add support for using these instead of the pip ones. Change-Id: I5bfcaff1bdc6ce74fb9f4839ecb73bf01d448280 Implements: blueprint openstack-distribution-packages
This commit is contained in:
parent
0d833b895b
commit
20b66c9e4f
@ -27,6 +27,9 @@ debug: False
|
|||||||
# Options are 'present' and 'latest'
|
# Options are 'present' and 'latest'
|
||||||
neutron_package_state: "latest"
|
neutron_package_state: "latest"
|
||||||
|
|
||||||
|
# Set installation method.
|
||||||
|
neutron_install_method: "source"
|
||||||
|
|
||||||
###
|
###
|
||||||
### Python code details
|
### Python code details
|
||||||
###
|
###
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The role now supports using the distribution packages for the OpenStack
|
||||||
|
services instead of the pip ones. This feature is disabled by default
|
||||||
|
and can be enabled by simply setting the ``neutron_install_method``
|
||||||
|
variable to ``distro``.
|
@ -27,6 +27,21 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
- name: Fail if service was deployed using a different installation method
|
||||||
|
fail:
|
||||||
|
msg: "Switching installation methods for OpenStack services is not supported"
|
||||||
|
when:
|
||||||
|
- ansible_local is defined
|
||||||
|
- ansible_local.openstack_ansible is defined
|
||||||
|
- ansible_local.openstack_ansible.neutron is defined
|
||||||
|
- ansible_local.openstack_ansible.neutron.install_method is defined
|
||||||
|
- ansible_local.openstack_ansible.neutron.install_method != neutron_install_method
|
||||||
|
|
||||||
|
- name: Gather variables for installation method
|
||||||
|
include_vars: "{{ neutron_install_method }}_install.yml"
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
- name: Get CPU info content and store as var
|
- name: Get CPU info content and store as var
|
||||||
command: cat /proc/cpuinfo
|
command: cat /proc/cpuinfo
|
||||||
register: cpuinfo_contents
|
register: cpuinfo_contents
|
||||||
|
@ -13,12 +13,28 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Record the installation method
|
||||||
|
ini_file:
|
||||||
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||||
|
section: "neutron"
|
||||||
|
option: "install_method"
|
||||||
|
value: "{{ neutron_install_method }}"
|
||||||
|
|
||||||
|
- name: Refresh local facts to ensure the neutron section is present
|
||||||
|
setup:
|
||||||
|
filter: ansible_local
|
||||||
|
gather_subset: "!all"
|
||||||
|
|
||||||
- name: Install neutron role packages
|
- name: Install neutron role packages
|
||||||
package:
|
package:
|
||||||
name: "{{ neutron_package_list }}"
|
name: "{{ neutron_package_list }}"
|
||||||
state: "{{ neutron_package_state }}"
|
state: "{{ neutron_package_state }}"
|
||||||
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
||||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages|success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
- name: Remove known problem packages
|
- name: Remove known problem packages
|
||||||
package:
|
package:
|
||||||
@ -30,134 +46,9 @@
|
|||||||
delay: 2
|
delay: 2
|
||||||
with_items: "{{ neutron_remove_distro_packages }}"
|
with_items: "{{ neutron_remove_distro_packages }}"
|
||||||
|
|
||||||
- name: Create developer mode constraint file
|
- name: Install neutron packages from PIP
|
||||||
copy:
|
include_tasks: neutron_install_source.yml
|
||||||
dest: "/opt/developer-pip-constraints.txt"
|
when: neutron_install_method == 'source'
|
||||||
content: |
|
|
||||||
{% for item in neutron_developer_constraints %}
|
|
||||||
{{ item }}
|
|
||||||
{% endfor %}
|
|
||||||
when: neutron_developer_mode | bool
|
|
||||||
|
|
||||||
- name: Install requires pip packages
|
|
||||||
pip:
|
|
||||||
name: "{{ neutron_requires_pip_packages }}"
|
|
||||||
state: "{{ neutron_pip_package_state }}"
|
|
||||||
extra_args: >-
|
|
||||||
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
|
||||||
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
|
||||||
{{ pip_install_options | default('') }}
|
|
||||||
register: install_packages
|
|
||||||
until: install_packages|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
|
|
||||||
- name: Retrieve checksum for venv download
|
|
||||||
uri:
|
|
||||||
url: "{{ neutron_venv_download_url | replace('tgz', 'checksum') }}"
|
|
||||||
return_content: yes
|
|
||||||
register: neutron_venv_checksum
|
|
||||||
when: neutron_venv_download | bool
|
|
||||||
|
|
||||||
- name: Attempt venv download
|
|
||||||
get_url:
|
|
||||||
url: "{{ neutron_venv_download_url }}"
|
|
||||||
dest: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
|
||||||
checksum: "sha1:{{ neutron_venv_checksum.content | trim }}"
|
|
||||||
register: neutron_get_venv
|
|
||||||
when: neutron_venv_download | bool
|
|
||||||
|
|
||||||
- name: Remove existing venv
|
|
||||||
file:
|
|
||||||
path: "{{ neutron_bin | dirname }}"
|
|
||||||
state: absent
|
|
||||||
when: neutron_get_venv | changed
|
|
||||||
|
|
||||||
- name: Create neutron venv dir
|
|
||||||
file:
|
|
||||||
path: "{{ neutron_bin | dirname }}"
|
|
||||||
state: directory
|
|
||||||
register: neutron_venv_dir
|
|
||||||
when: neutron_get_venv | changed
|
|
||||||
|
|
||||||
- name: Unarchive pre-built venv
|
|
||||||
unarchive:
|
|
||||||
src: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
|
||||||
dest: "{{ neutron_bin | dirname }}"
|
|
||||||
copy: "no"
|
|
||||||
when: neutron_get_venv | changed
|
|
||||||
notify: Restart neutron services
|
|
||||||
|
|
||||||
- name: Install pip packages
|
|
||||||
pip:
|
|
||||||
name: "{{ neutron_pip_packages }}"
|
|
||||||
state: "{{ neutron_pip_package_state }}"
|
|
||||||
virtualenv: "{{ neutron_bin | dirname }}"
|
|
||||||
virtualenv_site_packages: "no"
|
|
||||||
extra_args: >-
|
|
||||||
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
|
||||||
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
|
||||||
{{ pip_install_options | default('') }}
|
|
||||||
register: install_packages
|
|
||||||
until: install_packages | success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
when: neutron_get_venv | failed or neutron_get_venv | skipped
|
|
||||||
notify: Restart neutron services
|
|
||||||
|
|
||||||
- name: Remove python from path first (CentOS, openSUSE)
|
|
||||||
file:
|
|
||||||
path: "{{ neutron_bin | dirname }}/bin/python2.7"
|
|
||||||
state: "absent"
|
|
||||||
when:
|
|
||||||
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
|
|
||||||
- neutron_get_venv | changed
|
|
||||||
|
|
||||||
# NOTE(odyssey4me):
|
|
||||||
# We reinitialize the venv to ensure that the right
|
|
||||||
# version of python is in the venv, but we do not
|
|
||||||
# want virtualenv to also replace pip, setuptools
|
|
||||||
# and wheel so we tell it not to.
|
|
||||||
# We do not use --always-copy for CentOS/SuSE due
|
|
||||||
# to https://github.com/pypa/virtualenv/issues/565
|
|
||||||
- name: Update virtualenv path
|
|
||||||
shell: |
|
|
||||||
find {{ neutron_bin }} -name \*.pyc -delete
|
|
||||||
sed -si '1s/^.*python.*$/#!{{ neutron_bin | replace ('/','\/') }}\/python/' {{ neutron_bin }}/*
|
|
||||||
virtualenv {{ neutron_bin | dirname }} \
|
|
||||||
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \
|
|
||||||
--no-pip \
|
|
||||||
--no-setuptools \
|
|
||||||
--no-wheel
|
|
||||||
when: neutron_get_venv | changed
|
|
||||||
tags:
|
|
||||||
- skip_ansible_lint
|
|
||||||
|
|
||||||
- name: Install optional pip packages
|
|
||||||
pip:
|
|
||||||
name: >-
|
|
||||||
{{ (neutron_bgp | bool) | ternary(neutron_optional_bgp_pip_packages, []) +
|
|
||||||
(neutron_fwaas | bool) | ternary(neutron_optional_fwaas_pip_packages, []) +
|
|
||||||
(neutron_fwaas_v2 | bool) | ternary(neutron_optional_fwaas_pip_packages, []) +
|
|
||||||
(neutron_lbaasv2 | bool) | ternary(neutron_optional_lbaas_pip_packages, []) +
|
|
||||||
(neutron_vpnaas | bool) | ternary(neutron_optional_vpnaas_pip_packages, []) }}
|
|
||||||
state: "{{ neutron_pip_package_state }}"
|
|
||||||
virtualenv: "{{ neutron_bin | dirname }}"
|
|
||||||
virtualenv_site_packages: "no"
|
|
||||||
extra_args: >-
|
|
||||||
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
|
||||||
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
|
||||||
{{ pip_install_options | default('') }}
|
|
||||||
when: neutron_bgp | bool or
|
|
||||||
neutron_fwaas | bool or
|
|
||||||
neutron_fwaas_v2 | bool or
|
|
||||||
neutron_lbaasv2 | bool or
|
|
||||||
neutron_vpnaas | bool
|
|
||||||
register: install_optional_packages
|
|
||||||
until: install_optional_packages | success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
notify: Restart neutron services
|
|
||||||
|
|
||||||
- name: Initialise the upgrade facts
|
- name: Initialise the upgrade facts
|
||||||
ini_file:
|
ini_file:
|
||||||
@ -170,23 +61,17 @@
|
|||||||
state: "True"
|
state: "True"
|
||||||
- name: "need_db_contract"
|
- name: "need_db_contract"
|
||||||
state: "True"
|
state: "True"
|
||||||
when: (neutron_get_venv | changed) or
|
when: (neutron_install_method == 'source' and
|
||||||
|
((neutron_get_venv | changed) or
|
||||||
(neutron_venv_dir | changed) or
|
(neutron_venv_dir | changed) or
|
||||||
|
(install_optional_packages | changed))) or
|
||||||
(install_packages | changed) or
|
(install_packages | changed) or
|
||||||
(install_optional_packages | changed) or
|
|
||||||
(ansible_local is not defined) or
|
(ansible_local is not defined) or
|
||||||
('openstack_ansible' not in ansible_local) or
|
('openstack_ansible' not in ansible_local) or
|
||||||
('neutron' not in ansible_local['openstack_ansible']) or
|
('neutron' not in ansible_local['openstack_ansible']) or
|
||||||
('need_db_expand' not in ansible_local['openstack_ansible']['neutron']) or
|
('need_db_expand' not in ansible_local['openstack_ansible']['neutron']) or
|
||||||
('need_db_contract' not in ansible_local['openstack_ansible']['neutron'])
|
('need_db_contract' not in ansible_local['openstack_ansible']['neutron'])
|
||||||
|
|
||||||
- name: Record the venv tag deployed
|
|
||||||
ini_file:
|
|
||||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
|
||||||
section: neutron
|
|
||||||
option: venv_tag
|
|
||||||
value: "{{ neutron_venv_tag }}"
|
|
||||||
|
|
||||||
- include: neutron_selinux.yml
|
- include: neutron_selinux.yml
|
||||||
when:
|
when:
|
||||||
- ansible_selinux.status == "enabled"
|
- ansible_selinux.status == "enabled"
|
||||||
|
150
tasks/neutron_install_source.yml
Normal file
150
tasks/neutron_install_source.yml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2018, SUSE Linux GmbH.
|
||||||
|
#
|
||||||
|
# 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: Create developer mode constraint file
|
||||||
|
copy:
|
||||||
|
dest: "/opt/developer-pip-constraints.txt"
|
||||||
|
content: |
|
||||||
|
{% for item in neutron_developer_constraints %}
|
||||||
|
{{ item }}
|
||||||
|
{% endfor %}
|
||||||
|
when: neutron_developer_mode | bool
|
||||||
|
|
||||||
|
- name: Install requires pip packages
|
||||||
|
pip:
|
||||||
|
name: "{{ neutron_requires_pip_packages }}"
|
||||||
|
state: "{{ neutron_pip_package_state }}"
|
||||||
|
extra_args: >-
|
||||||
|
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||||
|
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
||||||
|
{{ pip_install_options | default('') }}
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages|success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
|
- name: Retrieve checksum for venv download
|
||||||
|
uri:
|
||||||
|
url: "{{ neutron_venv_download_url | replace('tgz', 'checksum') }}"
|
||||||
|
return_content: yes
|
||||||
|
register: neutron_venv_checksum
|
||||||
|
when: neutron_venv_download | bool
|
||||||
|
|
||||||
|
- name: Attempt venv download
|
||||||
|
get_url:
|
||||||
|
url: "{{ neutron_venv_download_url }}"
|
||||||
|
dest: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
||||||
|
checksum: "sha1:{{ neutron_venv_checksum.content | trim }}"
|
||||||
|
register: neutron_get_venv
|
||||||
|
when: neutron_venv_download | bool
|
||||||
|
|
||||||
|
- name: Remove existing venv
|
||||||
|
file:
|
||||||
|
path: "{{ neutron_bin | dirname }}"
|
||||||
|
state: absent
|
||||||
|
when: neutron_get_venv | changed
|
||||||
|
|
||||||
|
- name: Create neutron venv dir
|
||||||
|
file:
|
||||||
|
path: "{{ neutron_bin | dirname }}"
|
||||||
|
state: directory
|
||||||
|
register: neutron_venv_dir
|
||||||
|
when: neutron_get_venv | changed
|
||||||
|
|
||||||
|
- name: Unarchive pre-built venv
|
||||||
|
unarchive:
|
||||||
|
src: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
||||||
|
dest: "{{ neutron_bin | dirname }}"
|
||||||
|
copy: "no"
|
||||||
|
when: neutron_get_venv | changed
|
||||||
|
notify: Restart neutron services
|
||||||
|
|
||||||
|
- name: Install pip packages
|
||||||
|
pip:
|
||||||
|
name: "{{ neutron_pip_packages }}"
|
||||||
|
state: "{{ neutron_pip_package_state }}"
|
||||||
|
virtualenv: "{{ neutron_bin | dirname }}"
|
||||||
|
virtualenv_site_packages: "no"
|
||||||
|
extra_args: >-
|
||||||
|
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||||
|
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
||||||
|
{{ pip_install_options | default('') }}
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages | success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
when: neutron_get_venv | failed or neutron_get_venv | skipped
|
||||||
|
notify: Restart neutron services
|
||||||
|
|
||||||
|
- name: Remove python from path first (CentOS, openSUSE)
|
||||||
|
file:
|
||||||
|
path: "{{ neutron_bin | dirname }}/bin/python2.7"
|
||||||
|
state: "absent"
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
|
||||||
|
- neutron_get_venv | changed
|
||||||
|
|
||||||
|
# NOTE(odyssey4me):
|
||||||
|
# We reinitialize the venv to ensure that the right
|
||||||
|
# version of python is in the venv, but we do not
|
||||||
|
# want virtualenv to also replace pip, setuptools
|
||||||
|
# and wheel so we tell it not to.
|
||||||
|
# We do not use --always-copy for CentOS/SuSE due
|
||||||
|
# to https://github.com/pypa/virtualenv/issues/565
|
||||||
|
- name: Update virtualenv path
|
||||||
|
shell: |
|
||||||
|
find {{ neutron_bin }} -name \*.pyc -delete
|
||||||
|
sed -si '1s/^.*python.*$/#!{{ neutron_bin | replace ('/','\/') }}\/python/' {{ neutron_bin }}/*
|
||||||
|
virtualenv {{ neutron_bin | dirname }} \
|
||||||
|
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \
|
||||||
|
--no-pip \
|
||||||
|
--no-setuptools \
|
||||||
|
--no-wheel
|
||||||
|
when: neutron_get_venv | changed
|
||||||
|
tags:
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
|
- name: Install optional pip packages
|
||||||
|
pip:
|
||||||
|
name: >-
|
||||||
|
{{ (neutron_bgp | bool) | ternary(neutron_optional_bgp_pip_packages, []) +
|
||||||
|
(neutron_fwaas | bool) | ternary(neutron_optional_fwaas_pip_packages, []) +
|
||||||
|
(neutron_fwaas_v2 | bool) | ternary(neutron_optional_fwaas_pip_packages, []) +
|
||||||
|
(neutron_lbaasv2 | bool) | ternary(neutron_optional_lbaas_pip_packages, []) +
|
||||||
|
(neutron_vpnaas | bool) | ternary(neutron_optional_vpnaas_pip_packages, []) }}
|
||||||
|
state: "{{ neutron_pip_package_state }}"
|
||||||
|
virtualenv: "{{ neutron_bin | dirname }}"
|
||||||
|
virtualenv_site_packages: "no"
|
||||||
|
extra_args: >-
|
||||||
|
{{ neutron_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
||||||
|
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
||||||
|
{{ pip_install_options | default('') }}
|
||||||
|
when: neutron_bgp | bool or
|
||||||
|
neutron_fwaas | bool or
|
||||||
|
neutron_fwaas_v2 | bool or
|
||||||
|
neutron_lbaasv2 | bool or
|
||||||
|
neutron_vpnaas | bool
|
||||||
|
register: install_optional_packages
|
||||||
|
until: install_optional_packages | success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
notify: Restart neutron services
|
||||||
|
|
||||||
|
- name: Record the venv tag deployed
|
||||||
|
ini_file:
|
||||||
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||||
|
section: neutron
|
||||||
|
option: venv_tag
|
||||||
|
value: "{{ neutron_venv_tag }}"
|
8
tox.ini
8
tox.ini
@ -101,6 +101,14 @@ deps =
|
|||||||
commands =
|
commands =
|
||||||
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||||
|
|
||||||
|
[testenv:distro_install]
|
||||||
|
deps =
|
||||||
|
{[testenv:ansible]deps}
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
ANSIBLE_PARAMETERS=-e neutron_install_method=distro
|
||||||
|
commands =
|
||||||
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
||||||
|
|
||||||
[testenv:upgrade]
|
[testenv:upgrade]
|
||||||
deps =
|
deps =
|
||||||
|
50
vars/distro_install.yml
Normal file
50
vars/distro_install.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2018, SUSE Linux GmbH.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
###
|
||||||
|
### Packages
|
||||||
|
###
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile a list of the distro packages to install based on
|
||||||
|
# whether the host is in the host group and the service is
|
||||||
|
# enabled.
|
||||||
|
#
|
||||||
|
neutron_package_list: |-
|
||||||
|
{% set packages = neutron_distro_packages %}
|
||||||
|
{% if neutron_needs_openvswitch | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_optional_ovs_distro_packages) %}
|
||||||
|
{% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
|
||||||
|
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
|
||||||
|
{% else %}
|
||||||
|
{% set _ = packages.extend(neutron_ovs_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_optional_lxb_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_optional_lbaas_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_optional_vpnaas_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_developer_mode | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_developer_mode_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% set _ = packages.extend(neutron_service_distro_packages) %}
|
||||||
|
{{ packages }}
|
||||||
|
|
||||||
|
neutron_bin: "/usr/bin"
|
108
vars/main.yml
108
vars/main.yml
@ -22,117 +22,9 @@ neutron_needs_openvswitch: >-
|
|||||||
or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool)
|
or (neutron_services['dragonflow-l3-agent']['group'] in group_names and neutron_services['dragonflow-l3-agent'].service_en | bool)
|
||||||
or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') }}
|
or ((neutron_services['neutron-server']['group'] not in group_names) and neutron_plugin_type == 'ml2.opendaylight') }}
|
||||||
|
|
||||||
###
|
|
||||||
### Packages
|
|
||||||
###
|
|
||||||
|
|
||||||
#
|
|
||||||
# Compile a list of the distro packages to install based on
|
|
||||||
# whether the host is in the host group and the service is
|
|
||||||
# enabled.
|
|
||||||
#
|
|
||||||
neutron_package_list: |-
|
|
||||||
{% set packages = neutron_distro_packages %}
|
|
||||||
{% if neutron_needs_openvswitch | bool %}
|
|
||||||
{% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
|
|
||||||
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
|
|
||||||
{% else %}
|
|
||||||
{% set _ = packages.extend(neutron_ovs_distro_packages) %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
|
|
||||||
{% set _ = packages.extend(neutron_lxb_distro_packages) %}
|
|
||||||
{% endif %}
|
|
||||||
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool %}
|
|
||||||
{% set _ = packages.extend(neutron_lbaas_distro_packages) %}
|
|
||||||
{% endif %}
|
|
||||||
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool %}
|
|
||||||
{% set _ = packages.extend(neutron_vpnaas_distro_packages) %}
|
|
||||||
{% endif %}
|
|
||||||
{% if neutron_developer_mode | bool %}
|
|
||||||
{% set _ = packages.extend(neutron_developer_mode_distro_packages) %}
|
|
||||||
{% endif %}
|
|
||||||
{{ packages }}
|
|
||||||
|
|
||||||
neutron_ovs_nsh_distro_packages: []
|
|
||||||
|
|
||||||
# Set the Calico Felix agent executable destination path
|
# Set the Calico Felix agent executable destination path
|
||||||
calico_felix_bin: /usr/local/bin/calico-felix
|
calico_felix_bin: /usr/local/bin/calico-felix
|
||||||
|
|
||||||
###
|
|
||||||
### Python code details
|
|
||||||
###
|
|
||||||
|
|
||||||
neutron_requires_pip_packages:
|
|
||||||
- virtualenv
|
|
||||||
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
|
|
||||||
- httplib2
|
|
||||||
|
|
||||||
neutron_pip_packages:
|
|
||||||
- cliff
|
|
||||||
- configobj
|
|
||||||
- cryptography
|
|
||||||
- keystonemiddleware
|
|
||||||
- PyMySQL
|
|
||||||
- neutron
|
|
||||||
- python-glanceclient
|
|
||||||
- python-keystoneclient
|
|
||||||
- python-memcached
|
|
||||||
- python-neutronclient
|
|
||||||
- python-novaclient
|
|
||||||
- repoze.lru
|
|
||||||
|
|
||||||
neutron_optional_bgp_pip_packages:
|
|
||||||
- neutron_dynamic_routing
|
|
||||||
|
|
||||||
neutron_optional_calico_pip_packages:
|
|
||||||
- networking-calico
|
|
||||||
- python-etcd
|
|
||||||
|
|
||||||
neutron_optional_fwaas_pip_packages:
|
|
||||||
- neutron_fwaas
|
|
||||||
|
|
||||||
neutron_optional_lbaas_pip_packages:
|
|
||||||
- neutron_lbaas
|
|
||||||
|
|
||||||
neutron_optional_vpnaas_pip_packages:
|
|
||||||
- neutron_vpnaas
|
|
||||||
|
|
||||||
neutron_optional_dragonflow_pip_packages:
|
|
||||||
- dragonflow
|
|
||||||
- python-etcd
|
|
||||||
|
|
||||||
neutron_optional_opendaylight_pip_packages:
|
|
||||||
- networking-odl
|
|
||||||
- networking-bgpvpn
|
|
||||||
|
|
||||||
neutron_optional_opendaylight_sfc_pip_packages:
|
|
||||||
- networking-sfc
|
|
||||||
|
|
||||||
neutron_proprietary_nuage_pip_packages:
|
|
||||||
- nuage-openstack-neutron
|
|
||||||
- nuage-openstack-neutronclient
|
|
||||||
- nuagenetlib
|
|
||||||
|
|
||||||
neutron_developer_constraints:
|
|
||||||
- "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron"
|
|
||||||
- "git+{{ neutron_fwaas_git_repo }}@{{ neutron_fwaas_git_install_branch }}#egg=neutron-fwaas"
|
|
||||||
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
|
|
||||||
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
|
|
||||||
- "git+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing"
|
|
||||||
- "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico"
|
|
||||||
- "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow"
|
|
||||||
- "git+{{ networking_odl_git_repo }}@{{ networking_odl_git_install_branch }}#egg=networking-odl"
|
|
||||||
- "git+{{ networking_sfc_git_repo }}@{{ networking_sfc_git_install_branch }}#egg=networking-sfc"
|
|
||||||
- "git+{{ networking_bgpvpn_git_repo }}@{{ networking_bgpvpn_git_install_branch }}#egg=networking-bgpvpn"
|
|
||||||
- "git+{{ openstack_ceilometer_git_repo }}@{{ openstack_ceilometer_git_install_branch }}#egg=ceilometer"
|
|
||||||
|
|
||||||
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
|
||||||
|
|
||||||
neutron_venv_download: "{{ not neutron_developer_mode | bool }}"
|
|
||||||
|
|
||||||
neutron_lib_dir: "{{ neutron_bin | dirname }}/lib/python2.7/site-packages/"
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Generic Neutron Config
|
### Generic Neutron Config
|
||||||
###
|
###
|
||||||
|
@ -39,6 +39,35 @@ neutron_distro_packages:
|
|||||||
- radvd
|
- radvd
|
||||||
- which
|
- which
|
||||||
|
|
||||||
|
neutron_service_distro_packages:
|
||||||
|
- python-cliff
|
||||||
|
- python-keystonemiddleware
|
||||||
|
- openstack-neutron
|
||||||
|
- openstack-neutron-ml2
|
||||||
|
- openstack-neutron-macvtap-agent
|
||||||
|
- openstack-neutron-l2gw-agent
|
||||||
|
- python-glanceclient
|
||||||
|
- python-keystoneclient
|
||||||
|
- python-memcached
|
||||||
|
- python-neutronclient
|
||||||
|
- python-novaclient
|
||||||
|
|
||||||
|
neutron_optional_ovs_distro_packages:
|
||||||
|
- openstack-neutron-openvswitch
|
||||||
|
|
||||||
|
neutron_optional_lxb_distro_packages:
|
||||||
|
- openstack-neutron-linuxbridge
|
||||||
|
|
||||||
|
neutron_optional_fwaas_distro_packages:
|
||||||
|
- openstack-neutron-fwaas
|
||||||
|
|
||||||
|
neutron_optional_lbaas_distro_packages:
|
||||||
|
- openstack-neutron-lbaas
|
||||||
|
- openstack-neutron-lbaas-agent
|
||||||
|
|
||||||
|
neutron_optional_vpnaas_distro_packages:
|
||||||
|
- openstack-neutron-vpnaas
|
||||||
|
|
||||||
neutron_developer_mode_distro_packages:
|
neutron_developer_mode_distro_packages:
|
||||||
- git
|
- git
|
||||||
|
|
||||||
|
114
vars/source_install.yml
Normal file
114
vars/source_install.yml
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2018, SUSE Linux GmbH.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
###
|
||||||
|
### Packages
|
||||||
|
###
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compile a list of the distro packages to install based on
|
||||||
|
# whether the host is in the host group and the service is
|
||||||
|
# enabled.
|
||||||
|
#
|
||||||
|
neutron_package_list: |-
|
||||||
|
{% set packages = neutron_distro_packages %}
|
||||||
|
{% if neutron_needs_openvswitch | bool %}
|
||||||
|
{% if (ovs_nsh_support and ansible_pkg_mgr in ['apt', 'zypper']) %}
|
||||||
|
{% set _ = packages.extend(neutron_ovs_nsh_required_packages) %}
|
||||||
|
{% else %}
|
||||||
|
{% set _ = packages.extend(neutron_ovs_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-linuxbridge-agent']['group'] in group_names and neutron_services['neutron-linuxbridge-agent'].service_en | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_lxb_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-lbaasv2-agent']['group'] in group_names and neutron_lbaasv2 | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_lbaas_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_vpnaas_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if neutron_developer_mode | bool %}
|
||||||
|
{% set _ = packages.extend(neutron_developer_mode_distro_packages) %}
|
||||||
|
{% endif %}
|
||||||
|
{{ packages }}
|
||||||
|
|
||||||
|
neutron_requires_pip_packages:
|
||||||
|
- virtualenv
|
||||||
|
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
|
||||||
|
- httplib2
|
||||||
|
|
||||||
|
neutron_pip_packages:
|
||||||
|
- cliff
|
||||||
|
- configobj
|
||||||
|
- cryptography
|
||||||
|
- keystonemiddleware
|
||||||
|
- PyMySQL
|
||||||
|
- neutron
|
||||||
|
- python-glanceclient
|
||||||
|
- python-keystoneclient
|
||||||
|
- python-memcached
|
||||||
|
- python-neutronclient
|
||||||
|
- python-novaclient
|
||||||
|
- repoze.lru
|
||||||
|
|
||||||
|
neutron_optional_bgp_pip_packages:
|
||||||
|
- neutron_dynamic_routing
|
||||||
|
|
||||||
|
neutron_optional_calico_pip_packages:
|
||||||
|
- networking-calico
|
||||||
|
- python-etcd
|
||||||
|
|
||||||
|
neutron_optional_fwaas_pip_packages:
|
||||||
|
- neutron_fwaas
|
||||||
|
|
||||||
|
neutron_optional_lbaas_pip_packages:
|
||||||
|
- neutron_lbaas
|
||||||
|
|
||||||
|
neutron_optional_vpnaas_pip_packages:
|
||||||
|
- neutron_vpnaas
|
||||||
|
|
||||||
|
neutron_optional_dragonflow_pip_packages:
|
||||||
|
- dragonflow
|
||||||
|
- python-etcd
|
||||||
|
|
||||||
|
neutron_optional_opendaylight_pip_packages:
|
||||||
|
- networking-odl
|
||||||
|
- networking-bgpvpn
|
||||||
|
|
||||||
|
neutron_optional_opendaylight_sfc_pip_packages:
|
||||||
|
- networking-sfc
|
||||||
|
|
||||||
|
neutron_proprietary_nuage_pip_packages:
|
||||||
|
- nuage-openstack-neutron
|
||||||
|
- nuage-openstack-neutronclient
|
||||||
|
- nuagenetlib
|
||||||
|
|
||||||
|
neutron_developer_constraints:
|
||||||
|
- "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron"
|
||||||
|
- "git+{{ neutron_fwaas_git_repo }}@{{ neutron_fwaas_git_install_branch }}#egg=neutron-fwaas"
|
||||||
|
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
|
||||||
|
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
|
||||||
|
- "git+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing"
|
||||||
|
- "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico"
|
||||||
|
- "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow"
|
||||||
|
- "git+{{ networking_odl_git_repo }}@{{ networking_odl_git_install_branch }}#egg=networking-odl"
|
||||||
|
- "git+{{ networking_sfc_git_repo }}@{{ networking_sfc_git_install_branch }}#egg=networking-sfc"
|
||||||
|
- "git+{{ networking_bgpvpn_git_repo }}@{{ networking_bgpvpn_git_install_branch }}#egg=networking-bgpvpn"
|
||||||
|
- "git+{{ openstack_ceilometer_git_repo }}@{{ openstack_ceilometer_git_install_branch }}#egg=ceilometer"
|
||||||
|
|
||||||
|
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
||||||
|
|
||||||
|
neutron_venv_download: "{{ not neutron_developer_mode | bool }}"
|
@ -50,6 +50,34 @@ neutron_distro_packages:
|
|||||||
- radvd
|
- radvd
|
||||||
- which
|
- which
|
||||||
|
|
||||||
|
neutron_service_distro_packages:
|
||||||
|
- python-cliff
|
||||||
|
- python-keystonemiddleware
|
||||||
|
- openstack-neutron
|
||||||
|
- openstack-neutron-server
|
||||||
|
- openstack-neutron-dhcp-agent
|
||||||
|
- python-glanceclient
|
||||||
|
- python-keystoneclient
|
||||||
|
- python-memcached
|
||||||
|
- python-neutronclient
|
||||||
|
- python-novaclient
|
||||||
|
|
||||||
|
neutron_optional_ovs_distro_packages:
|
||||||
|
- openstack-neutron-openvswitch-agent
|
||||||
|
|
||||||
|
neutron_optional_lxb_distro_packages:
|
||||||
|
- openstack-neutron-linuxbridge-agent
|
||||||
|
|
||||||
|
neutron_optional_fwaas_distro_packages:
|
||||||
|
- openstack-neutron-fwaas
|
||||||
|
|
||||||
|
neutron_optional_lbaas_distro_packages:
|
||||||
|
- openstack-neutron-lbaas
|
||||||
|
- openstack-neutron-lbaas-agent
|
||||||
|
|
||||||
|
neutron_option_vpnaas_distro_packages:
|
||||||
|
- openstack-neutron-vpnaas
|
||||||
|
|
||||||
neutron_developer_mode_distro_packages:
|
neutron_developer_mode_distro_packages:
|
||||||
- git-core
|
- git-core
|
||||||
|
|
||||||
|
@ -47,6 +47,39 @@ neutron_distro_packages:
|
|||||||
- keepalived
|
- keepalived
|
||||||
- radvd
|
- radvd
|
||||||
|
|
||||||
|
neutron_service_distro_packages:
|
||||||
|
- python-cliff
|
||||||
|
- python-keystonemiddleware
|
||||||
|
- neutron-server
|
||||||
|
- neutron-dhcp-agent
|
||||||
|
- neutron-l2gateway-agent
|
||||||
|
- neutron-l3-agent
|
||||||
|
- neutron-macvtap-agent
|
||||||
|
- neutron-metadata-agent
|
||||||
|
- neutron-plugin-ml2
|
||||||
|
- python-glanceclient
|
||||||
|
- python-keystoneclient
|
||||||
|
- python-memcache
|
||||||
|
- python-neutronclient
|
||||||
|
- python-novaclient
|
||||||
|
|
||||||
|
neutron_optional_ovs_distro_packages:
|
||||||
|
- neutron-openvswitch-agent
|
||||||
|
- neutron-plugin-openvswitch-agent
|
||||||
|
|
||||||
|
neutron_optional_lxb_distro_packages:
|
||||||
|
- neutron-linuxbridge-agent
|
||||||
|
- neutron-plugin-linuxbridge-agent
|
||||||
|
|
||||||
|
neutron_optional_fwaas_distro_packages:
|
||||||
|
- python-neutron-fwaas
|
||||||
|
|
||||||
|
neutron_optional_lbaas_distro_packages:
|
||||||
|
- neutron-lbaasv2-agent
|
||||||
|
|
||||||
|
neutron_optional_vpnaas_distro_packages:
|
||||||
|
- neutron-vpnaas-agent
|
||||||
|
|
||||||
neutron_developer_mode_distro_packages:
|
neutron_developer_mode_distro_packages:
|
||||||
- git-core
|
- git-core
|
||||||
|
|
||||||
|
@ -29,6 +29,11 @@
|
|||||||
- openstack-ansible-neutron-ssl-nv
|
- openstack-ansible-neutron-ssl-nv
|
||||||
- openstack-ansible-odl-sfc-ubuntu-xenial
|
- openstack-ansible-odl-sfc-ubuntu-xenial
|
||||||
- openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial
|
- openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial
|
||||||
|
- openstack-ansible-functional-distro_install-ubuntu-xenial
|
||||||
|
# NOTE(hwoarang) Centos7 is having some troubles with repo dependencies
|
||||||
|
# so disabling until it's investigated.
|
||||||
|
- openstack-ansible-functional-distro_install-centos-7-nv
|
||||||
|
- openstack-ansible-functional-distro_install-opensuse-423
|
||||||
experimental:
|
experimental:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-integrated-deploy-aio
|
- openstack-ansible-integrated-deploy-aio
|
||||||
@ -39,3 +44,5 @@
|
|||||||
- openstack-ansible-functional-opensuse-423
|
- openstack-ansible-functional-opensuse-423
|
||||||
- openstack-ansible-functional-ubuntu-xenial
|
- openstack-ansible-functional-ubuntu-xenial
|
||||||
- openstack-ansible-upgrade-ubuntu-xenial
|
- openstack-ansible-upgrade-ubuntu-xenial
|
||||||
|
- openstack-ansible-functional-distro_install-ubuntu-xenial
|
||||||
|
- openstack-ansible-functional-distro_install-opensuse-423
|
||||||
|
Loading…
Reference in New Issue
Block a user