diff options
Diffstat (limited to 'deploy')
39 files changed, 546 insertions, 279 deletions
diff --git a/deploy/cloud/configure_nodes.py b/deploy/cloud/configure_nodes.py index 20ecc1724..ea50307b1 100644 --- a/deploy/cloud/configure_nodes.py +++ b/deploy/cloud/configure_nodes.py @@ -45,9 +45,6 @@ class ConfigureNodes(object): exec_cmd('fuel node set --node-id %s --role %s --env %s' % (node_id, roles_blade[0], self.env_id)) - # Download the unmodified default deployment configuration, because we - # need it for the network config. - self.download_deployment_config() for node_id, roles_blade in self.node_id_roles_dict.iteritems(): # Modify node attributes self.download_attributes(node_id) @@ -56,13 +53,18 @@ class ConfigureNodes(object): # Modify interfaces configuration self.download_interface_config(node_id) self.modify_node_interface(node_id, roles_blade) - self.modify_node_network_schemes(node_id, roles_blade) self.upload_interface_config(node_id) + # Currently not used, we use default deployment facts + # which are generated by fuel based on type segmentation + # and network to nic assignment + # # Download our modified deployment configuration, which includes our # changes to network topology etc. - self.download_deployment_config() - self.upload_deployment_config() + #self.download_deployment_config() + #for node_id, roles_blade in self.node_id_roles_dict.iteritems(): + # self.modify_node_network_schemes(node_id, roles_blade) + #self.upload_deployment_config() def modify_node_network_schemes(self, node_id, roles_blade): log('Modify network transformations for node %s' % node_id) @@ -71,14 +73,14 @@ class ConfigureNodes(object): deployment_dir = '%s/deployment_%s' % ( self.yaml_config_dir, self.env_id) backup(deployment_dir) - for node_file in glob.glob(deployment_dir + '/*_%s.yaml' % node_id): - with io.open(node_file) as stream: - node = yaml.load(stream) + node_file = ('%s/%s.yaml' % (deployment_dir, node_id)) + with io.open(node_file) as stream: + node = yaml.load(stream) - node['network_scheme'].update(transformations) + node['network_scheme'].update(transformations) - with io.open(node_file, 'w') as stream: - yaml.dump(node, stream, default_flow_style=False) + with io.open(node_file, 'w') as stream: + yaml.dump(node, stream, default_flow_style=False) def download_deployment_config(self): log('Download deployment config for environment %s' % self.env_id) @@ -129,6 +131,22 @@ class ConfigureNodes(object): with open(attributes_yaml, 'w') as stream: yaml.dump(result_attributes, stream, default_flow_style=False) + # interface configuration can + # looks like this: + # + # interfaces_dpdk: + # ens3: + # - fuelweb_admin + # ens4: + # - storage + # - management + # ens5: + # - interface_properties: + # dpdk: + # enabled: true + # - private + # ens6: + # - public def modify_node_interface(self, node_id, roles_blade): log('Modify interface config for node %s' % node_id) interface_yaml = ('%s/node_%s/interfaces.yaml' @@ -150,11 +168,21 @@ class ConfigureNodes(object): for interface in interfaces: interface['assigned_networks'] = [] if interface['name'] in interface_config: - for net_name in interface_config[interface['name']]: + for prop in interface_config[interface['name']]: net = {} - net['id'] = net_name_id[net_name] - net['name'] = net_name - interface['assigned_networks'].append(net) + #net name + if isinstance(prop, six.string_types): + net['id'] = net_name_id[prop] + net['name'] = prop + interface['assigned_networks'].append(net) + #network properties + elif isinstance(prop, dict): + if not 'interface_properties' in prop: + log('Interface configuration contain unknow dict: %s' % prop) + continue + interface['interface_properties'] = \ + self._merge_dicts(interface.get('interface_properties', {}), + prop.get('interface_properties', {})) with io.open(interface_yaml, 'w') as stream: yaml.dump(interfaces, stream, default_flow_style=False) diff --git a/deploy/common.py b/deploy/common.py index 353045867..80832e201 100644 --- a/deploy/common.py +++ b/deploy/common.py @@ -18,6 +18,7 @@ import shutil import stat import errno import time +import shlex N = {'id': 0, 'status': 1, 'name': 2, 'cluster': 3, 'ip': 4, 'mac': 5, 'roles': 6, 'pending_roles': 7, 'online': 8, 'group_id': 9} @@ -41,7 +42,7 @@ os.chmod(LOGFILE, 0664) def mask_arguments(cmd, mask_args, mask_str): - cmd_line = cmd.split() + cmd_line = shlex.split(cmd) for pos in mask_args: # Don't mask the actual command; also check if we don't reference # beyond bounds diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml index 0b8485ba0..c1a0606bc 100644 --- a/deploy/config/dea_base.yaml +++ b/deploy/config/dea_base.yaml @@ -636,43 +636,25 @@ settings: section: main universe multiverse suite: trusty type: deb - uri: http://archive.ubuntu.com/ubuntu/ + uri: http://10.20.0.2:8080/mirrors/ubuntu/ - name: ubuntu-updates priority: null section: main universe multiverse suite: trusty-updates type: deb - uri: http://archive.ubuntu.com/ubuntu/ + uri: http://10.20.0.2:8080/mirrors/ubuntu/ - name: ubuntu-security priority: null section: main universe multiverse suite: trusty-security type: deb - uri: http://archive.ubuntu.com/ubuntu/ + uri: http://10.20.0.2:8080/mirrors/ubuntu/ - name: mos priority: 1050 section: main restricted suite: mos9.0 type: deb uri: http://10.20.0.2:8080/mitaka-9.0/ubuntu/x86_64 - - name: mos-updates - priority: 1050 - section: main restricted - suite: mos9.0-updates - type: deb - uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/ - - name: mos-security - priority: 1050 - section: main restricted - suite: mos9.0-security - type: deb - uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/ - - name: mos-holdback - priority: 1100 - section: main restricted - suite: mos9.0-holdback - type: deb - uri: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/ - name: Auxiliary priority: 1150 section: main restricted diff --git a/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml index 985a2920c..32b2cfb22 100644 --- a/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml +++ b/deploy/config/labs/devel-pipeline/default/fuel/config/dea-pod-override.yaml @@ -25,42 +25,29 @@ interfaces_1: - private ens6: - public -transformations_1: - transformations: - - action: add-br - name: br-fw-admin - - action: add-br - name: br-mgmt - - action: add-br - name: br-storage - - action: add-br - name: br-ex - - action: add-br - name: br-floating - provider: ovs - - action: add-patch - bridges: - - br-floating - - br-ex - mtu: 65000 - provider: ovs - - action: add-br - name: br-mesh - - action: add-port - bridge: br-fw-admin - name: ens3 - - action: add-port - bridge: br-mgmt - name: ens4 - - action: add-port - bridge: br-storage - name: ens3.102 - - action: add-port - bridge: br-mesh - name: ens5.103 - - action: add-port - bridge: br-ex - name: ens6 +interfaces_dpdk: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + - interface_properties: + dpdk: + enabled: true + ens6: + - public +interfaces_vlan: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + ens6: + - public fuel: ADMIN_NETWORK: dhcp_pool_end: 10.20.0.254 diff --git a/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml index ad2f5ebde..0374c5d29 100644 --- a/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml +++ b/deploy/config/labs/devel-pipeline/default/fuel/config/dha.yaml @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## dha-pod-config-metadata: title: Deployment Hardware Adapter (DHA) for fuel development pipeline - default version version: 0.0.3 diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml index ce3b62af9..cb80e3855 100644 --- a/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml +++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dea-pod-override.yaml @@ -25,42 +25,29 @@ interfaces_1: - private ens6: - public -transformations_1: - transformations: - - action: add-br - name: br-fw-admin - - action: add-br - name: br-mgmt - - action: add-br - name: br-storage - - action: add-br - name: br-ex - - action: add-br - name: br-floating - provider: ovs - - action: add-patch - bridges: - - br-floating - - br-ex - mtu: 65000 - provider: ovs - - action: add-br - name: br-mesh - - action: add-port - bridge: br-fw-admin - name: ens3 - - action: add-port - bridge: br-mgmt - name: ens4 - - action: add-port - bridge: br-storage - name: ens3.102 - - action: add-port - bridge: br-mesh - name: ens5.103 - - action: add-port - bridge: br-ex - name: ens6 +interfaces_dpdk: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + - interface_properties: + dpdk: + enabled: true + ens6: + - public +interfaces_vlan: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + ens6: + - public fuel: ADMIN_NETWORK: dhcp_pool_end: 10.20.0.254 diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml index 3c246c11c..c2352f924 100644 --- a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml +++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## dha-pod-config-metadata: title: Deployment Hardware Adapter (DHA) for fuel development pipeline - Ericsson ELX version version: 0.0.3 diff --git a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml index 736e9af3c..92cc0e616 100644 --- a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml +++ b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dea-pod-override.yaml @@ -25,42 +25,29 @@ interfaces_1: - private ens6: - public -transformations_1: - transformations: - - action: add-br - name: br-fw-admin - - action: add-br - name: br-mgmt - - action: add-br - name: br-storage - - action: add-br - name: br-ex - - action: add-br - name: br-floating - provider: ovs - - action: add-patch - bridges: - - br-floating - - br-ex - mtu: 65000 - provider: ovs - - action: add-br - name: br-mesh - - action: add-port - bridge: br-fw-admin - name: ens3 - - action: add-port - bridge: br-mgmt - name: ens4 - - action: add-port - bridge: br-storage - name: ens3.102 - - action: add-port - bridge: br-mesh - name: ens5.103 - - action: add-port - bridge: br-ex - name: ens6 +interfaces_dpdk: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + - interface_properties: + dpdk: + enabled: true + ens6: + - public +interfaces_vlan: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + ens6: + - public fuel: ADMIN_NETWORK: dhcp_pool_end: 10.20.0.254 diff --git a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml index f2aeabd4c..d8f904362 100644 --- a/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml +++ b/deploy/config/labs/devel-pipeline/huawei-ch/fuel/config/dha.yaml @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## dha-pod-config-metadata: title: Deployment Hardware Adapter (DHA) for fuel development pipeline - default version version: 0.0.4 diff --git a/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml new file mode 100644 index 000000000..ed7c63fac --- /dev/null +++ b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dea-pod-override.yaml @@ -0,0 +1,251 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +dea-pod-override-config-metadata: + title: 'Deployment Environment Adapter POD override for Development Pipeline - Intel Santa Clara, CA, USA version' + version: '0.1' + created: 'Wed Sept 7 2016' + comment: 'For Fuel 9' +environment: + name: opnfv_virt +interfaces_1: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + ens6: + - public +interfaces_dpdk: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + - interface_properties: + dpdk: + enabled: true + ens6: + - public +interfaces_vlan: + ens3: + - fuelweb_admin + - storage + ens4: + - management + ens5: + - private + ens6: + - public +fuel: + ADMIN_NETWORK: + dhcp_pool_end: 10.20.0.254 + dhcp_pool_start: 10.20.0.3 + ipaddress: 10.20.0.2 + netmask: 255.255.255.0 + ssh_network: 10.20.0.0/24 + DNS_DOMAIN: domain.tld + DNS_SEARCH: domain.tld + DNS_UPSTREAM: 10.248.2.1 + HOSTNAME: fuel + NTP1: 10.20.0.1 + NTP2: null + NTP3: null +network: + networking_parameters: + base_mac: fa:16:3e:00:00:00 + configuration_template: null + dns_nameservers: + - 10.248.2.1 + floating_name: admin_floating_net + floating_ranges: + - - 172.16.0.130 + - 172.16.0.254 + gre_id_range: + - 2 + - 65535 + internal_cidr: 192.168.111.0/24 + internal_gateway: 192.168.111.1 + internal_name: admin_internal_net + net_l23_provider: ovs + segmentation_type: tun + vlan_range: + - 1000 + - 1030 + networks: + - cidr: 192.168.1.0/24 + gateway: null + ip_ranges: + - - 192.168.1.1 + - 192.168.1.254 + meta: + cidr: 192.168.1.0/24 + configurable: true + map_priority: 2 + name: storage + notation: cidr + render_addr_mask: storage + render_type: cidr + use_gateway: false + vlan_start: 102 + name: storage + vlan_start: 102 + - cidr: 192.168.0.0/24 + gateway: null + ip_ranges: + - - 192.168.0.1 + - 192.168.0.253 + meta: + cidr: 192.168.0.0/24 + configurable: true + map_priority: 2 + name: management + notation: ip_ranges + render_addr_mask: internal + render_type: cidr + use_gateway: false + vips: + - haproxy + - vrouter + vlan_start: null + name: management + vlan_start: null + - cidr: 192.168.2.0/24 + gateway: null + ip_ranges: + - - 192.168.2.1 + - 192.168.2.254 + meta: + cidr: 192.168.2.0/24 + configurable: true + map_priority: 2 + name: private + notation: cidr + render_addr_mask: null + render_type: cidr + seg_type: tun + use_gateway: false + vlan_start: 103 + name: private + vlan_start: 103 + - cidr: 172.16.0.0/24 + gateway: 172.16.0.1 + ip_ranges: + - - 172.16.0.2 + - 172.16.0.126 + meta: + cidr: 172.16.0.0/24 + configurable: true + floating_range_var: floating_ranges + ip_range: + - 172.16.0.2 + - 172.16.0.126 + map_priority: 1 + name: public + notation: ip_ranges + render_addr_mask: public + render_type: null + use_gateway: true + vips: + - haproxy + - vrouter + vlan_start: null + name: public + vlan_start: null + - cidr: 10.20.0.0/24 + gateway: 10.20.0.2 + ip_ranges: + - - 10.20.0.3 + - 10.20.0.254 + meta: + configurable: false + map_priority: 0 + notation: ip_ranges + render_addr_mask: null + render_type: null + unmovable: true + use_gateway: true + name: fuelweb_admin + vlan_start: null +settings: + editable: + external_dns: + dns_list: + description: List of upstream DNS servers + label: DNS list + max: 3 + regex: + error: Invalid IP address + source: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ + type: text_list + value: + - 147.214.6.234 + weight: 10 + metadata: + group: network + label: Host OS DNS Servers + weight: 30 + external_ntp: + metadata: + group: network + label: Host OS NTP Servers + weight: 40 + ntp_list: + description: List of upstream NTP servers + label: NTP server list + regex: + error: Invalid NTP server + source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$ + type: text_list + value: + - 10.20.0.1 + weight: 10 + syslog: + metadata: + enabled: false + group: logging + label: Syslog + toggleable: true + weight: 50 + syslog_port: + description: Remote syslog port + label: Port + regex: + error: Invalid syslog port + source: ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$ + type: text + value: '514' + weight: 20 + syslog_server: + description: Remote syslog hostname + label: Hostname + regex: + error: Invalid hostname + source: ^[a-zA-Z\d]+[-\.\da-zA-Z]*$ + type: text + value: '' + weight: 10 + syslog_transport: + label: Syslog transport protocol + type: radio + value: tcp + values: + - data: udp + description: '' + label: UDP + - data: tcp + description: '' + label: TCP + weight: 30 + diff --git a/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml new file mode 100644 index 000000000..837293950 --- /dev/null +++ b/deploy/config/labs/devel-pipeline/intel-sc/fuel/config/dha.yaml @@ -0,0 +1,110 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# stefan.k.berg@ericsson.com +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +dha-pod-config-metadata: + title: Deployment Hardware Adapter (DHA) for fuel development pipeline - Intel Santa Clara, CA. USA version + version: 0.0.1 + created: Sept 7 2016 + comment: Intel Santa Clara, CA, USA Fuel 9 version + +# Adapter to use for this definition +adapter: libvirt + +# Node list. +# Mandatory property is id, all other properties are adapter specific. + +nodes: +- id: 1 + libvirtName: controller1 + libvirtTemplate: templates/virtual_environment/vms/controller.xml +- id: 2 + libvirtName: compute1 + libvirtTemplate: templates/virtual_environment/vms/compute.xml +- id: 3 + libvirtName: compute2 + libvirtTemplate: templates/virtual_environment/vms/compute.xml +- id: 4 + libvirtName: compute3 + libvirtTemplate: templates/virtual_environment/vms/compute.xml +- id: 5 + libvirtName: fuel-master + libvirtTemplate: templates/virtual_environment/vms/fuel.xml + isFuel: yes + username: root + password: r00tme + +virtNetConfDir: templates/virtual_environment/networks + +disks: + fuel: 100G + controller: 100G + compute: 100G + +# Here the infrastructure VMs can be defined. +# The entries are not mandatory! If it is left empty +# the default defined in deploy/templates will +# be used. +define_vms: + fuel: + vcpu: + value: 2 + memory: + attribute_equlas: + unit: KiB + value: 8388608 + currentMemory: + attribute_equlas: + unit: KiB + value: 8388608 + devices: + interface: + # With attribute_equlas someone can define which + # interface type is meant + attribute_equlas: + type: network + # This will overwrite the type of the model of + # the interface + model: + attribute: + type: virtio + controller: + vcpu: + value: 4 + memory: + attribute_equlas: + unit: KiB + value: 10485760 + currentMemory: + attribute_equlas: + unit: KiB + value: 10485760 + devices: + interface: + attribute_equlas: + type: network + model: + attribute: + type: e1000 + compute: + memory: + attribute_equlas: + unit: KiB + value: 6291456 + currentMemory: + attribute_equlas: + unit: KiB + value: 6291456 + devices: + interface: + attribute_equlas: + type: network + model: + attribute: + type: e1000 + diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml index 21bcdf170..f7ab89b37 100644 --- a/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml +++ b/deploy/config/plugins/fuel-bgpvpn_0.0.2.yaml @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## plugin-config-metadata: title: BGPVPN fuel Plugin configuration template version: 0.2 diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml index adca822fc..aeea9e450 100644 --- a/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml +++ b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## plugin-config-metadata: title: BGPVPN fuel Plugin configuration template version: 0.3 diff --git a/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml b/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml index bbdefaf6e..1aa1259ca 100644 --- a/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml +++ b/deploy/config/plugins/fuel-bgpvpn_0.9.0.yaml @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# jonas.bjurel@ericsson.com +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## plugin-config-metadata: title: BGPVPN fuel Plugin configuration template version: 0.9.0 diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py index 436002d36..8896080db 100644 --- a/deploy/deploy-config.py +++ b/deploy/deploy-config.py @@ -137,7 +137,6 @@ def merge_networks(list_1, list_2): return [new_nets.get(net.get('name'), net) for net in list_1] - def merge_dicts(dict1, dict2): for k in set(dict1).union(dict2): if k in dict1 and k in dict2: diff --git a/deploy/dha_adapters/zte_adapter.py b/deploy/dha_adapters/zte_adapter.py index a40a02685..da651ca15 100644 --- a/deploy/dha_adapters/zte_adapter.py +++ b/deploy/dha_adapters/zte_adapter.py @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2015 Ericsson AB and others. +# Copyright (c) 2016 Ericsson AB, ZTE and others. # szilard.cserey@ericsson.com # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 @@ -24,27 +24,9 @@ class ZteAdapter(IpmiAdapter): super(ZteAdapter, self).__init__(yaml_path, attempts) def node_reset(self, node_id): - WAIT_LOOP = 600 log('RESET Node %s' % node_id) - cmd_prefix = self.ipmi_cmd(node_id) - state = exec_cmd('%s chassis power status' % cmd_prefix, mask_args=[8,10]) - if state == 'Chassis Power is on': - was_shut_off = False - done = False - exec_cmd('%s chassis power cycle' % cmd_prefix, mask_args=[8,10]) - for i in range(WAIT_LOOP): - state, _ = exec_cmd('%s chassis power status' % cmd_prefix, - check=False, - mask_args=[8,10]) - if state == 'Chassis Power is off': - was_shut_off = True - elif state == 'Chassis Power is on' and was_shut_off: - done = True - break - time.sleep(1) - if not done: - err('Could Not RESET Node %s' % node_id) - else: - err('Cannot RESET Node %s because it\'s not Active, state: %s' - % (node_id, state)) + cmd = '%s chassis power cycle' % self.ipmi_cmd(node_id) + exec_cmd(cmd, attempts=self.attempts, delay=self.delay, + verbose=True, + mask_args=[8,10]) diff --git a/deploy/reap.py b/deploy/reap.py index eb02fe25d..69c98d10c 100644 --- a/deploy/reap.py +++ b/deploy/reap.py @@ -18,6 +18,7 @@ import shutil import tempfile import re import netaddr +import templater from common import ( N, @@ -79,8 +80,6 @@ DHA_2 = ''' # which may not be correct - please adjust as needed. ''' -TEMPLATER = 'templater.py' - DISKS = {'fuel': '100G', 'controller': '100G', 'compute': '100G'} @@ -353,8 +352,10 @@ class Reap(object): self.download_config('network') def create_base_dea(self): - exec_cmd('python %s %s %s %s' - % (TEMPLATER, self.dea_file, self.template, self.base_dea)) + templater = templater.Templater(self.dea_file, + self.template, + self.base_dea) + templater.run() def finale(self): log('DEA file is available at %s' % self.dea_file) diff --git a/deploy/scenario/README b/deploy/scenario/README index 3472f6630..e32262d0d 100644 --- a/deploy/scenario/README +++ b/deploy/scenario/README @@ -93,23 +93,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller,opendaylight - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: diff --git a/deploy/scenario/ha_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_heat_ceilometer_scenario.yaml index 8ab5f9277..4051c478a 100644 --- a/deploy/scenario/ha_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_heat_ceilometer_scenario.yaml @@ -41,23 +41,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo, controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: nodes: diff --git a/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml index 828569bb7..1217f7273 100644 --- a/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_nfv-kvm_heat_ceilometer_scenario.yaml @@ -46,23 +46,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,mongo - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: compute,ceph-osd - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: compute,ceph-osd - transformations: transformations_1 settings: editable: diff --git a/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml index 6ececba6c..51deb4e28 100644 --- a/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_nfv-ovs_heat_ceilometer_scenario.yaml @@ -54,26 +54,21 @@ dea-override-config: net_segment_type: vlan nodes: - id: 1 - interfaces: interfaces_dpdk + interfaces: interfaces_vlan role: controller - transformations: transformations_vlan - id: 2 - interfaces: interfaces_dpdk + interfaces: interfaces_vlan role: mongo,controller - transformations: transformations_vlan - id: 3 - interfaces: interfaces_dpdk + interfaces: interfaces_vlan role: ceph-osd,controller - transformations: transformations_vlan - id: 4 interfaces: interfaces_dpdk role: ceph-osd,compute - transformations: transformations_dpdk attributes: attributes_1 - id: 5 interfaces: interfaces_dpdk role: ceph-osd,compute - transformations: transformations_dpdk attributes: attributes_1 attributes_1: @@ -82,7 +77,7 @@ dea-override-config: value: 128 nova: value: - '2048': 256 + '2048': 1024 network: networking_parameters: diff --git a/deploy/scenario/ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml index 2257cbb70..7d52e77e2 100644 --- a/deploy/scenario/ha_odl-bgpvpn_scenario.yaml +++ b/deploy/scenario/ha_odl-bgpvpn_scenario.yaml @@ -59,23 +59,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,opendaylight - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: diff --git a/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml index 0d16a3d65..90c89aedc 100644 --- a/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_odl-l2_heat_ceilometer_scenario.yaml @@ -60,23 +60,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,opendaylight - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: nodes: diff --git a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml index a900720f9..e6aef2aba 100644 --- a/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_odl-l2_sfc_heat_ceilometer_scenario.yaml @@ -76,23 +76,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,opendaylight - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: nodes: - id: 1 diff --git a/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml index e222582d2..0dda3b3ca 100644 --- a/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_odl-l3_heat_ceilometer_scenario.yaml @@ -66,23 +66,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,opendaylight - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml index cb46af569..f813458d0 100644 --- a/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_onos_nofeature_heat_ceilometer_scenario.yaml @@ -67,23 +67,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,onos - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml index e9dd0e196..32fbfcf6c 100644 --- a/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_onos_sfc_heat_ceilometer_scenario.yaml @@ -47,23 +47,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller,onos - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml index dc7868b56..d1d5191f0 100644 --- a/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/ha_vlan_heat_ceilometer_scenario.yaml @@ -45,23 +45,18 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,controller - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 5 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: diff --git a/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml index c21585979..3dd5f841e 100644 --- a/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_heat_ceilometer_scenario.yaml @@ -41,19 +41,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: # disks: diff --git a/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml index 779c6e14a..4661a263d 100644 --- a/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_nfv-kvm_heat_ceilometer_scenario.yaml @@ -48,19 +48,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: compute - transformations: transformations_1 settings: editable: diff --git a/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml index 56251215a..87364e83a 100644 --- a/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_nfv-kvm_nfv-ovs_heat_ceilometer_scenario.yaml @@ -55,19 +55,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_2 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_2 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_2 settings: editable: additional_components: diff --git a/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml index f7b69a50f..7ab76cbcf 100644 --- a/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_nfv-ovs_heat_ceilometer_scenario.yaml @@ -54,23 +54,19 @@ dea-override-config: net_segment_type: vlan nodes: - id: 1 - interfaces: interfaces_dpdk + interfaces: interfaces_vlan role: mongo,controller - transformations: transformations_vlan - id: 2 interfaces: interfaces_dpdk role: ceph-osd,compute - transformations: transformations_dpdk attributes: attributes_1 - id: 3 interfaces: interfaces_dpdk role: ceph-osd,compute - transformations: transformations_dpdk attributes: attributes_1 - id: 4 interfaces: interfaces_dpdk role: ceph-osd,compute - transformations: transformations_dpdk attributes: attributes_1 attributes_1: @@ -79,7 +75,7 @@ dea-override-config: value: 128 nova: value: - '2048': 256 + '2048': 1024 network: networking_parameters: diff --git a/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml index 08b46feca..6f21ea2c8 100644 --- a/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml +++ b/deploy/scenario/no-ha_odl-bgpvpn_scenario.yaml @@ -60,19 +60,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,opendaylight - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: # disks: diff --git a/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml index e90f7e720..f8787d780 100644 --- a/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_odl-l2_heat_ceilometer_scenario.yaml @@ -61,19 +61,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,opendaylight - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: # disks: diff --git a/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml index 218378de3..a8d9ed848 100644 --- a/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_odl-l2_sfc_heat_ceilometer_scenario.yaml @@ -77,19 +77,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,opendaylight - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 dha-override-config: # disks: diff --git a/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml index 7fa7829f2..5f800abad 100644 --- a/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_odl-l3_heat_ceilometer_scenario.yaml @@ -66,19 +66,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,opendaylight - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml index c6f07a73c..f5c00f0c9 100644 --- a/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_onos_nofeature_heat_ceilometer_scenario.yaml @@ -68,19 +68,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller,onos - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml index 80d73b335..587346ef4 100644 --- a/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_onos_sfc_heat_ceilometer_scenario.yaml @@ -48,19 +48,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller,onos - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: public_network_assignment: diff --git a/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml index 5df530f42..567ea9867 100644 --- a/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml +++ b/deploy/scenario/no-ha_vlan_heat_ceilometer_scenario.yaml @@ -45,19 +45,15 @@ dea-override-config: - id: 1 interfaces: interfaces_1 role: mongo,controller - transformations: transformations_1 - id: 2 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 3 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 - id: 4 interfaces: interfaces_1 role: ceph-osd,compute - transformations: transformations_1 settings: editable: additional_components: |