Enables containerized overcloud deployments
[apex.git] / apex / builders / undercloud_builder.py
1 ##############################################################################
2 # Copyright (c) 2017 Tim Rozet (trozet@redhat.com) and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 # Used to modify undercloud qcow2 image
11
12 from apex.common import constants as con
13 from apex.virtual import utils as virt_utils
14
15
16 def add_upstream_packages(image):
17     """
18     Adds required base upstream packages to Undercloud for deployment
19     :param image:
20     :return: None
21     """
22     virt_ops = list()
23     # FIXME(trozet): we have to lock to this beta ceph ansible package because
24     # the current RPM versioning is wrong and an older package has a higher
25     # version than this package.  We should change to just 'ceph-ansible'
26     # once the package/repo has been fixed.  Note: luminous is fine here
27     # because Apex will only support container deployment for Queens and later
28     pkgs = [
29         'openstack-utils',
30         'ceph-common',
31         'python2-networking-sfc',
32         'openstack-ironic-inspector',
33         'subunit-filters',
34         'docker-distribution',
35         'openstack-tripleo-validations',
36         'libguestfs-tools',
37         'http://mirror.centos.org/centos/7/storage/x86_64/ceph-luminous' +
38         '/ceph-ansible-3.1.0-0.beta3.1.el7.noarch.rpm'
39     ]
40
41     for pkg in pkgs:
42         virt_ops.append({con.VIRT_INSTALL: pkg})
43     virt_utils.virt_customize(virt_ops, image)
44
45 # TODO(trozet): add rest of build for undercloud here as well