From 45f625a73ea67b31460fdb9da74ba8d619383783 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Mon, 31 Aug 2015 04:09:59 +0000 Subject: [PATCH] Remove dest_filename from build.ini We can, and should, figure out the filename dynamically rather than hardcode that value in build.ini since it is not actually a configurable paramater. Change-Id: I496d6555e9fa356ab09e62063fd707f43ed08121 Closes-Bug: #1490386 --- build.ini | 16 ---------------- docker/ceilometer/ceilometer-base/Dockerfile.j2 | 2 +- docker/cinder/cinder-base/Dockerfile.j2 | 2 +- docker/designate/designate-base/Dockerfile.j2 | 2 +- docker/glance/glance-base/Dockerfile.j2 | 2 +- docker/gnocchi/gnocchi-base/Dockerfile.j2 | 2 +- docker/heat/heat-base/Dockerfile.j2 | 2 +- docker/ironic/ironic-base/Dockerfile.j2 | 2 +- docker/magnum/magnum-base/Dockerfile.j2 | 2 +- docker/murano/murano-base/Dockerfile.j2 | 2 +- docker/neutron/neutron-base/Dockerfile.j2 | 2 +- docker/nova/nova-base/Dockerfile.j2 | 2 +- docker/nova/nova-novncproxy/Dockerfile.j2 | 2 +- docker/swift/swift-base/Dockerfile.j2 | 2 +- kolla/cmd/build.py | 6 ++---- 15 files changed, 15 insertions(+), 33 deletions(-) diff --git a/build.ini b/build.ini index 1ba9fd157f..7849d9b419 100644 --- a/build.ini +++ b/build.ini @@ -1,79 +1,63 @@ [ceilometer-base] type = url location = http://tarballs.openstack.org/ceilometer/ceilometer-master.tar.gz -dest_filename = ceilometer.tar [cinder-base] type = url location = http://tarballs.openstack.org/cinder/cinder-master.tar.gz -dest_filename = cinder.tar [designate-base] type = url location = http://tarballs.openstack.org/designate/designate-master.tar.gz -dest_filename = designate.tar [glance-base] type = url location = http://tarballs.openstack.org/glance/glance-master.tar.gz -dest_filename = glance.tar [gnocchi-base] type = url location = http://tarballs.openstack.org/gnocchi/gnocchi-master.tar.gz -dest_filename = gnocchi.tar [heat-base] type = url location = http://tarballs.openstack.org/heat/heat-master.tar.gz -dest_filename = heat.tar [horizon] type = url location = http://tarballs.openstack.org/horizon/horizon-master.tar.gz -dest_filename = horizon.tar [ironic-base] type = url location = http://tarballs.openstack.org/ironic/ironic-master.tar.gz -dest_filename = ironic.tar [keystone] type = url location = http://tarballs.openstack.org/keystone/keystone-master.tar.gz -dest_filename = keystone.tar [magnum-base] type = url location = http://tarballs.openstack.org/magnum/magnum-master.tar.gz -dest_filename = magnum.tar [murano-base] type = url location = http://tarballs.openstack.org/murano/murano-master.tar.gz -dest_filename = murano.tar [neutron-base] type = url location = http://tarballs.openstack.org/neutron/neutron-master.tar.gz -dest_filename = neutron.tar [nova-base] type = url location = http://tarballs.openstack.org/nova/nova-master.tar.gz -dest_filename = nova.tar [nova-novncproxy] type = url location = http://github.com/kanaka/noVNC/tarball/v0.5.1 -dest_filename = novnc.tar [swift-base] type = url location = http://tarballs.openstack.org/swift/swift-master.tar.gz -dest_filename = swift.tar [zaqar] type = url location = http://tarballs.openstack.org/zaqar/zaqar-master.tar.gz -dest_filename = zaqar.tar diff --git a/docker/ceilometer/ceilometer-base/Dockerfile.j2 b/docker/ceilometer/ceilometer-base/Dockerfile.j2 index 92a3b70d93..230a19ab42 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile.j2 +++ b/docker/ceilometer/ceilometer-base/Dockerfile.j2 @@ -10,7 +10,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD ceilometer.tar / +ADD ceilometer-base.tar / RUN ln -s /ceilometer-* ceilometer \ && useradd --user-group ceilometer \ && pip --no-cache-dir install /ceilometer \ diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index 1cce34a9ea..855c0c667d 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -33,7 +33,7 @@ RUN apt-get install -y --no-install-recommends lvm2 \ {% endif %} -ADD cinder.tar / +ADD cinder-base.tar / RUN ln -s /cinder-* cinder \ && useradd --user-group cinder \ && pip --no-cache-dir install /cinder \ diff --git a/docker/designate/designate-base/Dockerfile.j2 b/docker/designate/designate-base/Dockerfile.j2 index 3fec3a6f73..2df82c2974 100644 --- a/docker/designate/designate-base/Dockerfile.j2 +++ b/docker/designate/designate-base/Dockerfile.j2 @@ -26,7 +26,7 @@ RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD designate.tar / +ADD designate-base.tar / RUN ln -s /designate-* designate \ && useradd --user-group designate \ && pip --no-cache-dir install /designate \ diff --git a/docker/glance/glance-base/Dockerfile.j2 b/docker/glance/glance-base/Dockerfile.j2 index 8fad821060..4fe27a4a88 100644 --- a/docker/glance/glance-base/Dockerfile.j2 +++ b/docker/glance/glance-base/Dockerfile.j2 @@ -17,7 +17,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD glance.tar / +ADD glance-base.tar / RUN ln -s /glance-* glance \ && useradd --user-group glance \ && pip --no-cache-dir install /glance \ diff --git a/docker/gnocchi/gnocchi-base/Dockerfile.j2 b/docker/gnocchi/gnocchi-base/Dockerfile.j2 index be88400735..764bd7e869 100644 --- a/docker/gnocchi/gnocchi-base/Dockerfile.j2 +++ b/docker/gnocchi/gnocchi-base/Dockerfile.j2 @@ -14,7 +14,7 @@ RUN apt-get install -y --no-install-recommends libpq-dev \ {% endif %} -ADD gnocchi.tar / +ADD gnocchi-base.tar / RUN ln -s /gnocchi-* gnocchi \ && useradd --user-group gnocchi \ && pip --no-cache-dir install /gnocchi \ diff --git a/docker/heat/heat-base/Dockerfile.j2 b/docker/heat/heat-base/Dockerfile.j2 index 408167e90f..7f210a5035 100644 --- a/docker/heat/heat-base/Dockerfile.j2 +++ b/docker/heat/heat-base/Dockerfile.j2 @@ -16,7 +16,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD heat.tar / +ADD heat-base.tar / RUN ln -s /heat-* heat \ && useradd --user-group heat \ && pip --no-cache-dir install /heat \ diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2 index 0fc7e56c27..8af231f7ae 100644 --- a/docker/ironic/ironic-base/Dockerfile.j2 +++ b/docker/ironic/ironic-base/Dockerfile.j2 @@ -22,7 +22,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD ironic.tar / +ADD ironic-base.tar / RUN ln -s /ironic-* ironic \ && useradd --user-group ironic \ && pip --no-cache-dir install /ironic \ diff --git a/docker/magnum/magnum-base/Dockerfile.j2 b/docker/magnum/magnum-base/Dockerfile.j2 index 59c22f57e9..d83fa86a8e 100644 --- a/docker/magnum/magnum-base/Dockerfile.j2 +++ b/docker/magnum/magnum-base/Dockerfile.j2 @@ -18,7 +18,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} -ADD magnum.tar / +ADD magnum-base.tar / RUN ln -s /magnum-* magnum \ && useradd --user-group magnum \ && pip --no-cache-dir install /magnum \ diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index cb700e5e0c..5dc28caca6 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -8,7 +8,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} -ADD murano.tar / +ADD murano-base.tar / RUN ln -s /murano-* murano \ && useradd --user-group murano \ && pip --no-cache-dir install /murano \ diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index f1cd75a374..79d4ab4eaa 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -31,7 +31,7 @@ RUN apt-get install -y --no-install-recommends \ {% endif %} -ADD neutron.tar / +ADD neutron-base.tar / RUN ln -s /neutron-* neutron \ && useradd --user-group neutron \ && pip --no-cache-dir install /neutron \ diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index b46a446d46..ad43bb9c4e 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -39,7 +39,7 @@ RUN apt-get install -y --no-install-recommends \ {% endif %} -ADD nova.tar / +ADD nova-base.tar / RUN ln -s /nova-* nova \ && useradd --user-group nova \ && pip --no-cache-dir install /nova \ diff --git a/docker/nova/nova-novncproxy/Dockerfile.j2 b/docker/nova/nova-novncproxy/Dockerfile.j2 index b798e00a67..f7d25338e6 100644 --- a/docker/nova/nova-novncproxy/Dockerfile.j2 +++ b/docker/nova/nova-novncproxy/Dockerfile.j2 @@ -20,7 +20,7 @@ RUN yum -y install \ {% elif base_distro in ['ubuntu', 'debian'] %} -ADD novnc.tar / +ADD nova-novncproxy.tar / RUN ln -s /kanaka-noVNC-* /usr/share/novnc {% endif %} diff --git a/docker/swift/swift-base/Dockerfile.j2 b/docker/swift/swift-base/Dockerfile.j2 index 7102916f17..7a20e2864a 100644 --- a/docker/swift/swift-base/Dockerfile.j2 +++ b/docker/swift/swift-base/Dockerfile.j2 @@ -15,7 +15,7 @@ RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ {% elif install_type == 'source' %} -ADD swift.tar / +ADD swift-base.tar / RUN ln -s /swift-* swift \ && useradd --user-group swift \ && pip --no-cache-dir install /swift \ diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index ed1de00358..17142b54b0 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -89,7 +89,7 @@ class WorkerThread(Thread): def process_source(self, image): source = image['source'] dest_dir = image['path'] - dest_tar = os.path.join(dest_dir, source['dest']) + dest_tar = os.path.join(dest_dir, image['name'] + '.tar') if source.get('type') == 'url': LOG.debug("{}:Getting tarball from {}".format(image['name'], @@ -135,7 +135,7 @@ class WorkerThread(Thread): return # Set time on destination tarball to epoch 0 - os.utime(os.path.join(dest_dir, source['dest']), (0, 0)) + os.utime(dest_tar, (0, 0)) def builder(self, image): LOG.debug('{}:Processing'.format(image['name'])) @@ -440,8 +440,6 @@ class KollaWorker(object): 'type') image['source']['source'] = self.config.get(image['name'], 'location') - image['source']['dest'] = self.config.get(image['name'], - 'dest_filename') if image['source']['type'] == 'git': image['source']['reference'] = \ self.config.get(image['name'], 'reference')