summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apex/overcloud/config.py3
-rw-r--r--apex/overcloud/deploy.py32
-rw-r--r--apex/tests/test_apex_overcloud_deploy.py10
-rwxr-xr-xbuild/barometer-install.sh5
-rwxr-xr-xbuild/overcloud-full.sh4
-rw-r--r--ci/PR_revision.log3
-rw-r--r--docs/release/installation/baremetal.rst4
-rw-r--r--docs/release/installation/virtual.rst2
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml28
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml10
10 files changed, 77 insertions, 24 deletions
diff --git a/apex/overcloud/config.py b/apex/overcloud/config.py
index a7f7d84..b0cbb18 100644
--- a/apex/overcloud/config.py
+++ b/apex/overcloud/config.py
@@ -66,9 +66,6 @@ def create_nic_template(network_settings, deploy_settings, role, template_dir,
nets['tenant']['nic_mapping'][role]['interface-options'] =\
ds['performance'][role.title()]['vpp']['interface-options']
- if role == 'controller' and ds.get('sfc', None):
- ext_net = 'interface'
-
template_output = template.render(
nets=nets,
role=role,
diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py
index 3ddb5f4..5c95796 100644
--- a/apex/overcloud/deploy.py
+++ b/apex/overcloud/deploy.py
@@ -71,14 +71,37 @@ ODL_NETVIRT_VPP_RPM = "/root/opendaylight-7.0.0-0.1.20170531snap665.el7" \
def build_sdn_env_list(ds, sdn_map, env_list=None):
+ """
+ Builds a list of SDN environment files to be used in the deploy cmd.
+
+ This function recursively searches an sdn_map. First the sdn controller is
+ matched and then the function looks for enabled features for that
+ controller to determine which environment files should be used. By
+ default the feature will be checked if set to true in deploy settings to be
+ added to the list. If a feature does not have a boolean value, then the
+ key and value pair to compare with are checked as a tuple (k,v).
+
+ :param ds: deploy settings
+ :param sdn_map: SDN map to recursively search
+ :param env_list: recursive var to hold previously found env_list
+ :return: A list of env files
+ """
if env_list is None:
env_list = list()
for k, v in sdn_map.items():
if ds['sdn_controller'] == k or (k in ds and ds[k] is True):
if isinstance(v, dict):
+ # Append default SDN env file first
+ # The assumption is that feature-enabled SDN env files
+ # override and do not conflict with previously set default
+ # settings
+ if ds['sdn_controller'] == k and 'default' in v:
+ env_list.append(os.path.join(con.THT_ENV_DIR,
+ v['default']))
env_list.extend(build_sdn_env_list(ds, v))
else:
env_list.append(os.path.join(con.THT_ENV_DIR, v))
+ # check if the value is not a boolean
elif isinstance(v, tuple):
if ds[k] == v[0]:
env_list.append(os.path.join(con.THT_ENV_DIR, v[1]))
@@ -129,7 +152,7 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir,
elif num_control > 1 and not ds['global_params']['ha_enabled']:
num_control = 1
cmd = "openstack overcloud deploy --templates --timeout {} " \
- "--libvirt-type kvm".format(con.DEPLOY_TIMEOUT)
+ .format(con.DEPLOY_TIMEOUT)
# build cmd env args
for option in deploy_options:
cmd += " -e {}".format(option)
@@ -139,6 +162,13 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir,
cmd += ' --control-flavor control --compute-flavor compute'
if net_data:
cmd += ' --networks-file network_data.yaml'
+ libvirt_type = 'kvm'
+ if virtual:
+ with open('/sys/module/kvm_intel/parameters/nested') as f:
+ nested_kvm = f.read().strip()
+ if nested_kvm != 'Y':
+ libvirt_type = 'qemu'
+ cmd += ' --libvirt-type {}'.format(libvirt_type)
logging.info("Deploy command set: {}".format(cmd))
with open(os.path.join(tmp_dir, 'deploy_command'), 'w') as fh:
diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py
index 59e9048..8ff98a8 100644
--- a/apex/tests/test_apex_overcloud_deploy.py
+++ b/apex/tests/test_apex_overcloud_deploy.py
@@ -7,6 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+import os
import sys
import unittest
@@ -26,6 +27,7 @@ from apex.overcloud.deploy import generate_ceph_key
from apex.overcloud.deploy import prep_storage_env
from apex.overcloud.deploy import external_network_cmds
from apex.overcloud.deploy import create_congress_cmds
+from apex.overcloud.deploy import SDN_FILE_MAP
from nose.tools import (
assert_regexp_matches,
@@ -70,6 +72,14 @@ class TestOvercloudDeploy(unittest.TestCase):
res = '/usr/share/openstack-tripleo-heat-templates/environments/test'
assert_equal(build_sdn_env_list(ds, sdn_map), [res])
+ def test_build_sdn_env_list_with_default(self):
+ ds = {'sdn_controller': 'opendaylight',
+ 'vpn': True}
+ prefix = '/usr/share/openstack-tripleo-heat-templates/environments'
+ res = [os.path.join(prefix, 'neutron-opendaylight.yaml'),
+ os.path.join(prefix, 'neutron-bgpvpn-opendaylight.yaml')]
+ assert_equal(build_sdn_env_list(ds, SDN_FILE_MAP), res)
+
@patch('apex.overcloud.deploy.prep_storage_env')
@patch('apex.overcloud.deploy.build_sdn_env_list')
@patch('builtins.open', mock_open())
diff --git a/build/barometer-install.sh b/build/barometer-install.sh
index 15753a4..ca9b79c 100755
--- a/build/barometer-install.sh
+++ b/build/barometer-install.sh
@@ -29,7 +29,7 @@ GETFLAG="--no-check-certificate"
# Locations of repos
ARTIFACTS_BAROM="artifacts.opnfv.org/barometer"
COLLECTD_OPENSTACK_REPO="https://github.com/openstack/collectd-ceilometer-plugin"
-PUPPET_BAROMETER_REPO="https://github.com/johnhinman/puppet-barometer"
+PUPPET_BAROMETER_REPO="https://github.com/opnfv/barometer.git"
# upload barometer packages tar, extract, and install
@@ -87,7 +87,8 @@ function barometer_pkgs {
# get the barometer puppet module and tar it
rm -rf puppet-barometer
- git clone $PUPPET_BAROMETER_REPO
+ git clone $PUPPET_BAROMETER_REPO puppet-barometer
+ cd puppet-barometer
pushd puppet-barometer/ > /dev/null
git archive --format=tar.gz HEAD > ${BUILD_DIR}/puppet-barometer.tar.gz
popd > /dev/null
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 098ab02..1b7843a 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -109,8 +109,8 @@ cat > ${BUILD_DIR}/kubernetes.repo << EOF
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
-gpgcheck=1
-repo_gpgcheck=1
+gpgcheck=0
+repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
diff --git a/ci/PR_revision.log b/ci/PR_revision.log
index b83ca40..2472911 100644
--- a/ci/PR_revision.log
+++ b/ci/PR_revision.log
@@ -10,4 +10,5 @@ apex-puppet-tripleo, Ie336c22b366bd478963ca14e25d645fec0cded7a
apex-tripleo-heat-templates, I0749ed6e0d27bd4c9a5bb19657579d400501d09e
apex-puppet-tripleo, I486c4045e29c7032526be6e19d11e7979070c2d9
-apex-os-net-config, Idaf03d78d2ce657ac484c1285a795d98760d0112 \ No newline at end of file
+apex-os-net-config, Idaf03d78d2ce657ac484c1285a795d98760d0112
+apex-tripleo-heat-templates, Ib94b0182fd5fbc3a254cae5862a82982bf3131be
diff --git a/docs/release/installation/baremetal.rst b/docs/release/installation/baremetal.rst
index 49997f8..17223df 100644
--- a/docs/release/installation/baremetal.rst
+++ b/docs/release/installation/baremetal.rst
@@ -88,7 +88,7 @@ Install Bare Metal Jump Host
``sudo yum install https://repos.fedorapeople.org/repos/openstack/openstack-pike/rdo-release-pike-1.noarch.rpm``
``sudo yum install epel-release``
- ``sudo curl -o /etc/yum/repos.d/opnfv-apex.repo http://artifacts.opnfv.org/apex/euphrates/opnfv-apex.repo``
+ ``sudo curl -o /etc/yum.repos.d/opnfv-apex.repo http://artifacts.opnfv.org/apex/euphrates/opnfv-apex.repo``
The RDO Project release repository is needed to install OpenVSwitch, which
is a dependency of opnfv-apex. If you do not have external connectivity to
@@ -224,7 +224,7 @@ Follow the steps below to execute:
network_settings.yaml allows you to customize your networking topology.
Note it can also be useful to run the command with the ``--debug``
argument which will enable a root login on the overcloud nodes with
- password: 'opnfv-apex'. It is also useful in some cases to surround the
+ password: 'opnfvapex'. It is also useful in some cases to surround the
deploy command with ``nohup``. For example:
``nohup <deploy command> &``, will allow a deployment to continue even if
ssh access to the Jump Host is lost during deployment.
diff --git a/docs/release/installation/virtual.rst b/docs/release/installation/virtual.rst
index 9336b8e..2da8ccf 100644
--- a/docs/release/installation/virtual.rst
+++ b/docs/release/installation/virtual.rst
@@ -80,7 +80,7 @@ Follow the steps below to execute:
-n network_settings.yaml -d deploy_settings.yaml``
Note it can also be useful to run the command with the ``--debug``
argument which will enable a root login on the overcloud nodes with
- password: 'opnfv-apex'. It is also useful in some cases to surround the
+ password: 'opnfvapex'. It is also useful in some cases to surround the
deploy command with ``nohup``. For example:
``nohup <deploy command> &``, will allow a deployment to continue even if
ssh access to the Jump Host is lost during deployment.
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
index d274967..545ee33 100644
--- a/lib/ansible/playbooks/deploy_dependencies.yml
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -54,18 +54,24 @@
name: default
autostart: yes
state: active
- - lineinfile:
- path: /etc/modprobe.d/kvm_intel.conf
- line: 'options kvm-intel nested=1'
- create: yes
- when: ansible_architecture == "x86_64"
- - modprobe:
- name: "{{ item }}"
- state: present
- with_items:
- - kvm
- - kvm_intel
+ - shell: cat /sys/module/kvm_intel/parameters/nested || true
+ register: nested_result
when: ansible_architecture == "x86_64"
+ - name: reload kvm_intel
+ block:
+ - lineinfile:
+ path: /etc/modprobe.d/kvm_intel.conf
+ line: 'options kvm-intel nested=1'
+ create: yes
+ - modprobe:
+ name: kvm_intel
+ state: absent
+ - modprobe:
+ name: kvm_intel
+ state: present
+ when:
+ - ansible_architecture == "x86_64"
+ - "'Y' not in nested_result.stdout"
- name: Generate SSH key for root if missing
shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
- name: Check that /u/l/python3.4/site-packages/virtualbmc/vbmc.py exists
diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml
index 4d55c8f..b2d9234 100644
--- a/lib/ansible/playbooks/deploy_overcloud.yml
+++ b/lib/ansible/playbooks/deploy_overcloud.yml
@@ -35,10 +35,18 @@
state: restarted
enabled: yes
become: yes
+ - name: Remove Ceph OSD from ceph storage role
+ lineinfile:
+ path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml
+ line: ' - OS::TripleO::Services::CephOSD'
+ owner: root
+ group: root
+ state: absent
+ become: yes
- name: Insert Ceph OSDs into Compute role
lineinfile:
path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml
- insertbefore: 'OS::TripleO::Services::NovaCompute'
+ insertbefore: '^\s*-\sOS::TripleO::Services::NovaCompute$'
line: ' - OS::TripleO::Services::CephOSD'
owner: root
group: root