Merge "Local Documentation Builds"
authorTim Rozet <trozet@redhat.com>
Tue, 2 Oct 2018 20:43:35 +0000 (20:43 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 2 Oct 2018 20:43:35 +0000 (20:43 +0000)
21 files changed:
apex/build_utils.py
apex/builders/common_builder.py
apex/common/constants.py
apex/overcloud/deploy.py
apex/tests/test_apex_build_utils.py
build/csit-rocky-environment.yaml [new file with mode: 0644]
build/rpm_specs/opnfv-apex.spec
config/deploy/common-patches.yaml
config/deploy/os-nosdn-calipso_rocky-noha.yaml [moved from config/deploy/os-nosdn-calipso_queens-noha.yaml with 87% similarity]
config/deploy/os-nosdn-rocky-ha.yaml [moved from config/deploy/os-nosdn-queens-ha.yaml with 88% similarity]
config/deploy/os-nosdn-rocky-noha.yaml [moved from config/deploy/os-nosdn-queens-noha.yaml with 88% similarity]
config/deploy/os-odl-bgpvpn_rocky-ha.yaml [moved from config/deploy/os-odl-bgpvpn_queens-ha.yaml with 89% similarity]
config/deploy/os-odl-bgpvpn_rocky-noha.yaml [moved from config/deploy/os-odl-bgpvpn_queens-noha.yaml with 89% similarity]
config/deploy/os-odl-rocky-ha.yaml [new file with mode: 0644]
config/deploy/os-odl-rocky-noha.yaml [new file with mode: 0644]
config/deploy/os-odl-sfc_rocky-ha.yaml [moved from config/deploy/os-odl-sfc_queens-ha.yaml with 89% similarity]
config/deploy/os-odl-sfc_rocky-noha.yaml [moved from config/deploy/os-odl-sfc_queens-noha.yaml with 89% similarity]
config/deploy/os-ovn-nofeature-ha.yaml [new file with mode: 0644]
config/deploy/os-ovn-nofeature-noha.yaml [deleted file]
config/deploy/os-ovn-rocky-ha.yaml [new file with mode: 0644]
lib/ansible/playbooks/post_deploy_overcloud.yml

index 7846787..7457e56 100644 (file)
@@ -111,6 +111,19 @@ def strip_patch_sections(patch, sections=['releasenotes', 'tests']):
     return '\n'.join(tmp_patch)
 
 
+def is_path_in_patch(patch, path):
+    """
+    Checks if a particular path is modified in a patch diff
+    :param patch: patch diff
+    :param path: path to check for in diff
+    :return: Boolean
+    """
+    for line in patch.split("\n"):
+        if re.match('^diff.*{}'.format(path), line):
+            return True
+    return False
+
+
 def get_patch(change_id, repo, branch, url=con.OPENSTACK_GERRIT):
     logging.info("Fetching patch for change id {}".format(change_id))
     change = get_change(url, repo, branch, change_id)
index a5f301b..b8894ec 100644 (file)
@@ -25,10 +25,11 @@ from apex.common import utils
 from apex.virtual import utils as virt_utils
 
 
-def project_to_path(project):
+def project_to_path(project, patch=None):
     """
     Translates project to absolute file path to use in patching
     :param project: name of project
+    :param patch: the patch to applied to the project
     :return: File path
     """
     if project.startswith('openstack/'):
@@ -37,6 +38,15 @@ def project_to_path(project):
         return "/etc/puppet/modules/{}".format(project.replace('puppet-', ''))
     elif 'tripleo-heat-templates' in project:
         return "/usr/share/openstack-tripleo-heat-templates"
+    elif ('tripleo-common' in project and
+          build_utils.is_path_in_patch(patch, 'container-images/')):
+        # tripleo-common has python and another component to it
+        # here we detect if there is a change to the yaml component and if so
+        # treat it like it is not python. This has the caveat of if there
+        # is a patch to both python and yaml this will not work
+        # FIXME(trozet): add ability to split tripleo-common patches that
+        # modify both python and yaml
+        return "/usr/share/openstack-tripleo-common-containers/"
     else:
         # assume python.  python patches will apply to a project name subdir.
         # For example, python-tripleoclient patch will apply to the
@@ -157,7 +167,7 @@ def add_upstream_patches(patches, image, tmp_dir,
             branch = default_branch
         patch_diff = build_utils.get_patch(patch['change-id'],
                                            patch['project'], branch)
-        project_path = project_to_path(patch['project'])
+        project_path = project_to_path(patch['project'], patch_diff)
         # If docker tag and python we know this patch belongs on docker
         # container for a docker service. Therefore we build the dockerfile
         # and move the patch into the containers directory.  We also assume
index 0475615..5a2b7f9 100644 (file)
@@ -39,10 +39,7 @@ VIRT_PW = '--root-password'
 
 THT_DIR = '/usr/share/openstack-tripleo-heat-templates'
 THT_ENV_DIR = os.path.join(THT_DIR, 'environments')
-THT_DOCKER_ENV_DIR = {
-    'master': os.path.join(THT_ENV_DIR, 'services'),
-    'queens': os.path.join(THT_ENV_DIR, 'services')
-}
+THT_DOCKER_ENV_DIR = os.path.join(THT_ENV_DIR, 'services')
 
 DEFAULT_OS_VERSION = 'master'
 DEFAULT_ODL_VERSION = 'oxygen'
@@ -65,7 +62,7 @@ VALID_DOCKER_SERVICES = {
     'neutron-opendaylight-sriov.yaml': None,
     'neutron-bgpvpn-opendaylight.yaml': None,
     'neutron-sfc-opendaylight.yaml': None,
-    'neutron-ml2-ovn.yaml': 'neutron-ovn.yaml'
+    'neutron-ml2-ovn.yaml': 'neutron-ovn-ha.yaml'
 }
 DOCKERHUB_OOO = 'https://registry.hub.docker.com/v2/repositories' \
                 '/tripleomaster/'
index 6e1d5bb..4deeabf 100644 (file)
@@ -152,7 +152,7 @@ def get_docker_sdn_files(ds_opts):
     :return: list of docker THT env files for an SDN
     """
     docker_services = con.VALID_DOCKER_SERVICES
-    tht_dir = con.THT_DOCKER_ENV_DIR[ds_opts['os_version']]
+    tht_dir = con.THT_DOCKER_ENV_DIR
     sdn_env_list = build_sdn_env_list(ds_opts, SDN_FILE_MAP)
     for i, sdn_file in enumerate(sdn_env_list):
         sdn_base = os.path.basename(sdn_file)
index f18103c..36caaf1 100644 (file)
@@ -178,6 +178,12 @@ class TestBuildUtils(unittest.TestCase):
         self.assertNotRegex(tmp_patch, 'Steps of upgrade are as follows')
         self.assertNotRegex(tmp_patch, 'Steps invlolved in level 2 update')
 
+    def test_is_path_in_patch(self):
+        with open(os.path.join(con.TEST_DUMMY_CONFIG, '98faaca.diff')) as fh:
+            dummy_patch = fh.read()
+        self.assertTrue(build_utils.is_path_in_patch(dummy_patch,
+                                                     'releasenotes/'))
+
     def test_strip_no_patch_sections(self):
         with open(os.path.join(con.TEST_DUMMY_CONFIG, '98faaca.diff')) as fh:
             dummy_patch = fh.read()
diff --git a/build/csit-rocky-environment.yaml b/build/csit-rocky-environment.yaml
new file mode 100644 (file)
index 0000000..048833d
--- /dev/null
@@ -0,0 +1,93 @@
+---
+# Environment file used to list common parameters required for all deployment
+# types
+
+parameters:
+  CloudDomain: opnfvlf.org
+
+parameter_defaults:
+  GlanceBackend: file
+  CeilometerStoreEvents: true
+  NeutronEnableForceMetadata: true
+  NeutronEnableDHCPMetadata: true
+  NeutronEnableIsolatedMetadata: true
+  ExtraConfig:
+    tripleo::ringbuilder::build_ring: false
+    nova::api::default_floating_pool: 'external'
+  DockerPuppetProcessCount: 10
+  NeutronNetworkVLANRanges: 'datacentre:500:525'
+  SshServerOptions:
+    HostKey:
+      - '/etc/ssh/ssh_host_rsa_key'
+      - '/etc/ssh/ssh_host_ecdsa_key'
+      - '/etc/ssh/ssh_host_ed25519_key'
+    SyslogFacility: 'AUTHPRIV'
+    AuthorizedKeysFile: '.ssh/authorized_keys'
+    PasswordAuthentication: 'no'
+    ChallengeResponseAuthentication: 'no'
+    GSSAPIAuthentication: 'no'
+    GSSAPICleanupCredentials: 'no'
+    UsePAM: 'yes'
+    X11Forwarding: 'yes'
+    UsePrivilegeSeparation: 'sandbox'
+    AcceptEnv:
+      - 'LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES'
+      - 'LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT'
+      - 'LC_IDENTIFICATION LC_ALL LANGUAGE'
+      - 'XMODIFIERS'
+    Subsystem: 'sftp  /usr/libexec/openssh/sftp-server'
+    UseDNS: 'no'
+  ControllerServices:
+    - OS::TripleO::Services::CACerts
+    - OS::TripleO::Services::Clustercheck
+    - OS::TripleO::Services::Kernel
+    - OS::TripleO::Services::Docker
+    - OS::TripleO::Services::Keystone
+    - OS::TripleO::Services::GlanceApi
+    - OS::TripleO::Services::GlanceRegistry
+    - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::MySQLClient
+    - OS::TripleO::Services::NeutronDhcpAgent
+    - OS::TripleO::Services::NeutronMetadataAgent
+    - OS::TripleO::Services::NeutronApi
+    - OS::TripleO::Services::NeutronCorePlugin
+    - OS::TripleO::Services::HAproxy
+    - OS::TripleO::Services::Keepalived
+    - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::Redis
+    - OS::TripleO::Services::NovaConductor
+    - OS::TripleO::Services::MongoDb
+    - OS::TripleO::Services::NovaApi
+    - OS::TripleO::Services::NovaMetadata
+    - OS::TripleO::Services::NovaScheduler
+    - OS::TripleO::Services::NovaConsoleauth
+    - OS::TripleO::Services::NovaPlacement
+    - OS::TripleO::Services::NovaVncProxy
+    - OS::TripleO::Services::Ntp
+    - OS::TripleO::Services::OsloMessagingRpc
+    - OS::TripleO::Services::OsloMessagingNotify
+    - OS::TripleO::Services::Pacemaker
+    - OS::TripleO::Services::Snmp
+    - OS::TripleO::Services::Sshd
+    - OS::TripleO::Services::Timezone
+    - OS::TripleO::Services::TripleoPackages
+    - OS::TripleO::Services::TripleoFirewall
+    - OS::TripleO::Services::OpenDaylightApi
+    - OS::TripleO::Services::OpenDaylightOvs
+  ComputeServices:
+    - OS::TripleO::Services::CACerts
+    - OS::TripleO::Services::Timezone
+    - OS::TripleO::Services::Ntp
+    - OS::TripleO::Services::Snmp
+    - OS::TripleO::Services::Sshd
+    - OS::TripleO::Services::MySQLClient
+    - OS::TripleO::Services::NovaCompute
+    - OS::TripleO::Services::NovaLibvirt
+    - OS::TripleO::Services::Kernel
+    - OS::TripleO::Services::Docker
+    - OS::TripleO::Services::ComputeNeutronCorePlugin
+    - OS::TripleO::Services::ComputeNeutronMetadataAgent
+    - OS::TripleO::Services::TripleoPackages
+    - OS::TripleO::Services::TripleoFirewall
+    - OS::TripleO::Services::NeutronSriovAgent
+    - OS::TripleO::Services::OpenDaylightOvs
index 510ce86..d05397e 100644 (file)
@@ -1,7 +1,7 @@
 %global srcname opnfv-apex
 
 Name:          python34-%{srcname}
-Version:       7.0
+Version:       8.0
 Release:       %{_release}
 Summary:       Scripts for OPNFV deployment using Apex
 
@@ -72,16 +72,18 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-nosdn-bar-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-bar-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-calipso-noha.yaml
-%{_sysconfdir}/opnfv-apex/os-nosdn-calipso_queens-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-calipso_rocky-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-fdio-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-ovs_dpdk-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
-%{_sysconfdir}/opnfv-apex/os-nosdn-queens-noha.yaml
-%{_sysconfdir}/opnfv-apex/os-nosdn-queens-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-rocky-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-rocky-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-queens-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-queens-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-rocky-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-rocky-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-ovs_dpdk-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-kvm-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-kvm-noha.yaml
@@ -89,12 +91,12 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-nosdn-kvm_ovs_dpdk-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-bgpvpn-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-bgpvpn-noha.yaml
-%{_sysconfdir}/opnfv-apex/os-odl-bgpvpn_queens-ha.yaml
-%{_sysconfdir}/opnfv-apex/os-odl-bgpvpn_queens-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-bgpvpn_rocky-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-bgpvpn_rocky-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-sfc-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-sfc-noha.yaml
-%{_sysconfdir}/opnfv-apex/os-odl-sfc_queens-ha.yaml
-%{_sysconfdir}/opnfv-apex/os-odl-sfc_queens-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-sfc_rocky-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-sfc_rocky-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-fdio-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_netvirt-fdio-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-fdio-ha.yaml
@@ -109,7 +111,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-odl-sriov-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-sriov-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml
-%{_sysconfdir}/opnfv-apex/os-ovn-nofeature-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-ovn-nofeature-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-ovn-rocky-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
@@ -129,6 +132,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %doc %{_docdir}/opnfv/inventory.yaml.example
 
 %changelog
+* Thu Sep 27 2018 Tim Rozet <trozet@redhat.com> - 8.0-0
+  Updates from Queens to Rocky
 * Fri Aug 24 2018 Tim Rozet <trozet@redhat.com> - 7.0-7
   Add Calipso for Queens
 * Tue Aug 21 2018 Ricardo Noriega <rnoriega@redhat.com> - 7.0-6
index ac006bd..d408a16 100644 (file)
@@ -11,6 +11,21 @@ patches:
         project: openstack/puppet-tripleo
       - change-id: I93e3d355625508fdc42f44bdd358f3ba86fbd8d7
         project: openstack/puppet-tripleo
+  rocky:
+    undercloud:
+      - change-id: I2e0a40d7902f592e4b7bd727f57048111e0bea36
+        project: openstack/tripleo-common
+        branch: master
+      - change-id: Iaa2276aadae351fbc138de258c51d786f69e4395
+        project: openstack/tripleo-common
+        branch: master
+    overcloud:
+      - change-id: Ie988ba6a2d444a614e97c0edf5fce24b23970310
+        project: openstack/puppet-tripleo
+        branch: master
+      - change-id: I93e3d355625508fdc42f44bdd358f3ba86fbd8d7
+        project: openstack/puppet-tripleo
+        branch: master
   queens:
     undercloud:
       - change-id: I966bf7f6f8d1cbc656abfad59e8bb927e1aa53c2
@@ -4,7 +4,7 @@ global_params:
 
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: false
   sfc: false
   vpn: false
similarity index 88%
rename from config/deploy/os-nosdn-queens-ha.yaml
rename to config/deploy/os-nosdn-rocky-ha.yaml
index 88a4004..152a884 100644 (file)
@@ -3,7 +3,7 @@ global_params:
   ha_enabled: true
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: false
   tacker: false
   congress: false
similarity index 88%
rename from config/deploy/os-nosdn-queens-noha.yaml
rename to config/deploy/os-nosdn-rocky-noha.yaml
index efadc31..5fecfb6 100644 (file)
@@ -3,7 +3,7 @@ global_params:
   ha_enabled: false
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: false
   tacker: false
   congress: false
similarity index 89%
rename from config/deploy/os-odl-bgpvpn_queens-ha.yaml
rename to config/deploy/os-odl-bgpvpn_rocky-ha.yaml
index 27a0caf..a0833fd 100644 (file)
@@ -4,7 +4,7 @@ global_params:
 
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: opendaylight
   odl_version: master
   tacker: false
similarity index 89%
rename from config/deploy/os-odl-bgpvpn_queens-noha.yaml
rename to config/deploy/os-odl-bgpvpn_rocky-noha.yaml
index 3338230..6bc5adf 100644 (file)
@@ -4,7 +4,7 @@ global_params:
 
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: opendaylight
   odl_version: master
   tacker: false
diff --git a/config/deploy/os-odl-rocky-ha.yaml b/config/deploy/os-odl-rocky-ha.yaml
new file mode 100644 (file)
index 0000000..8728bd8
--- /dev/null
@@ -0,0 +1,13 @@
+---
+global_params:
+  ha_enabled: true
+
+deploy_options:
+  containers: true
+  os_version: rocky
+  sdn_controller: opendaylight
+  odl_version: oxygen
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
diff --git a/config/deploy/os-odl-rocky-noha.yaml b/config/deploy/os-odl-rocky-noha.yaml
new file mode 100644 (file)
index 0000000..f6ceb81
--- /dev/null
@@ -0,0 +1,13 @@
+---
+global_params:
+  ha_enabled: false
+
+deploy_options:
+  containers: true
+  os_version: rocky
+  sdn_controller: opendaylight
+  odl_version: oxygen
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
similarity index 89%
rename from config/deploy/os-odl-sfc_queens-ha.yaml
rename to config/deploy/os-odl-sfc_rocky-ha.yaml
index 0cd0146..3a1b6c9 100644 (file)
@@ -4,7 +4,7 @@ global_params:
 
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: opendaylight
   odl_version: master
   tacker: false
similarity index 89%
rename from config/deploy/os-odl-sfc_queens-noha.yaml
rename to config/deploy/os-odl-sfc_rocky-noha.yaml
index d091b8c..8af873a 100644 (file)
@@ -4,7 +4,7 @@ global_params:
 
 deploy_options:
   containers: true
-  os_version: queens
+  os_version: rocky
   sdn_controller: opendaylight
   odl_version: master
   tacker: false
diff --git a/config/deploy/os-ovn-nofeature-ha.yaml b/config/deploy/os-ovn-nofeature-ha.yaml
new file mode 100644 (file)
index 0000000..6c42cad
--- /dev/null
@@ -0,0 +1,15 @@
+---
+global_params:
+  ha_enabled: true
+  patches:
+    undercloud:
+      - change-id: Ic08ff58b10d4fa7116163be1f7fce57879cee8c5
+        project: openstack/tripleo-common
+
+deploy_options:
+  containers: true
+  sdn_controller: ovn
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
diff --git a/config/deploy/os-ovn-nofeature-noha.yaml b/config/deploy/os-ovn-nofeature-noha.yaml
deleted file mode 100644 (file)
index 8c8c5f9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
----
-global_params:
-  ha_enabled: false
-
-deploy_options:
-  sdn_controller: ovn
-  tacker: false
-  congress: true
-  sfc: false
-  vpn: false
diff --git a/config/deploy/os-ovn-rocky-ha.yaml b/config/deploy/os-ovn-rocky-ha.yaml
new file mode 100644 (file)
index 0000000..a2c5a86
--- /dev/null
@@ -0,0 +1,17 @@
+---
+global_params:
+  ha_enabled: true
+  patches:
+    undercloud:
+      - change-id: Ic08ff58b10d4fa7116163be1f7fce57879cee8c5
+        project: openstack/tripleo-common
+        branch: master
+
+deploy_options:
+  containers: true
+  os_version: rocky
+  sdn_controller: ovn
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
index ff9895b..882b012 100644 (file)
         crudini --set /var/lib/config-data/puppet-generated/neutron/etc/neutron/metadata_agent.ini
         DEFAULT nova_metadata_host $(hiera -c /etc/puppet/hiera.yaml nova_metadata_vip)
       become: yes
-      when: "'controller' in ansible_hostname"
+      when:
+        - "'controller' in ansible_hostname"
+        - sdn != 'ovn'
     - name: Restart metadata service
       shell: "docker restart neutron_metadata_agent"
       become: yes
       when:
         - "'controller' in ansible_hostname"
+        - sdn != 'ovn'