Update Calico Felix agent to 2.3

Update calico-felix to the latest stable release, which requires an
upgrade to the deployment methods used since the 2.x calico-felix
was rewritten to a Go based agent (the old 1.x releases were Python
based).

Change-Id: I9c3cb1a11319f692113badf4d49bc8903effcbd7
This commit is contained in:
Logan V 2017-06-28 14:54:45 -05:00
parent 5d3f059606
commit 552d119df5
5 changed files with 41 additions and 12 deletions

View File

@ -46,8 +46,6 @@ neutron_vpnaas_git_repo: https://git.openstack.org/openstack/neutron-vpnaas
neutron_vpnaas_git_install_branch: master neutron_vpnaas_git_install_branch: master
neutron_dynamic_routing_git_repo: https://git.openstack.org/openstack/neutron-dynamic-routing neutron_dynamic_routing_git_repo: https://git.openstack.org/openstack/neutron-dynamic-routing
neutron_dynamic_routing_git_install_branch: master neutron_dynamic_routing_git_install_branch: master
calico_git_repo: https://github.com/projectcalico/felix
calico_git_install_branch: master
networking_calico_git_repo: https://git.openstack.org/openstack/networking-calico networking_calico_git_repo: https://git.openstack.org/openstack/networking-calico
networking_calico_git_install_branch: master networking_calico_git_install_branch: master
dragonflow_git_repo: https://git.openstack.org/openstack/dragonflow dragonflow_git_repo: https://git.openstack.org/openstack/dragonflow

View File

@ -36,6 +36,23 @@
- calico-install - calico-install
- calico-pip-packages - calico-pip-packages
- name: Install Calico Felix agent
get_url:
url: "{{ calico_felix_url }}"
dest: "{{ calico_felix_bin }}"
sha256sum: "{{ calico_felix_sha256 }}"
validate_certs: "{{ calico_felix_validate_certs }}"
mode: '0755'
register: install_packages
until: install_packages|success
retries: 5
delay: 2
when:
- "neutron_services['calico-felix']['group'] in group_names"
notify: Restart neutron services
tags:
- calico-install
- name: Ensure calico config directory exists - name: Ensure calico config directory exists
file: file:
path: "/etc/calico" path: "/etc/calico"
@ -46,4 +63,4 @@
when: when:
- neutron_services['calico-felix']['group'] in group_names - neutron_services['calico-felix']['group'] in group_names
tags: tags:
- calico-felix-config - calico-config

View File

@ -23,6 +23,11 @@ tempest_plugins:
tempest_test_whitelist: tempest_test_whitelist:
- neutron.tests.tempest.api.test_networks* - neutron.tests.tempest.api.test_networks*
tempest_private_net_provider_type: "local"
tempest_private_net_seg_id: ''
tempest_public_net_provider_type: "local"
tempest_public_net_physical_type: ''
neutron_plugin_type: ml2.calico neutron_plugin_type: ml2.calico
neutron_provider_networks: neutron_provider_networks:
network_types: '' network_types: ''

View File

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Test calico - name: Test calico
hosts: neutron_all hosts: neutron_calico_dhcp_agent
user: root user: root
gather_facts: true gather_facts: true
tasks: tasks:
@ -24,14 +24,17 @@
- calico-felix - calico-felix
- calico-dhcp-age - calico-dhcp-age
- name: Ensure that the Calico Felix agent is alive - name: Ensure that the Calico Felix agent is alive
shell: | command: openstack --os-cloud default network agent list -f json
. /root/openrc
neutron agent-list | grep calico-felix
register: calico_felix_agent register: calico_felix_agent
until: calico_felix_agent.stdout.find(':-)') != -1 until: |-
when: ansible_nodename in (calico_felix_agent.stdout
- groups['neutron_calico_dhcp_agent'] | length > 0 | from_json
| selectattr('Binary', 'equalto', 'calico-felix')
| map(attribute='Host') | list)
retries: 5 retries: 5
delay: 10 delay: 10
with_items: "{{ ansible_play_hosts }}"
delegate_to: "{{ groups['utility_all'][0] }}"
run_once: yes
vars_files: vars_files:
- common/test-vars.yml - common/test-vars.yml

View File

@ -40,6 +40,13 @@ neutron_package_list: |-
{% endif %} {% endif %}
{{ packages }} {{ packages }}
# Set the Calico Felix agent URL information
calico_felix_url: "https://github.com/projectcalico/felix/releases/download/{{ calico_felix_version }}/calico-felix"
calico_felix_version: 2.3.0
calico_felix_sha256: 6cc538d6d93d2b5e732841769f427ce61a4e7d9a6eedf4ca8d33c4df42cf6419
calico_felix_bin: /usr/local/bin/calico-felix
calico_felix_validate_certs: yes
### ###
### Python code details ### Python code details
### ###
@ -68,7 +75,6 @@ neutron_optional_bgp_pip_packages:
- neutron_dynamic_routing - neutron_dynamic_routing
neutron_optional_calico_pip_packages: neutron_optional_calico_pip_packages:
- felix
- networking-calico - networking-calico
- python-etcd - python-etcd
@ -96,7 +102,6 @@ neutron_developer_constraints:
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas" - "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_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+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing"
- "git+{{ calico_git_repo }}@{{ calico_git_install_branch }}#egg=felix"
- "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico" - "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico"
- "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow" - "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow"
@ -449,6 +454,7 @@ neutron_services:
group: neutron_calico_dhcp_agent group: neutron_calico_dhcp_agent
system_user: root system_user: root
system_group: root system_group: root
program_override: "{{ calico_felix_bin }}"
service_name: calico-felix service_name: calico-felix
service_en: "{{ neutron_plugin_type == 'ml2.calico' }}" service_en: "{{ neutron_plugin_type == 'ml2.calico' }}"
service_conf_path: /etc/calico service_conf_path: /etc/calico