summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rw-r--r--mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/control.yml9
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml23
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja4
-rw-r--r--mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls16
-rw-r--r--mcp/scripts/docker-compose/docker-compose.yaml.j22
-rw-r--r--mcp/scripts/lib.sh4
6 files changed, 51 insertions, 7 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/control.yml b/mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/control.yml
index 795a7d892..64c16f031 100644
--- a/mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/control.yml
+++ b/mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/control.yml
@@ -33,8 +33,17 @@ parameters:
mechanism:
ovn:
driver: ovn
+ compute:
+ region: ${_param:openstack_region}
database:
host: ${_param:opnfv_openstack_database_address}
+ identity:
+ region: ${_param:openstack_region}
+ message_queue:
+ members:
+ - host: ${_param:openstack_message_queue_node01_address}
+ - host: ${_param:openstack_message_queue_node02_address}
+ - host: ${_param:openstack_message_queue_node03_address}
ovn_ctl_opts:
db-nb-create-insecure-remote: 'yes'
db-sb-create-insecure-remote: 'yes'
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml
new file mode 100644
index 000000000..336957fd1
--- /dev/null
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/files/netvirt-dhcpservice-config.xml
@@ -0,0 +1,23 @@
+{%- from "opendaylight/map.jinja" import server with context -%}
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<dhcpservice-config xmlns="urn:opendaylight:params:xml:ns:yang:dhcpservice:config">
+ <controller-dhcp-enabled>{{ server.dhcp.enabled }}</controller-dhcp-enabled>
+ <dhcp-dynamic-allocation-pool-enabled>{{ server.dhcp.dynamic_allocation_pool_enabled }}</dhcp-dynamic-allocation-pool-enabled>
+</dhcpservice-config>
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
index 38575111e..e0b495952 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/map.jinja
@@ -16,6 +16,10 @@
'enable_ha': false,
'ha_node_ips': [],
'ha_node_index': 0,
+ 'dhcp': {
+ 'enabled': false,
+ 'dynamic_allocation_pool_enabled': false,
+ },
'security_group_mode': 'stateful',
'vpp_routing_node': '',
'java_extra_opts': '-Djava.net.preferIPv4Stack=true -XX:+UseG1GC',
diff --git a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
index 206dc52a2..35ab35391 100644
--- a/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
+++ b/mcp/salt-formulas/salt-formula-opendaylight/opendaylight/server.sls
@@ -46,11 +46,6 @@ 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
- - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
service.running:
- enable: true
{%- if grains['saltversioninfo'] >= [2017, 7] %}
@@ -105,6 +100,17 @@ opendaylight:
- service: opendaylight
{%- endif %}
+{%- if server.dhcp.enabled %}
+/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-dhcpservice-config.xml:
+ file.managed:
+ - source: salt://opendaylight/files/netvirt-dhcpservice-config.xml
+ - makedirs: true
+ - watch_in:
+ - service: opendaylight
+ - use:
+ - file: /opt/opendaylight/etc/jetty.xml
+{%- endif %}
+
{%- if grains['cpuarch'] == 'aarch64' %}
opendaylight-leveldbjni:
pkg.installed
diff --git a/mcp/scripts/docker-compose/docker-compose.yaml.j2 b/mcp/scripts/docker-compose/docker-compose.yaml.j2
index 7099e4fda..ed0400da5 100644
--- a/mcp/scripts/docker-compose/docker-compose.yaml.j2
+++ b/mcp/scripts/docker-compose/docker-compose.yaml.j2
@@ -13,7 +13,7 @@ version: '2'
services:
opnfv-fuel-salt-master:
container_name: "fuel"
- image: "opnfv/fuel:saltmaster-reclass-latest"
+ image: "opnfv/fuel:saltmaster-reclass-{{ conf.MCP_DOCKER_TAG }}"
networks:
- mcpcontrol
- pxebr
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index cc88f9b54..6572074f5 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -493,6 +493,9 @@ function prepare_containers {
docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml down
+ if [ ! "${MCP_DOCKER_TAG}" = 'verify' ]; then
+ "${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml pull
+ fi
sudo rm -rf "${image_dir}/"{salt,hosts,pki} "${image_dir}/nodes/"*
mkdir -p "${image_dir}/salt/"{master.d,minion.d}
touch "${image_dir}/hosts"
@@ -502,7 +505,6 @@ function start_containers {
local image_dir=$1
[ -n "${image_dir}" ] || exit 1
docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
- "${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml pull
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml up -d
}