1 ##############################################################################
2 # Copyright (c) 2017 Mirantis Inc. and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {% from "opendaylight/map.jinja" import server with context %}
9 {% from "linux/map.jinja" import system with context %}
11 {%- if server.enabled %}
13 opendaylight_repo_key:
15 - name: "apt-key adv --keyserver keyserver.ubuntu.com --recv 44C05248"
17 {%- if system.proxy.pkg.http is defined %}
18 - http_proxy: {{ system.proxy.pkg.http }}
20 {%- if system.proxy.pkg.https is defined %}
21 - https_proxy: {{ system.proxy.pkg.https }}
26 # NOTE(armband): PPA handling behind proxy broken, define it explicitly
27 # https://github.com/saltstack/salt/pull/45224
28 # - ppa: {{ server.repo }}
29 - human_name: opendaylight-ppa
30 - name: deb http://ppa.launchpad.net/odl-team/{{ server.version }}/ubuntu xenial main
31 - file: /etc/apt/sources.list.d/odl-team-ubuntu-{{ server.version }}-xenial.list
36 - pkgrepo: opendaylight_repo
38 - file: /opt/opendaylight/etc/jetty.xml
39 - file: /opt/opendaylight/bin/setenv
40 - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
41 - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
45 - file: /opt/opendaylight/etc/jetty.xml
46 - file: /opt/opendaylight/bin/setenv
47 - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
48 - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
50 # TODO: use service.masked state once salt get updated to 2017.7.0+
53 - m_name: opendaylight
57 /opt/opendaylight/etc/jetty.xml:
59 - source: salt://opendaylight/files/jetty.xml
64 /opt/opendaylight/bin/setenv:
66 - source: salt://opendaylight/files/setenv.shell
69 - file: /opt/opendaylight/etc/jetty.xml
72 {%- for f in server.karaf_features.itervalues() -%}
73 {{ f | join(',') }}{%- if not loop.last %},{%- endif %}
77 /opt/opendaylight/etc/org.apache.karaf.features.cfg:
80 featuresBoot: {{ features }}
82 /opt/opendaylight/etc/org.ops4j.pax.web.cfg:
85 org.ops4j.pax.web.listening.addresses: {{ server.odl_bind_ip }}
86 org.osgi.service.http.port: {{ server.odl_rest_port }}
88 {%- if server.get('router_enabled', false) %}
89 /opt/opendaylight/etc/custom.properties:
92 ovsdb.l3.fwd.enabled: 'yes'
97 - service: opendaylight
100 {%- if grains['cpuarch'] == 'aarch64' %}
101 opendaylight-leveldbjni: