From d4481941533c43f671c9b10196264bd0decc525f Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 29 Jun 2020 20:41:49 +0000 Subject: [PATCH 01/12] 10.2.32 --- .DS_Store | Bin 0 -> 6148 bytes Dockerfile | 40 +++ Jenkinsfile | 4 + LICENSE | 339 ++++++++++++++++++++++++ README.md | 33 ++- download.yaml | 46 ++++ scripts/.DS_Store | Bin 0 -> 6148 bytes scripts/docker-entrypoint.sh | 346 +++++++++++++++++++++++++ signatures/RPM-GPG-KEY-CentOS-7 | 30 +++ signatures/RPM-GPG-KEY-CentOS-Official | 30 +++ signatures/RPM-GPG-KEY-MariaDB | 132 ++++++++++ 11 files changed, 999 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 Dockerfile create mode 100644 Jenkinsfile create mode 100644 LICENSE create mode 100644 download.yaml create mode 100644 scripts/.DS_Store create mode 100644 scripts/docker-entrypoint.sh create mode 100644 signatures/RPM-GPG-KEY-CentOS-7 create mode 100644 signatures/RPM-GPG-KEY-CentOS-Official create mode 100644 signatures/RPM-GPG-KEY-MariaDB diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5bfd28df3ae9101d39e6c24b1ea0831bfc718544 GIT binary patch literal 6148 zcmeHK%Wl&^6ur|1V!Nuy0;!0VH%Kg^Di+YHLP#M^7D0dzMz8?X+OcUZTu&4`L?r}y z!#^Ow5AZE~03X5!z?ny@#3^D^AymzkX3m|Nd&c&emxqX0XB>G%4I;9T1lAm6XP9Ug zX~|Y}jo>laM@%DnLkXo6FGZUQqkvK1e^WrLU5C2FX+UqWYERd1KjnikT^8-HhnlYFS(?t3^)le}oPez29* z+NH~N%W^Dd-FfXF@`+yr#W?Q-qnD!eBq$C;?LXr@J@td|c@j_d8drCDRs=~Fk0d#X zVuZYUkz^5{boe-na@mis8Z67U?7hbI>D1ftcABnt$J?4U-RbsrtLfgpwKbdB*2WF* zUVs1S`2F<5?Bf@q9QI0VmeQ_hJb|xp&XDJwKgv>`9iUY(*XRKTD#LIk$n%p8w<6*v zM9vRbogPx3cBw~?$){c=`e!BDrl*L!kBRXJxQStn78!Cve4d*Sb-c*{(6_=_>|Pbkw^#uC1|DsOZG><%8)bGkrs0 z^6BW`mEpwN3QcYlFbXUxu&Rm;asK!IeE(l0nUYb!C~%<^V70E_?ckI2*}C*`;;eO% s_K}2%xKg2{Ak)XObi`474M`f>T;TxQ8cT(!fteoxDTB$30{>Kj-_bL{2mk;8 literal 0 HcmV?d00001 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b6ba79 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io +ARG BASE_IMAGE=redhat/ubi/ubi8 +ARG BASE_TAG=8.2 +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} + +LABEL name="MariaDB" \ + maintainer="michael.simmons@anchore.com" \ + vendor="Open Source" \ + version="10.2.32" \ + release="1" \ + summary="Image of MariaDB" \ + description="MariaDB is a community-developed fork of the MySQL relational database management system." + +COPY mariadb-server.rpm mariadb-client.rpm mariadb-common.rpm mariadb-shared.rpm mariadb-compat.rpm galera.rpm boost.rpm openssl.rpm libnsl.rpm signatures/RPM-GPG-KEY-MariaDB signatures/RPM-GPG-KEY-CentOS-Official signatures/RPM-GPG-KEY-CentOS-7 / +COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh + +RUN groupadd -r mysql && useradd -r -g mysql mysql && \ + chmod +x /usr/local/bin/docker-entrypoint.sh && \ + rpm --import RPM-GPG-KEY-MariaDB && \ + rpm --import RPM-GPG-KEY-CentOS-Official && \ + rpm --import RPM-GPG-KEY-CentOS-7 && \ + dnf -y update && \ + dnf -y install mariadb-server.rpm mariadb-client.rpm mariadb-common.rpm mariadb-shared.rpm mariadb-compat.rpm galera.rpm boost.rpm openssl.rpm libnsl.rpm --setopt=tsflags=nodocs && \ + dnf clean all && \ + rm -rf /var/cache/dnf && \ + rm mariadb-server.rpm mariadb-client.rpm mariadb-common.rpm mariadb-shared.rpm mariadb-compat.rpm galera.rpm boost.rpm openssl.rpm libnsl.rpm RPM-GPG-KEY-MariaDB RPM-GPG-KEY-CentOS-Official RPM-GPG-KEY-CentOS-7 && \ + chmod +x /usr/local/bin/docker-entrypoint.sh && \ + ln -s usr/local/bin/docker-entrypoint.sh + +VOLUME /var/lib/mysql + +HEALTHCHECK --interval=5s --timeout=30s CMD mysqladmin ping -h 127.0.0.1 -u mysql || exit 1 + +USER mysql + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] + +EXPOSE 3306 + +CMD ["mysqld"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..c007b0b --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,4 @@ +@Library('DCCSCR@master') _ +dccscrPipeline( + version: "10.2.32" +) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7e14f38 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/README.md b/README.md index fc7e4ca..a87def7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,33 @@ -# mariadb102 +# MariaDB +Version: 10.2.32 + +## Overview + +MariaDB is a community-developed fork of the MySQL relational database management system. + +The following MariaDB documentation provides an introduction, primer, list of SQL statements, and useful MariaDB queries: + +[https://mariadb.org/documentation/](https://mariadb.org/documentation/) + +## Downloading and Building MariaDB from Iron Bank + +1. Go to the [MariaDB webpage](https://ironbank.dsop.io/vendor?product=mariadb&vendor=opensource) in Iron Bank and download the latest tarball. +2. Navigate to the location of the download and run `docker load -i *tarball.tar.gz* -t mariadb:*tag*` or `podman load -i *tarball.tar.gz* -t mariadb:*tag*`, substituting in the appropriate download name. This will build the image that will be used when the container runs. Provide a unique tag so that it is easy to reference the image later. + +## Usage + +Use the `kubectl` command to run MariaDB within your cluster: +``` +kubectl run mariadb --image=mariadb:*tag* --generator=run-pod/v1 --image-pull-policy=Never +``` +Execute commands within the container: +``` +kubectl exec -it pod/mariadb -- mysql +``` +Run your statements and queries: +``` +# example + +show databases; +``` \ No newline at end of file diff --git a/download.yaml b/download.yaml new file mode 100644 index 0000000..993f69d --- /dev/null +++ b/download.yaml @@ -0,0 +1,46 @@ +resources: + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/MariaDB-server-10.2.32-1.el7.centos.x86_64.rpm" + filename: "mariadb-server.rpm" + validation: + type: "sha256" + value: "17f40f06be93adf411f4b3efbe2c317db3499c9f0daa477e58b2bf67fa4e774e" + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/MariaDB-client-10.2.32-1.el7.centos.x86_64.rpm" + filename: "mariadb-client.rpm" + validation: + type: "sha256" + value: "2dfe24400bacab6db13e90b27447a1473cb68552fe6f716ff834fad4f3371d4f" + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/MariaDB-common-10.2.32-1.el7.centos.x86_64.rpm" + filename: "mariadb-common.rpm" + validation: + type: "sha256" + value: "c2a182f433754e7def351d024b862770b07b13696f95372338366fdb42dfd945" + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/MariaDB-shared-10.2.32-1.el7.centos.x86_64.rpm" + filename: "mariadb-shared.rpm" + validation: + type: "sha256" + value: "1fb6a5008f95bc2b5c6e54bc149f29aef99884388fb6eb961bbcff6e8e4442dd" + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/MariaDB-compat-10.2.32-1.el7.centos.x86_64.rpm" + filename: "mariadb-compat.rpm" + validation: + type: "sha256" + value: "224b4d4ff7c1a7e2b901cc3fde9fa81e1fc0726fcd92b2732133d768c602ef57" + - url: "https://yum.mariadb.org/10.2.32/rhel7-amd64/rpms/galera-25.3.29-1.rhel7.el7.centos.x86_64.rpm" + filename: "galera.rpm" + validation: + type: "sha256" + value: "43ead92608047423d3207f5a896416dd4b164cd8f3b2dfca247cf8f5e8fe0657" + - url: "http://mirror.centos.org/centos/7/os/x86_64/Packages/boost-program-options-1.53.0-28.el7.x86_64.rpm" + filename: "boost.rpm" + validation: + type: "sha256" + value: "1aa6d9b776bb246523faa8396bb5d06b50fc7010c112ace3689872b4c22fae23" + - url: "http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/libnsl-2.28-101.el8.x86_64.rpm" + filename: "libnsl.rpm" + validation: + type: "sha256" + value: "f498899da64b52245726e0e3c9f28c6456707a94e76e2eba137073c1ec218b54" + - url: "http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/compat-openssl10-1.0.2o-3.el8.x86_64.rpm" + filename: "openssl.rpm" + validation: + type: "sha256" + value: "2baa59d2c0c03ce262a5188596c8f0e4b90c307f81236746a5e831d4e17a18ca" \ No newline at end of file diff --git a/scripts/.DS_Store b/scripts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1c5bb4f888e1b760fa54d88599a8bd1f7fbfd81e GIT binary patch literal 6148 zcmeHKF-`+P3>-s>NHi%ZD7Quei65+@P*C#$lmrPx#69Dw&=d_!xO(+((Ghd<{RudJafD{-iu%FwR_y2SH5A*+!q@5Iy0{=<@n=CFDbG}mR zt)rLoUR&r_^bccglruytCPpjf##`~xm%8F>KCcb?#Go@DbfW$UxGpj&@D~ca1C_KN AHvj+t literal 0 HcmV?d00001 diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh new file mode 100644 index 0000000..8e5fd13 --- /dev/null +++ b/scripts/docker-entrypoint.sh @@ -0,0 +1,346 @@ +#!/bin/bash +set -eo pipefail +shopt -s nullglob + +# logging functions +mysql_log() { + local type="$1"; shift + printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*" +} +mysql_note() { + mysql_log Note "$@" +} +mysql_warn() { + mysql_log Warn "$@" >&2 +} +mysql_error() { + mysql_log ERROR "$@" >&2 + exit 1 +} + +# usage: file_env VAR [DEFAULT] +# ie: file_env 'XYZ_DB_PASSWORD' 'example' +# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of +# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) +file_env() { + local var="$1" + local fileVar="${var}_FILE" + local def="${2:-}" + if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then + mysql_error "Both $var and $fileVar are set (but are exclusive)" + fi + local val="$def" + if [ "${!var:-}" ]; then + val="${!var}" + elif [ "${!fileVar:-}" ]; then + val="$(< "${!fileVar}")" + fi + export "$var"="$val" + unset "$fileVar" +} + +# check to see if this file is being run or sourced from another script +_is_sourced() { + # https://unix.stackexchange.com/a/215279 + [ "${#FUNCNAME[@]}" -ge 2 ] \ + && [ "${FUNCNAME[0]}" = '_is_sourced' ] \ + && [ "${FUNCNAME[1]}" = 'source' ] +} + +# usage: docker_process_init_files [file [file [...]]] +# ie: docker_process_init_files /always-initdb.d/* +# process initializer files, based on file extensions +docker_process_init_files() { + # mysql here for backwards compatibility "${mysql[@]}" + mysql=( docker_process_sql ) + + echo + local f + for f; do + case "$f" in + *.sh) + # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936 + # https://github.com/docker-library/postgres/pull/452 + if [ -x "$f" ]; then + mysql_note "$0: running $f" + "$f" + else + mysql_note "$0: sourcing $f" + . "$f" + fi + ;; + *.sql) mysql_note "$0: running $f"; docker_process_sql < "$f"; echo ;; + *.sql.gz) mysql_note "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;; + *.sql.xz) mysql_note "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;; + *) mysql_warn "$0: ignoring $f" ;; + esac + echo + done +} + +mysql_check_config() { + local toRun=( "$@" --verbose --help --log-bin-index="$(mktemp -u)" ) errors + if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then + mysql_error $'mysqld failed while attempting to check config\n\tcommand was: '"${toRun[*]}"$'\n\t'"$errors" + fi +} + +# Fetch value from server config +# We use mysqld --verbose --help instead of my_print_defaults because the +# latter only show values present in config files, and not server defaults +mysql_get_config() { + local conf="$1"; shift + "$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null \ + | awk -v conf="$conf" '$1 == conf && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }' + # match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)" +} + +# Do a temporary startup of the MySQL server, for init purposes +docker_temp_server_start() { + "$@" --skip-networking --socket="${SOCKET}" & + mysql_note "Waiting for server startup" + local i + for i in {30..0}; do + # only use the root password if the database has already been initializaed + # so that it won't try to fill in a password file when it hasn't been set yet + extraArgs=() + if [ -z "$DATABASE_ALREADY_EXISTS" ]; then + extraArgs+=( '--dont-use-mysql-root-password' ) + fi + if docker_process_sql "${extraArgs[@]}" --database=mysql <<<'SELECT 1' &> /dev/null; then + break + fi + sleep 1 + done + if [ "$i" = 0 ]; then + mysql_error "Unable to start server." + fi +} + +# Stop the server. When using a local socket file mysqladmin will block until +# the shutdown is complete. +docker_temp_server_stop() { + if ! mysqladmin --defaults-extra-file=<( _mysql_passfile ) shutdown -uroot --socket="${SOCKET}"; then + mysql_error "Unable to shut down server." + fi +} + +# Verify that the minimally required password settings are set for new databases. +docker_verify_minimum_env() { + if [ -z "$MYSQL_ROOT_PASSWORD" -a -z "$MYSQL_ALLOW_EMPTY_PASSWORD" -a -z "$MYSQL_RANDOM_ROOT_PASSWORD" ]; then + mysql_error $'Database is uninitialized and password option is not specified\n\tYou need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD' + fi +} + +# creates folders for the database +# also ensures permission for user mysql of run as root +docker_create_db_directories() { + local user; user="$(id -u)" + + # TODO other directories that are used by default? like /var/lib/mysql-files + # see https://github.com/docker-library/mysql/issues/562 + mkdir -p "$DATADIR" + + if [ "$user" = "0" ]; then + # this will cause less disk access than `chown -R` + find "$DATADIR" \! -user mysql -exec chown mysql '{}' + + fi +} + +# initializes the database directory +docker_init_database_dir() { + mysql_note "Initializing database files" + installArgs=( --datadir="$DATADIR" --rpm ) + if { mysql_install_db --help || :; } | grep -q -- '--auth-root-authentication-method'; then + # beginning in 10.4.3, install_db uses "socket" which only allows system user root to connect, switch back to "normal" to allow mysql root without a password + # see https://github.com/MariaDB/server/commit/b9f3f06857ac6f9105dc65caae19782f09b47fb3 + # (this flag doesn't exist in 10.0 and below) + installArgs+=( --auth-root-authentication-method=normal ) + fi + # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) + mysql_install_db "${installArgs[@]}" "${@:2}" + mysql_note "Database files initialized" +} + +# Loads various settings that are used elsewhere in the script +# This should be called after mysql_check_config, but before any other functions +docker_setup_env() { + # Get config + declare -g DATADIR SOCKET + DATADIR="$(mysql_get_config 'datadir' "$@")" + SOCKET="$(mysql_get_config 'socket' "$@")" + + # Initialize values that might be stored in a file + file_env 'MYSQL_ROOT_HOST' '%' + file_env 'MYSQL_DATABASE' + file_env 'MYSQL_USER' + file_env 'MYSQL_PASSWORD' + file_env 'MYSQL_ROOT_PASSWORD' + + declare -g DATABASE_ALREADY_EXISTS + if [ -d "$DATADIR/mysql" ]; then + DATABASE_ALREADY_EXISTS='true' + fi +} + +# Execute sql script, passed via stdin +# usage: docker_process_sql [--dont-use-mysql-root-password] [mysql-cli-args] +# ie: docker_process_sql --database=mydb <<<'INSERT ...' +# ie: docker_process_sql --dont-use-mysql-root-password --database=mydb /dev/null + + docker_init_database_dir "$@" + + mysql_note "Starting temporary server" + docker_temp_server_start "$@" + mysql_note "Temporary server started." + + docker_setup_db + docker_process_init_files /docker-entrypoint-initdb.d/* + + mysql_note "Stopping temporary server" + docker_temp_server_stop + mysql_note "Temporary server stopped" + + echo + mysql_note "MySQL init process done. Ready for start up." + echo + fi + fi + exec "$@" +} + +# If we are sourced from elsewhere, don't perform any further actions +if ! _is_sourced; then + _main "$@" +fi \ No newline at end of file diff --git a/signatures/RPM-GPG-KEY-CentOS-7 b/signatures/RPM-GPG-KEY-CentOS-7 new file mode 100644 index 0000000..47f6d4d --- /dev/null +++ b/signatures/RPM-GPG-KEY-CentOS-7 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBFOn/0sBEADLDyZ+DQHkcTHDQSE0a0B2iYAEXwpPvs67cJ4tmhe/iMOyVMh9 +Yw/vBIF8scm6T/vPN5fopsKiW9UsAhGKg0epC6y5ed+NAUHTEa6pSOdo7CyFDwtn +4HF61Esyb4gzPT6QiSr0zvdTtgYBRZjAEPFVu3Dio0oZ5UQZ7fzdZfeixMQ8VMTQ +4y4x5vik9B+cqmGiq9AW71ixlDYVWasgR093fXiD9NLT4DTtK+KLGYNjJ8eMRqfZ +Ws7g7C+9aEGHfsGZ/SxLOumx/GfiTloal0dnq8TC7XQ/Ju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MbdEH61kOI8EbN/TLl1i077r+9LXR1mOnlC3GLD03+XfY8eEBQf7137 +YSMiW5r/5xwQk7xEcKlbZdmUJp3ZDTQBXT06vavvp3jlkqqH9QOE8ViZZ6aKQLqv +pL+4bs52jzuGwTMT7gOR5MzD+vT0fVS7Xm8MjOxvZgbHsAgzyFGlI1ggUQmU7lu3 +uPNL0eRx4S1G4Jn5 +=OGYX +-----END PGP PUBLIC KEY BLOCK----- diff --git a/signatures/RPM-GPG-KEY-CentOS-Official b/signatures/RPM-GPG-KEY-CentOS-Official new file mode 100644 index 0000000..30235a8 --- /dev/null +++ b/signatures/RPM-GPG-KEY-CentOS-Official @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.22 (GNU/Linux) + +mQINBFzMWxkBEADHrskpBgN9OphmhRkc7P/YrsAGSvvl7kfu+e9KAaU6f5MeAVyn +rIoM43syyGkgFyWgjZM8/rur7EMPY2yt+2q/1ZfLVCRn9856JqTIq0XRpDUe4nKQ +8BlA7wDVZoSDxUZkSuTIyExbDf0cpw89Tcf62Mxmi8jh74vRlPy1PgjWL5494b3X +5fxDidH4bqPZyxTBqPrUFuo+EfUVEqiGF94Ppq6ZUvrBGOVo1V1+Ifm9CGEK597c +aevcGc1RFlgxIgN84UpuDjPR9/zSndwJ7XsXYvZ6HXcKGagRKsfYDWGPkA5cOL/e +f+yObOnC43yPUvpggQ4KaNJ6+SMTZOKikM8yciyBwLqwrjo8FlJgkv8Vfag/2UR7 +JINbyqHHoLUhQ2m6HXSwK4YjtwidF9EUkaBZWrrskYR3IRZLXlWqeOi/+ezYOW0m +vufrkcvsh+TKlVVnuwmEPjJ8mwUSpsLdfPJo1DHsd8FS03SCKPaXFdD7ePfEjiYk +nHpQaKE01aWVSLUiygn7F7rYemGqV9Vt7tBw5pz0vqSC72a5E3zFzIIuHx6aANry +Gat3aqU3qtBXOrA/dPkX9cWE+UR5wo/A2UdKJZLlGhM2WRJ3ltmGT48V9CeS6N9Y +m4CKdzvg7EWjlTlFrd/8WJ2KoqOE9leDPeXRPncubJfJ6LLIHyG09h9kKQARAQAB +tDpDZW50T1MgKENlbnRPUyBPZmZpY2lhbCBTaWduaW5nIEtleSkgPHNlY3VyaXR5 +QGNlbnRvcy5vcmc+iQI3BBMBAgAhBQJczFsZAhsDBgsJCAcDAgYVCAIJCgsDFgIB +Ah4BAheAAAoJEAW1VbOEg8ZdjOsP/2ygSxH9jqffOU9SKyJDlraL2gIutqZ3B8pl +Gy/Qnb9QD1EJVb4ZxOEhcY2W9VJfIpnf3yBuAto7zvKe/G1nxH4Bt6WTJQCkUjcs +N3qPWsx1VslsAEz7bXGiHym6Ay4xF28bQ9XYIokIQXd0T2rD3/lNGxNtORZ2bKjD +vOzYzvh2idUIY1DgGWJ11gtHFIA9CvHcW+SMPEhkcKZJAO51ayFBqTSSpiorVwTq +a0cB+cgmCQOI4/MY+kIvzoexfG7xhkUqe0wxmph9RQQxlTbNQDCdaxSgwbF2T+gw +byaDvkS4xtR6Soj7BKjKAmcnf5fn4C5Or0KLUqMzBtDMbfQQihn62iZJN6ZZ/4dg +q4HTqyVpyuzMXsFpJ9L/FqH2DJ4exGGpBv00ba/Zauy7GsqOc5PnNBsYaHCply0X +407DRx51t9YwYI/ttValuehq9+gRJpOTTKp6AjZn/a5Yt3h6jDgpNfM/EyLFIY9z +V6CXqQQ/8JRvaik/JsGCf+eeLZOw4koIjZGEAg04iuyNTjhx0e/QHEVcYAqNLhXG +rCTTbCn3NSUO9qxEXC+K/1m1kaXoCGA0UWlVGZ1JSifbbMx0yxq/brpEZPUYm+32 +o8XfbocBWljFUJ+6aljTvZ3LQLKTSPW7TFO+GXycAOmCGhlXh2tlc6iTc41PACqy +yy+mHmSv +=kkH7 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/signatures/RPM-GPG-KEY-MariaDB b/signatures/RPM-GPG-KEY-MariaDB new file mode 100644 index 0000000..b0d722a --- /dev/null +++ b/signatures/RPM-GPG-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z9gJT5dOi1g9vlkRdB7aYP+tcwADBQ//R/UM4kh+cyuHWj/dEqoOryTu2W/YYQS/ +RUSeHy3Lh0xvwOizYzU5zgq/1AsHcNdxLj8vglbm8XRCBIDOrWvmgFPXNoxyoNLo +5SUetZSLxoM23kQ9C4QZ0/b+JMN4Crivx4JisdELt6CV3JFmuZY19xk3r8b0r4lK +OFZ9JZZIFEipv5TFxA0KnqLq29VLEJ8srVHg/iQD9ngKja/LAh9V8+Ed3mchY2XX +KX07evTgYI1OPPCy/92FQYMUhWyCGB6Fm4vQFvuEO7K9nZKEAu6Znm3uZT9InaE6 +TeSU77ZsgkHSCq5SRaf/iDWHZOn1dVasjXHoZQHFFiTALi1ZqPNZ5ULmFwNUB2pg +3QfQdWP8ISCsRaUJW/WEnQlgCyNfwKPVC5kHWLfh+MSSDJsyOjegJTkYJKI2a+1N +5Sl7HJj/uIcB3KhkcVP59BLzhUxgoVPi1Ngf7mNNrrbJ8+GfrdNg+iutHJOobxol +AudzObQ03lHmauJglCOvg+Pw9JLBZyT8a3xHm9v4Lr365cg0Ho4qqEbrFTRuqcIj +G3c6FVLu/RJ8eOfT6KX8k5z96/3CbobkXGYRY6hjCJuZoPMd9z03UcxHONMQ0jt/ +Ik80WP0gOSnCTgTfKWuS5WXYoSZgMn1P2fLhQydDtJvrDn1SHEwgW1FM82lAlYJZ +d+FZQCjhZ8KISQQYEQIACQUCS2iEuAIbDAAKCRDLywgqG7lD29OGAJ4gfMkLP5Az +y7iIJOsZon3D/6PDPgCdGF1dwVW/uy+3ao53fvgS0JKO/bg= +=bSQ3 +-----END PGP PUBLIC KEY BLOCK----- -- GitLab From a9664b4a3fd40ab5abb14ed97d60b72bb177336d Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Tue, 30 Jun 2020 13:24:57 -0600 Subject: [PATCH 02/12] Enabled ssl --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5b6ba79..10f397f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,4 @@ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] EXPOSE 3306 -CMD ["mysqld"] \ No newline at end of file +CMD ["mysqld", "--ssl"] \ No newline at end of file -- GitLab From 2312030a1d654b07258697d88716a6f116da9269 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Wed, 1 Jul 2020 17:07:08 +0000 Subject: [PATCH 03/12] Removed TLS and added volume info in README --- .DS_Store | Bin 6148 -> 0 bytes Dockerfile | 4 +--- README.md | 36 ++++++++++++++++++++++++++++-------- scripts/.DS_Store | Bin 6148 -> 0 bytes 4 files changed, 29 insertions(+), 11 deletions(-) delete mode 100644 .DS_Store delete mode 100644 scripts/.DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5bfd28df3ae9101d39e6c24b1ea0831bfc718544..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%Wl&^6ur|1V!Nuy0;!0VH%Kg^Di+YHLP#M^7D0dzMz8?X+OcUZTu&4`L?r}y z!#^Ow5AZE~03X5!z?ny@#3^D^AymzkX3m|Nd&c&emxqX0XB>G%4I;9T1lAm6XP9Ug zX~|Y}jo>laM@%DnLkXo6FGZUQqkvK1e^WrLU5C2FX+UqWYERd1KjnikT^8-HhnlYFS(?t3^)le}oPez29* z+NH~N%W^Dd-FfXF@`+yr#W?Q-qnD!eBq$C;?LXr@J@td|c@j_d8drCDRs=~Fk0d#X zVuZYUkz^5{boe-na@mis8Z67U?7hbI>D1ftcABnt$J?4U-RbsrtLfgpwKbdB*2WF* zUVs1S`2F<5?Bf@q9QI0VmeQ_hJb|xp&XDJwKgv>`9iUY(*XRKTD#LIk$n%p8w<6*v zM9vRbogPx3cBw~?$){c=`e!BDrl*L!kBRXJxQStn78!Cve4d*Sb-c*{(6_=_>|Pbkw^#uC1|DsOZG><%8)bGkrs0 z^6BW`mEpwN3QcYlFbXUxu&Rm;asK!IeE(l0nUYb!C~%<^V70E_?ckI2*}C*`;;eO% s_K}2%xKg2{Ak)XObi`474M`f>T;TxQ8cT(!fteoxDTB$30{>Kj-_bL{2mk;8 diff --git a/Dockerfile b/Dockerfile index 10f397f..3c724f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,6 @@ RUN groupadd -r mysql && useradd -r -g mysql mysql && \ chmod +x /usr/local/bin/docker-entrypoint.sh && \ ln -s usr/local/bin/docker-entrypoint.sh -VOLUME /var/lib/mysql - HEALTHCHECK --interval=5s --timeout=30s CMD mysqladmin ping -h 127.0.0.1 -u mysql || exit 1 USER mysql @@ -37,4 +35,4 @@ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] EXPOSE 3306 -CMD ["mysqld", "--ssl"] \ No newline at end of file +CMD ["mysqld"] \ No newline at end of file diff --git a/README.md b/README.md index a87def7..99aa65c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Version: 10.2.32 MariaDB is a community-developed fork of the MySQL relational database management system. +The Helm chart for MariaDB can be found [here](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) + The following MariaDB documentation provides an introduction, primer, list of SQL statements, and useful MariaDB queries: [https://mariadb.org/documentation/](https://mariadb.org/documentation/) @@ -17,17 +19,35 @@ The following MariaDB documentation provides an introduction, primer, list of SQ ## Usage -Use the `kubectl` command to run MariaDB within your cluster: +Run MariaDB while mounting your own data directory setting your passwords (**Set these passwords to your own**): +``` +### Set these passwords to your own +docker run --name mariadb -v /your/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root-secret-pw -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql-secret-pw -d mariadb:*tag* +### ``` -kubectl run mariadb --image=mariadb:*tag* --generator=run-pod/v1 --image-pull-policy=Never +**Note:** The instance produced by the above command will create a persistent data volume located under the `~/your/lib` directory in this case. Docker will automatically create the directory tree for us. + +Exec into the shell of the container: ``` -Execute commands within the container: +docker exec -it mariadb bash ``` -kubectl exec -it pod/mariadb -- mysql +Log in to start using: ``` -Run your statements and queries: +mysql -u mysql -p ``` -# example -show databases; -``` \ No newline at end of file +## Notes + +Tips for running MariaDB on Docker can be found at the following links: + +- [DockerHub: MariaDB Install Instructions](https://hub.docker.com/_/mariadb) +- [GitHub: MariaDB 10.2](https://github.com/docker-library/mariadb/tree/master/10.2) + +Tips for Running MariaDB on Kubernetes can be found at the following links: + +- [An Introduction to Kubernetes Secrets and ConfigMaps](https://opensource.com/article/19/6/introduction-kubernetes-secrets-and-configmaps) +- [Run a Single-Instance Stateful Application](https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/) +- [Example: Deploying WordPress and MySQL with Persistent Volumes](https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) +- [Deploy a Production-Ready MariaDB Cluster on Kubernetes with Bitnami and Helm](https://engineering.bitnami.com/articles/deploy-a-production-ready-mariadb-cluster-on-kubernetes-with-bitnami-and-helm.html) +- [How to Set Up MySQL Kubernetes Deployments with Cloud Volumes](https://cloud.netapp.com/blog/how-to-set-up-mysql-kubernetes-deployments) +- [How to Run HA MariaDB on Google Kubernetes Engine](https://portworx.com/run-ha-mariadb-google-kubernetes-engine/) diff --git a/scripts/.DS_Store b/scripts/.DS_Store deleted file mode 100644 index 1c5bb4f888e1b760fa54d88599a8bd1f7fbfd81e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKF-`+P3>-s>NHi%ZD7Quei65+@P*C#$lmrPx#69Dw&=d_!xO(+((Ghd<{RudJafD{-iu%FwR_y2SH5A*+!q@5Iy0{=<@n=CFDbG}mR zt)rLoUR&r_^bccglruytCPpjf##`~xm%8F>KCcb?#Go@DbfW$UxGpj&@D~ca1C_KN AHvj+t -- GitLab From 577913c492b179237219d89cdb7a678d97a3ca24 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Wed, 15 Jul 2020 15:01:48 -0600 Subject: [PATCH 04/12] Readme refactor and chart additions --- README.md | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 99aa65c..080bf97 100644 --- a/README.md +++ b/README.md @@ -8,40 +8,19 @@ MariaDB is a community-developed fork of the MySQL relational database managemen The Helm chart for MariaDB can be found [here](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) -The following MariaDB documentation provides an introduction, primer, list of SQL statements, and useful MariaDB queries: +The recommended secure configuration is provided in values-ironbank.yaml [here](https://repo1.dsop.io/dsop/charts/-/tree/master/stable). -[https://mariadb.org/documentation/](https://mariadb.org/documentation/) - -## Downloading and Building MariaDB from Iron Bank - -1. Go to the [MariaDB webpage](https://ironbank.dsop.io/vendor?product=mariadb&vendor=opensource) in Iron Bank and download the latest tarball. -2. Navigate to the location of the download and run `docker load -i *tarball.tar.gz* -t mariadb:*tag*` or `podman load -i *tarball.tar.gz* -t mariadb:*tag*`, substituting in the appropriate download name. This will build the image that will be used when the container runs. Provide a unique tag so that it is easy to reference the image later. +The [MariaDB documentation](https://mariadb.org/documentation/) provides an introduction, primer, list of SQL statements, and useful MariaDB queries: ## Usage -Run MariaDB while mounting your own data directory setting your passwords (**Set these passwords to your own**): -``` -### Set these passwords to your own -docker run --name mariadb -v /your/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root-secret-pw -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql-secret-pw -d mariadb:*tag* -### -``` -**Note:** The instance produced by the above command will create a persistent data volume located under the `~/your/lib` directory in this case. Docker will automatically create the directory tree for us. - -Exec into the shell of the container: -``` -docker exec -it mariadb bash -``` -Log in to start using: -``` -mysql -u mysql -p -``` +The values-ironbank.yaml file located [here](https://repo1.dsop.io/dsop/charts/-/tree/master/stable) provides a recommended secure configuration of MariaDB and can replace the values.yaml in the standard Helm chart (also provided in this repository). Please see the following links for more information regarding configration options for production-ready deployments. -## Notes +## Volumes -Tips for running MariaDB on Docker can be found at the following links: +The standard location for the MariaDB volume is `/bitnami/mariadb`. This can be configured through `values.yaml` in the persistence section using the key `mountPath`. Further confiugration details can be specified and additional documentation on Kubernetes volumes can be found [here](https://kubernetes.io/docs/concepts/storage/volumes/) with details about each section in the volume definition that can be specified. -- [DockerHub: MariaDB Install Instructions](https://hub.docker.com/_/mariadb) -- [GitHub: MariaDB 10.2](https://github.com/docker-library/mariadb/tree/master/10.2) +## Notes Tips for Running MariaDB on Kubernetes can be found at the following links: -- GitLab From 59d0f33c604966f1e5d602ada9fb4e72dc429475 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Wed, 15 Jul 2020 15:34:55 -0600 Subject: [PATCH 05/12] volume update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 080bf97..ac56237 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The values-ironbank.yaml file located [here](https://repo1.dsop.io/dsop/charts/- ## Volumes -The standard location for the MariaDB volume is `/bitnami/mariadb`. This can be configured through `values.yaml` in the persistence section using the key `mountPath`. Further confiugration details can be specified and additional documentation on Kubernetes volumes can be found [here](https://kubernetes.io/docs/concepts/storage/volumes/) with details about each section in the volume definition that can be specified. +The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiugration details can be specified and additional documentation on Kubernetes volumes can be found [here](https://kubernetes.io/docs/concepts/storage/volumes/) with details about each section in the volume definition that can be specified. ## Notes -- GitLab From 305bdd10c10d15020c4c44e34c109fe51a43c584 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 07:59:52 -0600 Subject: [PATCH 06/12] Added Helm chart --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac56237..9a8f78f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ MariaDB is a community-developed fork of the MySQL relational database managemen The Helm chart for MariaDB can be found [here](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) -The recommended secure configuration is provided in values-ironbank.yaml [here](https://repo1.dsop.io/dsop/charts/-/tree/master/stable). +The recommended secure configuration in values-ironbank.yaml as well as additional Helm chart data can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb/mariadb102/). The [MariaDB documentation](https://mariadb.org/documentation/) provides an introduction, primer, list of SQL statements, and useful MariaDB queries: @@ -18,7 +18,11 @@ The values-ironbank.yaml file located [here](https://repo1.dsop.io/dsop/charts/- ## Volumes -The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiugration details can be specified and additional documentation on Kubernetes volumes can be found [here](https://kubernetes.io/docs/concepts/storage/volumes/) with details about each section in the volume definition that can be specified. +The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiugration details can be specified and additional documentation on Kubernetes volumes can be found [here](https://kubernetes.io/docs/concepts/storage/volumes/) with details about each section in the volume definition that can be specified. + +## Configuration + +Configuration changed can be made in the `/etc/mysql/my.cnf` ## Notes @@ -30,3 +34,4 @@ Tips for Running MariaDB on Kubernetes can be found at the following links: - [Deploy a Production-Ready MariaDB Cluster on Kubernetes with Bitnami and Helm](https://engineering.bitnami.com/articles/deploy-a-production-ready-mariadb-cluster-on-kubernetes-with-bitnami-and-helm.html) - [How to Set Up MySQL Kubernetes Deployments with Cloud Volumes](https://cloud.netapp.com/blog/how-to-set-up-mysql-kubernetes-deployments) - [How to Run HA MariaDB on Google Kubernetes Engine](https://portworx.com/run-ha-mariadb-google-kubernetes-engine/) + -- GitLab From d7b74a3167304faa4d885e4addfc510a1d874861 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 15:41:23 +0000 Subject: [PATCH 07/12] Update README.md --- README.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index 9a8f78f..f00554c 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,4 @@ The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiu ## Configuration -Configuration changed can be made in the `/etc/mysql/my.cnf` - -## Notes - -Tips for Running MariaDB on Kubernetes can be found at the following links: - -- [An Introduction to Kubernetes Secrets and ConfigMaps](https://opensource.com/article/19/6/introduction-kubernetes-secrets-and-configmaps) -- [Run a Single-Instance Stateful Application](https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/) -- [Example: Deploying WordPress and MySQL with Persistent Volumes](https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) -- [Deploy a Production-Ready MariaDB Cluster on Kubernetes with Bitnami and Helm](https://engineering.bitnami.com/articles/deploy-a-production-ready-mariadb-cluster-on-kubernetes-with-bitnami-and-helm.html) -- [How to Set Up MySQL Kubernetes Deployments with Cloud Volumes](https://cloud.netapp.com/blog/how-to-set-up-mysql-kubernetes-deployments) -- [How to Run HA MariaDB on Google Kubernetes Engine](https://portworx.com/run-ha-mariadb-google-kubernetes-engine/) - +Configuration changed can be made in the `/etc/mysql/my.cnf` \ No newline at end of file -- GitLab From 75976848c6507f540d85899f8f478b7e43bc70b4 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Wed, 22 Jul 2020 21:51:09 +0000 Subject: [PATCH 08/12] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index f00554c..f88145a 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,7 @@ Version: 10.2.32 MariaDB is a community-developed fork of the MySQL relational database management system. -The Helm chart for MariaDB can be found [here](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) - -The recommended secure configuration in values-ironbank.yaml as well as additional Helm chart data can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb/mariadb102/). +The Helm chart for MariaDB and rthe recommended secure confirugation in values-ironbank.yaml can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) The [MariaDB documentation](https://mariadb.org/documentation/) provides an introduction, primer, list of SQL statements, and useful MariaDB queries: -- GitLab From 6ad32f194cdfd146e2f8f89f6a89144537c5beda Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Tue, 28 Jul 2020 09:50:54 -0600 Subject: [PATCH 09/12] Configuration change --- Dockerfile | 3 +++ README.md | 2 +- config/my.cnf | 13 +++++++++++++ config/server.cnf | 45 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 config/my.cnf create mode 100644 config/server.cnf diff --git a/Dockerfile b/Dockerfile index 3c724f7..a89fd9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,9 @@ RUN groupadd -r mysql && useradd -r -g mysql mysql && \ chmod +x /usr/local/bin/docker-entrypoint.sh && \ ln -s usr/local/bin/docker-entrypoint.sh +COPY config/my.cnf /etc/my.cnf +COPY config/server.cnf /etc/my.cnf.d/server.cnf + HEALTHCHECK --interval=5s --timeout=30s CMD mysqladmin ping -h 127.0.0.1 -u mysql || exit 1 USER mysql diff --git a/README.md b/README.md index f88145a..6388d8c 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ The standard location for the MariaDB volume is `/var/lib/mysql`. Further confiu ## Configuration -Configuration changed can be made in the `/etc/mysql/my.cnf` \ No newline at end of file +Configuration changes can be made in `/etc/my.cnf` and `/etc/my.cnf.d/` \ No newline at end of file diff --git a/config/my.cnf b/config/my.cnf new file mode 100644 index 0000000..ae78784 --- /dev/null +++ b/config/my.cnf @@ -0,0 +1,13 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include *.cnf from the config directory +# +!includedir /etc/my.cnf.d + +[mysqld] +bind-address = 0.0.0.0 \ No newline at end of file diff --git a/config/server.cnf b/config/server.cnf new file mode 100644 index 0000000..e643db8 --- /dev/null +++ b/config/server.cnf @@ -0,0 +1,45 @@ +# +# These groups are read by MariaDB server. +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +# this is read by the standalone daemon and embedded servers +[server] + +# this is only for the mysqld standalone daemon +[mysqld] + +# +# * Galera-related settings +# +[galera] +# Mandatory settings +#wsrep_on=ON +#wsrep_provider= +#wsrep_cluster_address= +#binlog_format=row +#default_storage_engine=InnoDB +#innodb_autoinc_lock_mode=2 +# +# Allow server to accept connections on all interfaces. +# +bind-address=0.0.0.0 +# +# Optional setting +#wsrep_slave_threads=1 +#innodb_flush_log_at_trx_commit=0 + +# this is only for embedded server +[embedded] + +# This group is only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +# This group is only read by MariaDB-10.3 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mariadb-10.2] \ No newline at end of file -- GitLab From c139818ebfe21f237deb360867ee50bed8790e79 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Tue, 28 Jul 2020 15:56:28 +0000 Subject: [PATCH 10/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6388d8c..957e87b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Version: 10.2.32 MariaDB is a community-developed fork of the MySQL relational database management system. -The Helm chart for MariaDB and rthe recommended secure confirugation in values-ironbank.yaml can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) +The Helm chart for MariaDB and the recommended secure configuration in values-ironbank.yaml can be found [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) The [MariaDB documentation](https://mariadb.org/documentation/) provides an introduction, primer, list of SQL statements, and useful MariaDB queries: -- GitLab From 16d3a7693cd0208d58c286a5f6a1377b535c77ea Mon Sep 17 00:00:00 2001 From: Al Fontaine Date: Thu, 30 Jul 2020 16:43:55 +0000 Subject: [PATCH 11/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 957e87b..4f8a9ba 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The [MariaDB documentation](https://mariadb.org/documentation/) provides an intr ## Usage -The values-ironbank.yaml file located [here](https://repo1.dsop.io/dsop/charts/-/tree/master/stable) provides a recommended secure configuration of MariaDB and can replace the values.yaml in the standard Helm chart (also provided in this repository). Please see the following links for more information regarding configration options for production-ready deployments. +The values-ironbank.yaml file located [here](https://repo1.dsop.io/dsop/charts/-/tree/master/bitnami/mariadb) provides a recommended secure configuration of MariaDB and can replace the values.yaml in the standard Helm chart (also provided in this repository). Please see the following links for more information regarding configration options for production-ready deployments. ## Volumes -- GitLab From d3269a6d6bde817c193a0e7e15c493c742622a21 Mon Sep 17 00:00:00 2001 From: Al Fontaine Date: Thu, 30 Jul 2020 16:44:18 +0000 Subject: [PATCH 12/12] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a89fd9c..0bd97a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io +ARG BASE_REGISTRY=registry1.dsop.io ARG BASE_IMAGE=redhat/ubi/ubi8 ARG BASE_TAG=8.2 FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} -- GitLab