blob: 8c6c3b28afa755141b0f37f3b5fe8eb69fb426ce (
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
|
{% from "opendaylight/map.jinja" import server with context %}
{%- if server.enabled %}
opendaylight_repo:
pkgrepo.managed:
- ppa: {{ server.repo }}
opendaylight:
pkg.installed:
- require:
- pkgrepo: opendaylight_repo
- require_in:
- file: /opt/opendaylight/etc/jetty.xml
- file: /opt/opendaylight/bin/setenv
- ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
service.running:
- enable: true
- watch:
- file: /opt/opendaylight/etc/jetty.xml
- file: /opt/opendaylight/bin/setenv
- ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
/opt/opendaylight/etc/jetty.xml:
file.managed:
- source: salt://opendaylight/files/jetty.xml
- template: jinja
- user: odl
- group: odl
/opt/opendaylight/bin/setenv:
file.managed:
- source: salt://opendaylight/files/setenv.shell
- mode: 0755
- use:
- file: /opt/opendaylight/etc/jetty.xml
{% set features %}
{%- for f in server.karaf_features.itervalues() -%}
{{ f | join(',') }}{%- if not loop.last %},{%- endif %}
{%- endfor %}
{% endset %}
/opt/opendaylight/etc/org.apache.karaf.features.cfg:
ini.options_present:
- sections:
featuresBoot: {{ features }}
{%- if server.get('router_enabled', false) %}
/opt/opendaylight/etc/custom.properties:
ini.options_present:
- sections:
ovsdb.l3.fwd.enabled: 'yes'
ovsdb.of.version: 1.3
- require:
- pkg: opendaylight
- watch_in:
- service: opendaylight
{%- endif %}
{%- endif %}
|