salt: Add a generic Salt image to be shared between minion and master images
authorW. Trevor King <wking@tremily.us>
Fri, 14 Nov 2014 20:02:15 +0000 (12:02 -0800)
committerW. Trevor King <wking@tremily.us>
Fri, 14 Nov 2014 21:24:11 +0000 (13:24 -0800)
The master image is coming with the next commit.

README.md
build.sh
salt-minion/Dockerfile.template
salt-minion/package.accept_keywords [new file with mode: 0644]
salt/Dockerfile.template [new file with mode: 0644]
salt/README.md [new file with mode: 0644]
salt/package.accept_keywords [new file with mode: 0644]

index dd82104dcae394a9ad62785c9acdb44ba5107ac2..52065c5ce90de613e0f3eb48f5f20aab55371098 100644 (file)
--- 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)
index b70ced80909cd270fea56ed77b08e5969cf31201..972fd221c32abbf3cf3a542f9aec599450b72e6e 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -66,6 +66,7 @@ REPOS="${REPOS:-
        package-cache
        postgresql
        redis
+       salt
        salt-minion
        stunnel
        thumbor
index 3e0088a605875a3afef6392a88b0e89a4adab042..f4697fbee5b302b5286cdde9a8e75f7a3b35b77d 100644 (file)
 # 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 (file)
index 0000000..8dee25f
--- /dev/null
@@ -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 (file)
index 0000000..d3620a3
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) 2013-2014 W. Trevor King <wking@tremily.us>
+#
+# 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 (file)
index 0000000..69cb5b0
--- /dev/null
@@ -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 (file)
index 0000000..e2ef5db
--- /dev/null
@@ -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