44 Commits

Author SHA1 Message Date
Swapnil Kulkarni (coolsvap)
7294ed9d90 Update Mariadb dockerfile for formatting
Change-Id: I6f5b28dc6520e3d31f413b0da708d9b14c9e9671
Partial-Bug:#1569417
2016-04-12 21:45:20 +05:30
SamYaple
afce10dea4 Fix mysql bootstrap
The lightsout recover patch broke multinode mysql. Also the lightsout
recovery didnt probably pass the --wsrep-new-cluster flag. This
updates the mariadb bootstrap to work with multinode again.

Closes-Bug: #1559480
Related-Id: I903c3bcd069af39814bcabcef37684b1f043391f
Change-Id: I1ec91a8b2144930ea8f04cc1c201b53712352e4e
2016-03-21 12:23:00 +00:00
SamYaple
2aaaed770e MariaDB lights out recovery
This playbook only matters for multinode since AIO can recover from
power outage without additional configuration.

DocImpact
Implements: blueprint mariadb-lights-out
Change-Id: I903c3bcd069af39814bcabcef37684b1f043391f
2016-03-16 15:53:44 +00:00
Paul Bourke
33e997b79d Add missing 'yum clean all' to mariadb
Found another missing clean in mariadb, halves the size of the image.

TrivalFix

Change-Id: Idcbb925a6f232bd1172710456662a52784e025b6
2016-03-10 12:36:23 +00:00
Éric Lemoine
4445c81991 Make Heka collect MariaDB logs
Partially implements: blueprint heka
Change-Id: Ib5e740683cee296bcac69228f525594850d62a27
2016-02-19 21:49:21 +00:00
SamYaple
7e2ce01431 Cleanup mariadb and make compatiable with mesos
There is no reason to have a hostname-unique pidfile in the container
as we currently have. This posed problems with kolla-mesos reusing
the same script. Since there is no reason for this pidfile to be
configurable in path _at_ _all_, we hardcode the path.

Additionally, we adjust the file perm change to only update the perms
on the folder if it is not already properly set.

This also incorperates a kolla-ansible file in the bootstrap process
which follows our other container techniques of using the idempotent
creation of a volume in the bootstrap process (see nova)

TrivialFix
Related-Bug: #1538136
Change-Id: I2380529fc7146a9603145cdc31e649cb8841f7dd
2016-01-28 20:26:41 +00:00
Sidharth Surana
37d44444d7 Make galeradb bootstraping robust
Currently, there are arbitrary wait for mariadb service startup.
However, this leads to nondeterministic results in the current
workflow. This patch tries to make the workflow more deterministic.

Change-Id: I3c6245cce93c7ff0d3d57cb2ae065a1ed1487769
Closes-Bug: #1491782
2016-01-04 09:10:04 -08: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
ea9d5cd067 Move USER operation after footer
The USER operation affects all docker commands after it. This causes a
problem with our {{ include_footer }} implementation since commands in
that footer may require elevated permissions to perform.

In the current implementation I can no longer remove my proxy settings
once the USER has been changed.

Change-Id: I9b2bab5a15f595f6d52a46c64ddf59ba5608b938
Partially-Implements: blueprint drop-root
2015-11-12 14:34:09 +00:00
Steven Dake
4c9e15b94e Drop root privileges for mariadb
Drop root privileges for mariadb.  This isn't perfect.  If somemone
breaks out of the container and can run sudo within the contianer,
it would be possible to replace the root credentials of the database.

Any container that uses sudo suffers from some extra attack vector
related to the sudo command.  That said, the sudo commands are
locked down to minimize harm.

Change-Id: I4b3573725d940bb8aa90d43a6235d8cf7d30fc64
Partially-Implements: blueprint drop-root
2015-11-12 03:12:40 -05:00
Steven Dake
09e9b1be33 Move the mariadb expect code to a script
Atleast in a script, sudo can be made to only allow the script to
run from the mysql process in the future, versus all the proceesses
being able to be executed as root presently.

Change-Id: I030b57086e37e4dc8f668f98c04335d94ab9d2b0
Partially-Implements: blueprint drop-root
2015-11-11 18:42:07 -05: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
Jenkins
6a622ec82c Merge "Implement a install_type and install_metatype" 2015-09-28 10:49:53 +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
Sam Yaple
160f1cc011 remove set_configs
Change-Id: I9bb0a1fac63cc326234b0f06b1e56b43e0753279
Partially-Implements: blueprint replace-config-external
2015-09-27 13:44:50 +00:00
Sam Yaple
a1b0518b9a Fix removal of config-external
I removed the files but not the COPY commands thus breaking all of
Kolla

Change-Id: I37d3e0cb94a1ecc12971f485f953310ba8fee53c
Partially-Implements: blueprint replace-config-external
2015-09-25 20:08:40 +00:00
Sam Yaple
e2e0fd288f Remove config-external.sh
Removes config-external for all services that have been replaced in
Ansible

Change-Id: I839a14418638b977fbc1d02ba6839811b0f909ea
Partially-Implements: blueprint replace-config-external
2015-09-25 13:00:55 +00:00
Sam Yaple
77800984bc Refactor set_configs.py
This refactor brings the logging in line with the rest of Kolla.
The fucntion names were updated to reflect thier new role.

Additionally, it fixes several issues with the permissions which
currently break all containers that use set_configs.py

It will also work with source being a directory or a file now.

Change-Id: I4a197a343e3baf3bd31532debdff5972adb8aefa
Partially-Implements: blueprint replace-config-external
2015-09-17 20:10:58 +00:00
rthallisey
7088e885f8 Replace config-external with a JSON file for Galera
Change-Id: I82abc9a31571376679c4f463f5a6ae77a49ec2f6
Partially-Implements: blueprint replace-config-external
2015-09-16 10:33:29 -04: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
3487d8da14 Rename Galera to MariaDB
Change-Id: I3134ba72e2ce4e85a17facbc3b5af4c1c3438d33
Closes-Bug: #1491740
2015-09-03 21:00:23 +00:00
Daneyon Hansen
5547b5fe78 Implements: blueprint Implement a database container set
Previously, the database container was configured for use with
Kubernetes. This patch removed any k8s dependencies, adds a script
to manage mysql server.cnf settings and splits data and app
containers. Splitting the containers provides additional
portability and operational efficiencies compared to host mounts.

Change-Id: I80656450c02dda5f2959d187eec20d5877dc54a2
2015-03-20 16:17:51 +00:00
Steven Dake
38fada551c mariadb-server requires the hostname userspace command
The hostname command is required to allow mariadb to access
the network properly.  Without it, in some cases mariadb cannot
execute name service resolution.

Change-Id: Ia215585faad23012143b63c4d82acd6ba69f59b7
2015-03-18 20:07:36 -07: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
Lars Kellogg-Stedman
277f2448e8 Update MAINTAINER in Dockerfiles to Kolla Project
Remove individual MAINTAINER information from Dockerfiles.

Change-Id: I777df5cde049599dc786176e1d5b4b9597f0b334
2014-10-22 11:11:31 -04:00
Lars Kellogg-Stedman
fa6e282869 clean yum cache after package install
our Dockerfile was missing "yum clean all", causing a large yum cache to
get baked into the image.

Change-Id: Ib9942a12b8a14c7e04cf8ae3184cdefcdc5a4652
2014-10-13 14:41:37 -04:00
Steven Dake
2bc783b8c6 Reorganize k8s structure
All services go to TLD/k8s/service
All pods go to TLD/k8s/pod

Change-Id: Iad2977a9f0cd5f430c4e0a566846bf4681618379
2014-10-07 15:33:11 -07:00
Lars Kellogg-Stedman
863e29a780 remove "master" from mariadb k8s configs
Labelling things foo-master crept into this repository from the
kubernetes guestbook example (which has redis-master and redis-slaves).
We're not running clustered software at the moment so these labels are
unnecessary.

Change-Id: Ibf4cb2b005cc57bcb11e298dd5109cfe309c9ec3
2014-10-07 10:40:00 -04:00
Chmouel Boudjnah
e35b376994 Validate JSON
Let's get that quickly so we can add a gate. There was some respacing
along the way (used http://jsonlint.com)

Change-Id: Id18b9f9757306cf3f06e6221a21a9f600db1bd2e
2014-10-07 10:02:04 +02:00
Jenkins
eb6643e686 Merge "Remove whitespace errors in mariadb JSON" 2014-10-06 21:03:46 +00:00
Lars Kellogg-Stedman
24b6db92bc introduce a new build mechanism
This patch replaces the collection of individual "build" scripts with a
single script (tools/build-docker-image), made available as "build"
inside each image directory.

The build-docker-image script will, by default, build images tagged with
the current commit id in order to prevent developers from accidentally
stepping on each other or on release images.

Documentation in docs/image-building.md describes the script in more
detail.

Change-Id: I444d5c2256a85223f8750a0904cb4b07f18ab67f
2014-10-04 11:03:39 -04:00
Steven Dake
6a8eb99608 Remove whitespace errors in mariadb JSON
JSON should not introduce whitespace errors

Change-Id: I02cc56c6205a411a3f042b65ccfb9624795c13d2
2014-10-03 09:54:42 -07:00
Jenkins
470fcb7349 Merge "fix mariadb Dockerfile" 2014-10-03 15:01:01 +00:00
Steven Dake
3cfef070e3 mariadb: Set container port in pod to 3306
container port for pod should be set

Change-Id: I04144487f8803b1f83d59bdc978c4f6dfa431d0d
2014-10-02 18:35:59 -07:00
Lars Kellogg-Stedman
a84fe3ce01 fix mariadb Dockerfile
- fix base image
- expose ports
- new mariadb packages log to /var/log/mariadb

Change-Id: I60adc956c82c352f91f718a3a2d5a4a86dd00293
2014-10-02 20:25:29 -04:00
Steven Dake
9c7f0622a7 Point to fedora-rdo-* for image names 2014-09-27 14:06:39 -07:00
Steven Dake
cca017d44c Pull mariadb and keystone images from the kollaglue organization
Presently these are pulled from a closed location inside a firewall.  Instead
pull them from the public docker registry.
2014-09-27 12:31:12 -07:00
Steven Dake
7bb837fc65 Add a push script for each of the separate daemons
This pushes to the docker registry.
2014-09-25 22:15:27 -07:00
Steven Dake
fd22b2346e Make build tools build with kollaglue login
Build with kollaglue login.  Then we can upload all images under
that user namespace.
2014-09-25 22:15:27 -07:00
Steven Dake
ed602e7e65 Provide script to build docker images
Build all docker images one at a time or with one top level call
2014-09-20 18:57:08 -07:00
Steven Dake
ce94f823d4 Base images from Fedora 20 + RDO Icehouse
Previously images were based from RHEL OSP + RDO Icehouse.  This presents
a problem in that internal urls are used to access the rhel7 repositories.
For new contributors, we need something that can be accessed without special
rhel7 permissions.

mariadb and rabbitmq can from fedora
cinder, glance, keystone can from fedora-rdo-base

This patch also uses the RDO repositories from upstream.  This patch also
udpates the base fedora image with latest bits.
2014-09-20 13:49:13 -07:00
Lars Kellogg-Stedman
dd259a8430 added kubernetes .json files 2014-09-18 11:48:58 -04:00
Lars Kellogg-Stedman
1e72f8cb8e updated based on official mysql image 2014-09-18 10:56:30 -04:00
Lon Hohberger
089a4c0a94 Add MariaDB for RHEL OSP Dockerfile and bits
Signed-off-by: Lon Hohberger <lon@metamorphism.com>
2014-09-18 09:34:02 -04:00