Commit Graph

33 Commits

Author SHA1 Message Date
gugug e364113adc Remove mongodb dockerfile from kolla
more info: a6c97d7284

Change-Id: I9e8a973e10389d42d6fedffb98bd23f1a8271087
Co-Authored-By: jacky06 <zhang.min@99cloud.net>
2020-06-20 01:50:16 +00:00
Marcin Juszkiewicz 53443c5c71 Remove support for CentOS 7
With the move to RHEL/CentOS 8 we no longer have Python 2 in our images
so there is no need for checking which Python version (2.x or 3.x) is
used inside of containers.

We also no longer have to support yum as a value for
distro_package_manager.

Partially-Implements: blueprint centos-rhel-8

Change-Id: Ie45cf3465fedddbde7856961527421883ba3d5c9
2020-04-15 09:32:06 +00:00
Christian Berendt 861f55fbfd Add block labels to all Dockerfiles
Change-Id: I9692dda817ef134d647247431565e1b58cf9da41
2020-03-01 17:25:58 +00:00
Mark Goddard 1fe8012ce2 Actually disable EPEL, and epel-modular
The disable_extra_repos macro accepts a list as its only argument. We
were calling it like this to disable EPEL:

disable_extra_repos('epel')

The macro interpreted this as a request to disable three repos, e, p, l.
Thanks Python! Type validation to be improved separately.

Additionally, on CentOS 8 the EPEL repository was not included in the
repository mapping file, repos.yaml. There is also another EPEL
repository on CentOS 8, epel-modular, which is enabled by default after
installing epel-release.

This change adds mappings for epel and epel-modular repos to repos.yaml,
and fixes the disabling of epel in the base image, as well as disabling
epel-modular.

There are some cases where EPEL is still used (it seemed a bit too
easy...), and the repository has been enabled for these images:

* bifrost-base (nginx)
* ironic-conductor (C7 only, shellinabox)
* freezer-base (C7 only, trickle)
* gnocchi-base (C8 binary only, python3-boto3)
* mariadb (pv)
* mongodb (C7 only, mongodb)
* nova-spicehtml5proxy (C7 only, spice-html5)
* telegraf (C7 only, python2-pip)

A few other things were changed:

* ironic-conductor does not require the ceph repo
* python3-pika is no longer installed in the openstack-base image

Related: blueprint remove-epel

Change-Id: I3761825239dfc462072383cde6276c4fb3e1bf12
2020-02-26 13:46:04 +00:00
Marcin Juszkiewicz 70ef9a4fee drop *_existing_user_fix macros
Commit 109706aa8b bumped 'system' users
beyond range used by Kolla. So Debian/Ubuntu does not complain that
system users created by packages exist already on package install.

Change-Id: I9bf4b240839d46088ac668f26cf065dd5e3775c2
2019-11-29 17:20:14 +01:00
Alex Schultz ae1322ec10 Use base_package_type
This change updates the docker files to use base_package_type instead
of doing specific distro checks for the rhel/deb generic cases. The
base_distro is still available and is used when a specific distro needs
a customization but if the differences are purely rpm vs deb, then the
base_package_type can be used.

Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
2019-01-17 08:23:41 -07:00
Marcin Juszkiewicz b6162f9f16 mongodb: handle "user already exists" error on Debian
When we install 'mongodb-server' package in Debian/stable it errors out
because 'mongodb' user already exists.

It was reported [1] and got resolved in Debian/testing.

1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858903

Change-Id: Iabfcbf68a3aea9d7b09b72eb3e8325f09c2f9d31
2017-12-14 11:24:52 +00:00
Jawon Choo 31259fa595 Override image's meta info.
centos based images have wrong label info,
these changes fix own image's name and build-date.

Change-Id: I1d13f8f386c8db12b5fbe5f8ecbbf9e3fbb4ba1c
Closes-Bug: #1680341
2017-05-03 11:08:17 +09:00
Chen 8c463a47a9 Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2
Use LABEL instruction instead of MAINTAINER (deprecated) instruc-
tion as suggested by Docker's official dockerfile guide.
docs.docker.com/engine/reference/builder/#maintainer-deprecated

Closes-Bug: #1683652

Change-Id: Ie87a1ddf31aefcd0b623fd2837d78de420e76898
2017-04-20 16:50:05 +09:00
Marcin Juszkiewicz 69fef5cd59 debian: enable all images enabled for Ubuntu
Debian support is not maintained in Kolla so it got a bit behind Ubuntu
one. This changeset enables Debian for all images. Jessie (even with
backports) may be too old for some images though.

Also unify distro check to ['debian', 'ubuntu'] to keep alphabetical order
like it is done for RPM distributions.

Partially-Implements: blueprint multiarch-and-arm64-containers

Change-Id: I056233fbfa277e0e2360c07c3f80d9558c554357
2017-04-04 22:48:18 +02:00
Jeffrey Zhang e5903d5fa9 Remove include_header and include_footer in all Dockerfiles
include_header and include_footer parameter is already removed, remove
them in all Dockerfiles.
Add missing footer block.

Change-Id: I90da03eb9f95a3827361d5f5ede65fde7d6be2b3
2017-02-05 10:44:48 +08:00
Sam Yaple 58eee09c15 use static uid/gid in images
This centralizes all user and group creation into a single source. This
will fix any current and furture uid/gid mismatches (such as with
nova-libvirt).

In the process, we also unify users between the distros in a standard
way. The users in the following containers change from thier defaults:

Ubuntu: _chrony user is now chrony
Ubuntu: memcache user is now memcached
All: qemu user is used for ownership and socket permissions

All uid and gid numbers are customizable via kolla-build.conf

Co-Authored-By: Kris Lindgren <klindgren@godaddy.com>
Change-Id: I120f26ab0683dc87d69727c3df8d4707e52a4543
Partially-Implements: blueprint static-uid-gid
2017-01-17 09:02:21 -03:00
Christian Berendt 5cd30d4914 Remove Fedora support
Closes-bug: #1616387
Change-Id: Id97f88b9baa3d48d33ce120962450a374282d044
2016-11-03 10:50:22 +01:00
Paul Bourke b41247c656 Add header blocks to all Dockerfiles
Change needed to add header blocks to all Dockerfiles, similar to the
base.

Use case is to easily run something before packages are installed, e.g.
to COPY a local rpm in that can be added to the package list.

Change-Id: I1bbfdf0b762da0a392aa8bf47781315b45377bee
Closes-Bug: 1618969
2016-09-13 16:53:31 +01:00
Shaun Smekel a9d08726f5 Handle empty package list for install_packages
Currently if the install_packages macro is run with an empty
package list, it will add a yum or apt-get command with no
packages listed.

This bug fix aims to omit this line when no packages have
been given, or, the operator wants to use the "_override" /
"_remove" functionality to disable all packages being
installed in a Dockerfile.

Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
Change-Id: Ifaaaebfccc3adb0f2f68a35ac08e59378bc87fdb
Closes-bug: 1612446
2016-08-19 10:49:03 +00:00
Asha Saravanamohan b1ba77ba91 Customizations for mongodb
This patchset contains customization of Dockerfile of mongodb container

Change-Id: Id2ca174dd81ced733fb119aa8efbefb387d04bb5
Partially-implements: blueprint third-party-plugin-support
2016-07-28 08:46:48 -07:00
Jeffrey Zhang 3f79e37d21 Fix the overwrite sudoers file issue
Change-Id: I4b109f7fdc3b8e49defed26979b04ca158842e98
Closes-Bug: #1598423
2016-07-05 05:49:13 +00:00
Swapnil Kulkarni (coolsvap) 435b21b90d Update ubuntu dockerfiles for formatting
Change-Id: If4be00b937e14ec93443dcb7249cf17099d57cbe
Closes-Bug: #1569417
2016-05-26 04:09:22 +00:00
Swapnil Kulkarni (coolsvap) 3d1e4f4836 Update Mongodb dockerfile for formatting
Change-Id: Id3241ee4512723ce4afca7c904de5287e06160be
Partial-Bug:#1569417
2016-04-12 21:51:32 +05:30
Hui Kang ef24d9e597 Set mongodb log file to shared volume by heka
TrivialFix

Change-Id: I085ef2884749bb4ecc546b78052a5688e8b36ad3
2016-03-04 11:04:23 -05:00
Hui Kang 3ae0063944 Add an ansible role for mongodb
Change-Id: Ia6ac371845d1f2b545406d096b35a6d5f68be5f6
Implements: blueprint ansible-mongodb
2016-01-27 10:48:34 -05:00
Swapnil Kulkarni (coolsvap) 59a1c8b9fb Remove hardcoded MAINTAINER in Dockerfiles
Added new option in kolla-build.conf

Change-Id: I45fe51966bcb59ea19d112281ba3d5a1ba091a56
Closes-Bug:#1514304
2015-11-23 11:03:47 +00:00
Sam Yaple cb4e875ae1 Common start.sh
The majority of the start.sh code is identical. This removes that
duplicate code while still maintaining the ability to call code in a
specific container.

The start.sh is moved into /usr/local/bin/kolla_start in the container

The extend_start.sh script is called by the kolla_start script at the
location /usr/local/bin/kolla_extend_start . It always exists because
we create a noop kolla_extend_start in the base directory. We override
it with extend_start.sh in a specific image should we need to.

Of note, the neutron-agents container is exempt from this new
structure due to it being a fat container.

Additionally, we fix the inconsistent permissions throughout. 644 for
repo files and the scripts are set to 755 via a Docker RUN command to
ensure someones local perm change won't break upstream containers.

Change-Id: I7da8d19965463ad30ee522a71183e3f092e0d6ad
Closes-Bug: #1501295
2015-10-06 03:30:26 +00:00
Steven Dake 0e99b69de4 Implement a install_type and install_metatype
This prepares for the RHEL OSP implementation by making the build
tool convert all binary-* into an install_type of binary and * into
an install_metatype variable substitution inside the Dockerfiles.
Further binary-* is substituted as install_name to enable proper
building only.

Change-Id: Ib681b29176eb79a3cab12ec824313fdecb6e7a5f
Partially-Implements: blueprint rhel-based-image-support
2015-09-28 03:16:48 -07:00
Steven Dake 6992049323 Add 'rhel' for RPM distros
Add 'rhel' to list for RPM based distros.  Also sort the distro
list for rpm packages for affected lines.

Change-Id: Ied4cb3e9763d6c6359f314d16185383ac3e006ed
Partially-Implements: blueprint rhel-based-image-support
2015-09-04 03:12:15 -07:00
Sam Yaple cbd42ca6e9 Move docker_templates to docker dir
Updated build.py to reflect this change.
Deprecate --template option and make it a noop.

Change-Id: I7cd98d1ee684a4c64984a49597159868152683b2
Partially-Implements: blueprint remove-docker-dir
2015-08-28 13:33:50 +00:00
Sam Yaple 13062e23e8 Restructure builds to allow more flexibility
As a restructure, nothing is changed from the original behaviour and
naming despite the file structure changing. The symlinks to build had
to be updated generating lots of "deleted" and "new_file".

The new structure is:

docker/${base_distro}/${type}/${container}

base_distro == centos, ubuntu, fedora, etc
type == source, binary, rdo

type rdo is a symlink to binary for backwards compatibility

Two new flags are added to the build-all script to support the ability
to support different base distros and a flag to support binary or source
containers.

There are several added folders that are empty to hold the directory
structure for future containers of these types.

To use a prefix other than centos-rdo- you can set PREFIX in the toplevel
directory .buildconf file

Change-Id: Ifc7bac0d827470f506c8b5c004a833da9ce13b90
2015-05-15 01:32:22 -05:00
Steven Dake d30f69bc83 Port to icehouse
This represents making build-docker-images --release build
with the icehouse tag and causes docker-compsoe to pull from
the icehouse tag.

Partially-implements: blueprint port-kilo

Change-Id: I66b2c39abc55c0f47152dd90e696fc46b9c58f50
2015-05-06 09:58:43 -07:00
Steven Dake a87980e5c2 Remove EXPOSE options from Dockerfiles
The EXPOSE options will create a local docker-proxy.  This is
unnecessary with --net=host mode.  The docker-proxy adds about
20 microseconds of latency.  Add documentation to the specification
to indicate where to find the ports that are exposed by the
services in case someone were to desire to add EXPOSE back to
the Dockerfiles.

Change-Id: I398e922fe096d6022a2d5985bb92498f89a5ea31
2015-04-06 20:25:18 -07:00
Sam Yaple 986edf4a97 Replace ; with && in Dockerfile
When using ';' this can allow the previous command to fail and while the
docker build proceeds without realizing a command failed. Switching to
'&&' allows the exit code to make it to the docker build command and the
build to fail appropriately.

Change-Id: Idd0991ed4549542bb10d27da1a0a025d0503b6c1
2015-03-27 18:52:48 -05:00
Martin André 0764fd7dea Allow changing base image
By changing the PREFIX variable in the .buildconf one is now able to
build docker images from different bases.

For example, add the following line to your .buildconf file to build
CentOS based images:

    PREFIX=centos-rdo-

Default base image is Fedora. For now only RH family is supported.

Additionally, changing the namespace either with the NAMESPACE variable
in .buildconf or via --namespace commandline option now changes the
source namespace as well from the default kollaglue one.

Implements: blueprint multi-baseos
Co-Authored-By: Steven Dake <stdake@cisco.com>
Change-Id: I3964cd2292789ea883a1f2d2738a5731a4fff49b
2015-03-02 14:08:06 +09:00
Pradeep Kilambi 6bd1f5a3a7 Fix to not fork mongod so mongodb container works as expected
For some reason forking the mongod process seems to cause issues
when the container comes up. If i remove this and run the
images with detach and publishall flags i can connect to
mongo instance.

Change-Id: I0b7193e6369084e3aeec857607dda9c3f235770d
2014-11-25 22:23:42 +00:00
Pradeep Kilambi 904b5c4256 Add support for mongodb container
Implements: blueprint kube-mongodb-container

Change-Id: If76f6c0be90c3025933795d262304a10bf1a880d
2014-11-14 13:06:37 -05:00