From fdee360b57f30d6c1b06bf25e9bffa3fd803026b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 14 Nov 2014 12:02:15 -0800 Subject: [PATCH] salt: Add a generic Salt image to be shared between minion and master images The master image is coming with the next commit. --- README.md | 3 ++- build.sh | 1 + salt-minion/Dockerfile.template | 35 +++--------------------- salt-minion/package.accept_keywords | 12 +++++++++ salt/Dockerfile.template | 41 +++++++++++++++++++++++++++++ salt/README.md | 5 ++++ salt/package.accept_keywords | 7 +++++ 7 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 salt-minion/package.accept_keywords create mode 100644 salt/Dockerfile.template create mode 100644 salt/README.md create mode 100644 salt/package.accept_keywords diff --git a/README.md b/README.md index dd82104..52065c5 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,8 @@ The dependency graph is: |-- ngircd (adds ngIRCd) |-- postgresql (adds PostgreSQL) |-- redis (adds Redis) - |-- salt-minion (adds a Salt Stack minion) + |-- salt (adds a Salt Stack install) + | `-- salt-minion (enables a Salt Stack minion) |-- stunnel (adds stunnel) |-- thumbor (adds Thumbor) `-- gentoo-java (adds IcedTea) diff --git a/build.sh b/build.sh index b70ced8..972fd22 100755 --- a/build.sh +++ b/build.sh @@ -66,6 +66,7 @@ REPOS="${REPOS:- package-cache postgresql redis + salt salt-minion stunnel thumbor diff --git a/salt-minion/Dockerfile.template b/salt-minion/Dockerfile.template index 3e0088a..f4697fb 100644 --- a/salt-minion/Dockerfile.template +++ b/salt-minion/Dockerfile.template @@ -22,41 +22,12 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -FROM ${NAMESPACE}/gentoo-syslog:${TAG} +FROM ${NAMESPACE}/salt:${TAG} MAINTAINER ${MAINTAINER} #VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"] -RUN mkdir /etc/portage/package.accept_keywords -RUN mkdir /etc/portage/package.use -RUN echo 'app-admin/salt git' >> /etc/portage/package.use/salt -# required by app-admin/salt-0.17.4-r2 -# required by app-admin/salt (argument) -RUN echo '=dev-python/pyyaml-3.10-r1 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by app-admin/salt (argument) -RUN echo '=app-admin/salt-9999 **' >> /etc/portage/package.accept_keywords/salt -# required by app-admin/salt-0.17.4-r2 -# required by app-admin/salt (argument) -RUN echo '=dev-python/pycryptopp-0.6.0 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by app-admin/salt-0.17.4-r2 -# required by app-admin/salt (argument) -RUN echo '=dev-python/msgpack-0.4.0 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by app-admin/salt-9999 -# required by =app-admin/salt-9999 (argument) -Run echo '=dev-python/libcloud-0.14.1 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by dev-python/git-python-0.3.2_rc1-r1 -# required by dev-python/git-python (argument) -RUN echo '=dev-python/gitdb-0.5.4-r1 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by dev-python/git-python (argument) -RUN echo '=dev-python/git-python-0.3.2_rc1-r1 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by dev-python/gitdb-0.5.4-r1 -# required by dev-python/git-python-0.3.2_rc1-r1 -# required by dev-python/git-python (argument) -RUN echo '=dev-python/async-0.6.1-r1 ~amd64' >> /etc/portage/package.accept_keywords/salt -# required by dev-python/gitdb-0.5.4-r1 -# required by dev-python/git-python-0.3.2_rc1-r1 -# required by dev-python/git-python (argument) -RUN echo '=dev-python/smmap-0.8.2-r1 ~amd64' >> /etc/portage/package.accept_keywords/salt -RUN salt_LIVE_COMMIT=v2014.1.0 emerge -v =app-admin/salt-9999 dev-python/git-python +ADD package.accept_keywords /etc/portage/package.accept_keywords/salt-minion +RUN emerge -v dev-python/git-python RUN eselect news read new RUN rc-update add salt-minion default diff --git a/salt-minion/package.accept_keywords b/salt-minion/package.accept_keywords new file mode 100644 index 0000000..8dee25f --- /dev/null +++ b/salt-minion/package.accept_keywords @@ -0,0 +1,12 @@ +# required by dev-python/git-python (argument) +=dev-python/git-python-0.3.2_rc1-r1 ~amd64 + +# required by dev-python/git-python-0.3.2_rc1-r1 +# required by dev-python/git-python (argument) +=dev-python/gitdb-0.5.4-r1 ~amd64 + +# required by dev-python/gitdb-0.5.4-r1 +# required by dev-python/git-python-0.3.2_rc1-r1 +# required by dev-python/git-python (argument) +=dev-python/async-0.6.1-r1 ~amd64 +=dev-python/smmap-0.8.2-r1 ~amd64 diff --git a/salt/Dockerfile.template b/salt/Dockerfile.template new file mode 100644 index 0000000..d3620a3 --- /dev/null +++ b/salt/Dockerfile.template @@ -0,0 +1,41 @@ +# Copyright (C) 2013-2014 W. Trevor King +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +FROM ${NAMESPACE}/gentoo-syslog:${TAG} +MAINTAINER ${MAINTAINER} +#VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"] + +# Salt v2014.1.13 doesn't work with Python 3 (at least according to the ebuild) +RUN sed -i 's/\(PYTHON_TARGETS\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN sed -i 's/\(PYTHON_SINGLE_TARGET\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN echo 'USE_PYTHON="2.7"' >> /etc/portage/make.conf +RUN emerge -v --newuse --deep --with-bdeps=y @system @world + +RUN mkdir /etc/portage/package.accept_keywords +RUN mkdir /etc/portage/package.use +RUN echo 'app-admin/salt git' >> /etc/portage/package.use/salt +ADD package.accept_keywords /etc/portage/package.accept_keywords/salt + +RUN salt_LIVE_COMMIT=v2014.1.13 emerge -v =app-admin/salt-9999 +RUN eselect news read new diff --git a/salt/README.md b/salt/README.md new file mode 100644 index 0000000..69cb5b0 --- /dev/null +++ b/salt/README.md @@ -0,0 +1,5 @@ +This [Salt Stack][salt] image is mostly a base with shared content for +the [salt-minion][] and salt-master containers. + +[salt]: http://saltstack.com/community.html +[salt-minion]: ../salt-minion/ diff --git a/salt/package.accept_keywords b/salt/package.accept_keywords new file mode 100644 index 0000000..e2ef5db --- /dev/null +++ b/salt/package.accept_keywords @@ -0,0 +1,7 @@ +# required by =app-admin/salt-9999 (argument) +=app-admin/salt-9999 ** + +# required by app-admin/salt-9999 +# required by =app-admin/salt-9999 (argument) +=dev-python/msgpack-0.4.2 ~amd64 +=dev-python/pycryptopp-0.6.0 ~amd64 -- 2.26.2