65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
dsl_version: 0.1.0
|
|
service:
|
|
name: openvswitch-vswitchd
|
|
kind: DaemonSet
|
|
hostNetwork: true
|
|
containers:
|
|
- name: openvswitch-vswitchd
|
|
image: openvswitch-vswitchd
|
|
privileged: true
|
|
# {% if neutron.plugin_agent == "opendaylight" %}
|
|
probes:
|
|
readiness:
|
|
type: exec
|
|
command: "ovs-vsctl list Bridge | grep br-int > /dev/null"
|
|
# {% endif %}
|
|
volumes:
|
|
- name: ovs-socket
|
|
type: host
|
|
path: /run/openvswitch
|
|
- name: modules
|
|
type: host
|
|
path: /lib/modules
|
|
pre:
|
|
- name: vswitchd-bootstrap
|
|
command: modprobe openvswitch
|
|
- name: vswitchd-port-forwarding
|
|
command: echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
- name: vswitchd-check-ovs-db
|
|
command: ovs-vsctl --no-wait show
|
|
dependencies:
|
|
- openvswitch-db:local
|
|
# {% if neutron.plugin_agent == "opendaylight" %}
|
|
- opendaylight
|
|
# {% endif %}
|
|
# {% if neutron.plugin_agent != "opendaylight" %}
|
|
# {% for net in neutron.physnets %}
|
|
- name: vswitchd-setup-ovs-bridge-{{ net.name }}
|
|
command: /usr/local/bin/ovs-ensure-configured.sh {{ net.bridge_name }} {{ net.interface }}
|
|
# {% endfor %}
|
|
# {% endif %}
|
|
daemon:
|
|
command: /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock --mlockall
|
|
dependencies:
|
|
- openvswitch-db:local
|
|
# {% if neutron.plugin_agent == "opendaylight" %}
|
|
- opendaylight
|
|
# {% endif %}
|
|
files:
|
|
- ovs-ensure-configured.sh
|
|
# {% if neutron.plugin_agent == "opendaylight" %}
|
|
- ovs-set-managed-by-odl.sh
|
|
post:
|
|
- name: ovs-set-managed-by-odl
|
|
command: /usr/local/bin/ovs-set-managed-by-odl.sh
|
|
# {% endif %}
|
|
files:
|
|
ovs-ensure-configured.sh:
|
|
path: /usr/local/bin/ovs-ensure-configured.sh
|
|
content: ovs-ensure-configured.sh
|
|
perm: "0755"
|
|
ovs-set-managed-by-odl.sh:
|
|
path: /usr/local/bin/ovs-set-managed-by-odl.sh
|
|
content: ovs-set-managed-by-odl.sh.j2
|
|
perm: "0755"
|