aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
blob: 684d05cbac52b66d6c1a59aef64d6f5558f017d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---

- name: install networking-sfc
  pip:
    name: networking-sfc==6.0.0.0rc1
    virtualenv: /openstack/venvs/neutron-{{ os_ver }}
  when:
    - inventory_hostname in groups['neutron_server']

- name: install crudini
  package:
    name: crudini
    state: latest

- name: Install networking-sfc for CLI
  pip:
    name: networking-sfc
  when:
    - inventory_hostname not in groups['neutron_server']

- name: turn off neutron-server on control node
  service: name=neutron-server state=stopped
  when: inventory_hostname in groups['neutron_server']

- name: copy sfc.conf
  copy:
    src: "{{ sfc_plugins.src }}"
    dest: "{{ sfc_plugins.dst }}"
    mode: 0755
  when: inventory_hostname in groups['neutron_server']

- name: Configure SFC driver
  shell: crudini --merge /etc/neutron/neutron.conf < /opt/sfc.conf
  when: inventory_hostname in groups['neutron_server']

- name: Configure SFC extension on compute nodes
  shell: crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini \
             agent extensions sfc;
  when: inventory_hostname in groups['compute']

- name: delete sfc.conf
  shell: rm -rf {{ sfc_plugins.dst }}
  when: inventory_hostname in groups['neutron_server']

- name: Perform a Neutron DB online upgrade
  command: |
    /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
                      --config-file /etc/neutron/neutron.conf
                      --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
                      upgrade --expand
  become: "yes"
  become_user: "neutron"
  when: inventory_hostname in groups['neutron_server'][0]

- name: Perform a Neutron DB offline upgrade
  command: |
    /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
                      --config-file /etc/neutron/neutron.conf
                      --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
                      upgrade --contract
  become: "yes"
  become_user: "neutron"
  when: inventory_hostname in groups['neutron_server'][0]

- name: SFC DB upgrade
  command: |
    /openstack/venvs/neutron-{{ os_ver }}/bin/neutron-db-manage
                      --subproject networking-sfc
                      upgrade head
  become: "yes"
  become_user: "neutron"
  when: inventory_hostname in groups['neutron_server'][0]

- name: turn on neutron-server on control node
  service: name=neutron-server state=started
  when: inventory_hostname in groups['neutron_server']