|
1 | 1 | FROM alpine:3.22 AS base |
2 | 2 |
|
3 | 3 | # Install JDK |
| 4 | +ARG JDK_VERSION=17 |
4 | 5 | RUN apk update && apk upgrade \ |
5 | | - && apk add openjdk17-jre-headless \ |
6 | | - && apk add --update bash \ |
7 | | - && rm -rf /var/cache/apk/* |
| 6 | + && apk add --no-cache openjdk${JDK_VERSION}-jre-headless bash |
8 | 7 |
|
9 | 8 | ################################################################################ |
10 | 9 |
|
11 | 10 | FROM base AS build |
12 | 11 |
|
13 | | -ARG OPENVOXSERVER_VERSION=8.8.1 |
14 | | -ARG OPENVOXDB_VERSION=8.9.1 |
| 12 | +ARG OPENVOXSERVER_VERSION=8.10.0 |
| 13 | +ARG OPENVOXDB_VERSION=8.10.0 |
15 | 14 |
|
16 | 15 | ADD https://artifacts.voxpupuli.org/openvox-server/${OPENVOXSERVER_VERSION}/openvox-server-${OPENVOXSERVER_VERSION}.tar.gz / |
17 | 16 | ADD https://artifacts.voxpupuli.org/openvoxdb/${OPENVOXDB_VERSION}/openvoxdb-${OPENVOXDB_VERSION}.tar.gz / |
18 | 17 |
|
19 | | -ENV apps_dir=/opt/puppetlabs/server/apps |
20 | 18 | ENV app_logdir=/var/log/puppetlabs |
| 19 | +ENV apps_dir=/opt/puppetlabs/server/apps |
| 20 | +ENV bindir=/opt/puppetlabs/server/apps/puppetserver/bin |
21 | 21 | ENV data_dir=/opt/puppetlabs/server/data |
22 | 22 | ENV etc_dir=/etc/puppetlabs |
| 23 | +ENV rubylibdir=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby |
23 | 24 | ENV run_dir=/var/run/puppetlabs |
24 | | -ENV bindir=/opt/puppetlabs/server/apps/puppetserver/bin |
25 | 25 | ENV symbindir=/opt/puppetlabs/server/bin |
26 | 26 | ENV uxbindir=/opt/puppetlabs/bin |
27 | | -ENV rubylibdir=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby |
28 | 27 |
|
29 | 28 | RUN apk update \ |
30 | 29 | && tar -xzf /openvox-server-${OPENVOXSERVER_VERSION}.tar.gz \ |
31 | 30 | && tar -xzf /openvoxdb-${OPENVOXDB_VERSION}.tar.gz \ |
32 | 31 | && cd /puppetserver-${OPENVOXSERVER_VERSION} \ |
| 32 | +&& install -d -m 0700 "${app_logdir}/puppetserver" \ |
| 33 | +&& install -d -m 0700 "${data_dir}/puppetserver/jars" \ |
| 34 | +&& install -d -m 0700 "${data_dir}/puppetserver/yaml" \ |
| 35 | +&& install -d -m 0750 "${etc_dir}/puppetserver/ca" \ |
33 | 36 | && install -d -m 0755 "${apps_dir}/puppetserver" \ |
34 | | -&& install -d -m 0770 "${data_dir}/puppetserver" \ |
35 | | -&& install -m 0644 puppet-server-release.jar "${apps_dir}/puppetserver" \ |
36 | | -&& install -m 0774 ext/ezbake-functions.sh "${apps_dir}/puppetserver" \ |
37 | | -&& install -m 0644 ext/ezbake.manifest "${apps_dir}/puppetserver" \ |
38 | | -&& install -d -m 0755 "${etc_dir}/puppetserver/conf.d" \ |
39 | | -&& install -d -m 0755 "${etc_dir}/puppetserver/services.d" \ |
40 | | -&& install -d -m 0755 "${apps_dir}/puppetserver/config/services.d" \ |
41 | | -&& install -m 0644 ext/system-config/services.d/bootstrap.cfg "${apps_dir}/puppetserver/config/services.d/bootstrap.cfg" \ |
42 | | -&& install -m 0644 ext/config/request-logging.xml "${etc_dir}/puppetserver/request-logging.xml" \ |
43 | | -&& install -m 0644 ext/config/conf.d/puppetserver.conf "${etc_dir}/puppetserver/conf.d/puppetserver.conf" \ |
44 | | -&& install -m 0644 ext/config/logback.xml "${etc_dir}/puppetserver/logback.xml" \ |
45 | | -&& install -m 0644 ext/config/services.d/ca.cfg "${etc_dir}/puppetserver/services.d/ca.cfg" \ |
46 | | -&& install -m 0644 ext/config/conf.d/global.conf "${etc_dir}/puppetserver/conf.d/global.conf" \ |
47 | | -&& install -m 0644 ext/config/conf.d/web-routes.conf "${etc_dir}/puppetserver/conf.d/web-routes.conf" \ |
48 | | -&& install -m 0644 ext/config/conf.d/auth.conf "${etc_dir}/puppetserver/conf.d/auth.conf" \ |
49 | | -&& install -m 0644 ext/config/conf.d/metrics.conf "${etc_dir}/puppetserver/conf.d/metrics.conf" \ |
50 | | -&& install -m 0644 ext/config/conf.d/ca.conf "${etc_dir}/puppetserver/conf.d/ca.conf" \ |
51 | | -&& install -m 0644 ext/config/conf.d/webserver.conf "${etc_dir}/puppetserver/conf.d/webserver.conf" \ |
52 | 37 | && install -d -m 0755 "${apps_dir}/puppetserver/cli" \ |
53 | 38 | && install -d -m 0755 "${apps_dir}/puppetserver/cli/apps" \ |
| 39 | +&& install -d -m 0755 "${apps_dir}/puppetserver/config/services.d" \ |
54 | 40 | && install -d -m 0755 "${bindir}" \ |
| 41 | +&& install -d -m 0755 "${data_dir}/puppetserver/jruby-gems" \ |
| 42 | +&& install -d -m 0755 "${etc_dir}/code" \ |
| 43 | +&& install -d -m 0755 "${etc_dir}/puppetserver/conf.d" \ |
| 44 | +&& install -d -m 0755 "${etc_dir}/puppetserver/services.d" \ |
| 45 | +&& install -d -m 0755 "${run_dir}/puppetserver" \ |
55 | 46 | && install -d -m 0755 "${symbindir}" \ |
56 | 47 | && install -d -m 0755 "${uxbindir}" \ |
57 | | -&& install -m 0755 "ext/bin/puppetserver" "${bindir}/puppetserver" \ |
58 | | -&& ln -s "../apps/puppetserver/bin/puppetserver" "${symbindir}/puppetserver" \ |
59 | | -&& ln -s "../server/apps/puppetserver/bin/puppetserver" "${uxbindir}/puppetserver" \ |
60 | | -&& install -m 0755 ext/cli/foreground "${apps_dir}/puppetserver/cli/apps/foreground" \ |
61 | | -&& install -m 0755 ext/cli/dropsonde "${apps_dir}/puppetserver/cli/apps/dropsonde" \ |
62 | | -&& install -m 0755 ext/cli/ca "${apps_dir}/puppetserver/cli/apps/ca" \ |
63 | | -&& install -m 0755 ext/cli/irb "${apps_dir}/puppetserver/cli/apps/irb" \ |
64 | | -&& install -m 0755 ext/cli/gem "${apps_dir}/puppetserver/cli/apps/gem" \ |
65 | | -&& install -m 0755 ext/cli/reload "${apps_dir}/puppetserver/cli/apps/reload" \ |
66 | | -&& install -m 0755 ext/cli/ruby "${apps_dir}/puppetserver/cli/apps/ruby" \ |
67 | | -&& install -m 0755 ext/cli/stop "${apps_dir}/puppetserver/cli/apps/stop" \ |
68 | | -&& install -m 0755 ext/cli/start "${apps_dir}/puppetserver/cli/apps/start" \ |
69 | | -&& install -m 0755 ext/cli_defaults/cli-defaults.sh "${apps_dir}/puppetserver/cli" \ |
70 | | -&& install -d -m 0700 "${app_logdir}/puppetserver" \ |
71 | | -&& install -d -m 0755 "${run_dir}/puppetserver" \ |
72 | | -&& install -d -m 700 "${data_dir}/puppetserver/jars" \ |
73 | | -&& install -d -m 700 "${data_dir}/puppetserver/yaml" \ |
74 | | -&& install -d /opt/puppetlabs/server/data/puppetserver/jruby-gems \ |
75 | | -&& install -d -m=775 /opt/puppetlabs/server/data \ |
76 | | -&& install -d "${etc_dir}/puppet/ssl" \ |
77 | | -&& install -d -m=755 "${etc_dir}/code" \ |
78 | | -&& install -d "${etc_dir}/puppetserver/ca" \ |
| 48 | +&& install -d -m 0770 "${data_dir}/puppetserver" \ |
| 49 | +&& install -d -m 0770 "${etc_dir}/puppet/ssl" \ |
| 50 | +&& install -d -m 0775 "${data_dir}" \ |
| 51 | +&& install -m 0644 ext/config/conf.d/auth.conf "${etc_dir}/puppetserver/conf.d/auth.conf" \ |
| 52 | +&& install -m 0644 ext/config/conf.d/ca.conf "${etc_dir}/puppetserver/conf.d/ca.conf" \ |
| 53 | +&& install -m 0644 ext/config/conf.d/global.conf "${etc_dir}/puppetserver/conf.d/global.conf" \ |
| 54 | +&& install -m 0644 ext/config/conf.d/metrics.conf "${etc_dir}/puppetserver/conf.d/metrics.conf" \ |
| 55 | +&& install -m 0644 ext/config/conf.d/puppetserver.conf "${etc_dir}/puppetserver/conf.d/puppetserver.conf" \ |
| 56 | +&& install -m 0644 ext/config/conf.d/web-routes.conf "${etc_dir}/puppetserver/conf.d/web-routes.conf" \ |
| 57 | +&& install -m 0644 ext/config/conf.d/webserver.conf "${etc_dir}/puppetserver/conf.d/webserver.conf" \ |
| 58 | +&& install -m 0644 ext/config/logback.xml "${etc_dir}/puppetserver/logback.xml" \ |
| 59 | +&& install -m 0644 ext/config/request-logging.xml "${etc_dir}/puppetserver/request-logging.xml" \ |
| 60 | +&& install -m 0644 ext/config/services.d/ca.cfg "${etc_dir}/puppetserver/services.d/ca.cfg" \ |
| 61 | +&& install -m 0644 ext/system-config/services.d/bootstrap.cfg "${apps_dir}/puppetserver/config/services.d/bootstrap.cfg" \ |
| 62 | +&& install -m 0644 puppet-server-release.jar "${apps_dir}/puppetserver" \ |
| 63 | +&& install -m 0755 ext/bin/puppetserver "${bindir}/puppetserver" \ |
| 64 | +&& install -m 0755 ext/cli_defaults/cli-defaults.sh "${apps_dir}/puppetserver/cli" \ |
| 65 | +&& install -m 0755 ext/cli/ca "${apps_dir}/puppetserver/cli/apps/ca" \ |
| 66 | +&& install -m 0755 ext/cli/foreground "${apps_dir}/puppetserver/cli/apps/foreground" \ |
| 67 | +&& install -m 0755 ext/cli/gem "${apps_dir}/puppetserver/cli/apps/gem" \ |
| 68 | +&& install -m 0755 ext/cli/irb "${apps_dir}/puppetserver/cli/apps/irb" \ |
| 69 | +&& install -m 0755 ext/cli/prune "${apps_dir}/puppetserver/cli/apps/prune" \ |
| 70 | +&& install -m 0755 ext/cli/ruby "${apps_dir}/puppetserver/cli/apps/ruby" \ |
| 71 | +&& ln -s "../apps/puppetserver/bin/puppetserver" "${symbindir}/puppetserver" \ |
| 72 | +&& ln -s "../server/apps/puppetserver/bin/puppetserver" "${uxbindir}/puppetserver" \ |
79 | 73 | && bash ext/build-scripts/install-vendored-gems.sh \ |
80 | | -### puppetdb-termini |
| 74 | +# puppetdb-termini |
81 | 75 | && cd /puppetdb-${OPENVOXDB_VERSION} \ |
82 | | -&& install -Dm 0644 puppet/face/node/deactivate.rb "${rubylibdir}/puppet/face/node/deactivate.rb" \ |
83 | | -&& install -Dm 0644 puppet/face/node/status.rb "${rubylibdir}/puppet/face/node/status.rb" \ |
84 | | -&& install -Dm 0644 puppet/functions/puppetdb_query.rb "${rubylibdir}/puppet/functions/puppetdb_query.rb" \ |
85 | | -&& install -Dm 0644 puppet/indirector/catalog/puppetdb.rb "${rubylibdir}/puppet/indirector/catalog/puppetdb.rb" \ |
86 | | -&& install -Dm 0644 puppet/indirector/facts/puppetdb_apply.rb "${rubylibdir}/puppet/indirector/facts/puppetdb_apply.rb" \ |
87 | | -&& install -Dm 0644 puppet/indirector/facts/puppetdb.rb "${rubylibdir}/puppet/indirector/facts/puppetdb.rb" \ |
88 | | -&& install -Dm 0644 puppet/indirector/node/puppetdb.rb "${rubylibdir}/puppet/indirector/node/puppetdb.rb" \ |
89 | | -&& install -Dm 0644 puppet/indirector/resource/puppetdb.rb "${rubylibdir}/puppet/indirector/resource/puppetdb.rb" \ |
90 | | -&& install -Dm 0644 puppet/reports/puppetdb.rb "${rubylibdir}/puppet/reports/puppetdb.rb" \ |
91 | | -&& install -Dm 0644 puppet/util/puppetdb.rb "${rubylibdir}/puppet/util/puppetdb.rb" \ |
92 | | -&& install -Dm 0644 puppet/util/puppetdb/atom.rb "${rubylibdir}/puppet/util/puppetdb/atom.rb" \ |
93 | | -&& install -Dm 0644 puppet/util/puppetdb/char_encoding.rb "${rubylibdir}/puppet/util/puppetdb/char_encoding.rb" \ |
94 | | -&& install -Dm 0644 puppet/util/puppetdb/command_names.rb "${rubylibdir}/puppet/util/puppetdb/command_names.rb" \ |
95 | | -&& install -Dm 0644 puppet/util/puppetdb/command.rb "${rubylibdir}/puppet/util/puppetdb/command.rb" \ |
96 | | -&& install -Dm 0644 puppet/util/puppetdb/config.rb "${rubylibdir}/puppet/util/puppetdb/config.rb" \ |
97 | | -&& install -Dm 0644 puppet/util/puppetdb/http.rb "${rubylibdir}/puppet/util/puppetdb/http.rb" |
| 76 | +&& for f in puppet/face/node/deactivate.rb puppet/face/node/status.rb puppet/functions/puppetdb_query.rb puppet/indirector/catalog/puppetdb.rb puppet/indirector/facts/puppetdb_apply.rb puppet/indirector/facts/puppetdb.rb puppet/indirector/node/puppetdb.rb puppet/indirector/resource/puppetdb.rb puppet/reports/puppetdb.rb puppet/util/puppetdb.rb puppet/util/puppetdb/atom.rb puppet/util/puppetdb/char_encoding.rb puppet/util/puppetdb/command_names.rb puppet/util/puppetdb/command.rb puppet/util/puppetdb/config.rb puppet/util/puppetdb/http.rb; do \ |
| 77 | + install -Dm 0644 $f "${rubylibdir}/$f"; \ |
| 78 | + done \ |
| 79 | +&& rm -rf /openvox-server-${OPENVOXSERVER_VERSION}.tar.gz /openvoxdb-${OPENVOXDB_VERSION}.tar.gz /puppetserver-${OPENVOXSERVER_VERSION} /puppetdb-${OPENVOXDB_VERSION} |
98 | 80 |
|
99 | 81 | ################################################################################ |
100 | 82 |
|
@@ -179,22 +161,8 @@ COPY puppetserver /etc/default/puppetserver |
179 | 161 | COPY request-logging.xml /etc/puppetlabs/puppetserver/ |
180 | 162 |
|
181 | 163 | RUN apk update \ |
182 | | -&& apk add --update dumb-init \ |
183 | | -&& apk add --update alpine-sdk \ |
184 | | -&& apk add --update openssh-client \ |
185 | | -&& apk add --update openssl \ |
186 | | -&& apk add --update libssh2 \ |
187 | | -&& apk add --update ruby \ |
188 | | -&& apk add --update ruby-dev \ |
189 | | -# && apk add --update cmake \ |
190 | | -# install puppet gem as agent into system ruby |
191 | | -&& gem install --no-doc puppet -v 8.10.0 \ |
192 | | -&& gem install --no-doc hocon -v 1.4.0 \ |
193 | | -&& gem install --no-doc racc -v 1.8.1 \ |
194 | | -&& gem install --no-doc r10k -v ${R10K_VERSION} \ |
195 | | -&& gem install --no-doc hiera-eyaml -v 4.1.0 \ |
196 | | -&& gem install --no-doc puppetserver-ca -v 2.6.0 \ |
197 | | -# && gem install --no-doc rugged -- --with-ssh \ |
| 164 | +&& apk add --no-cache dumb-init alpine-sdk openssh-client openssl libssh2 ruby ruby-dev runuser coreutils gcompat \ |
| 165 | +&& gem install --no-document openvox:8.21.1 syslog hocon:1.4.0 racc:1.8.1 r10k:${R10K_VERSION} hiera-eyaml:4.3.0 openvoxserver-ca:3.0.0 \ |
198 | 166 | && apk del --purge alpine-sdk \ |
199 | 167 | && addgroup -g 1001 puppet \ |
200 | 168 | && adduser -G puppet -u 1001 -h ${data_dir}/puppetserver -H -D -s /sbin/nologin puppet \ |
@@ -222,7 +190,7 @@ RUN apk update \ |
222 | 190 | && ln -s /usr/bin/r10k /opt/puppetlabs/puppet/bin/r10k \ |
223 | 191 | && ln -s /usr/bin/hiera-eyaml /opt/puppetlabs/puppet/bin/hiera-eyaml \ |
224 | 192 | # install puppet gem as library into jruby loadpath |
225 | | -&& puppetserver gem install puppet |
| 193 | +&& puppetserver gem install --no-document openvox |
226 | 194 |
|
227 | 195 | # k8s uses livenessProbe, startupProbe, readinessProbe and ignores HEALTHCHECK |
228 | 196 | HEALTHCHECK --interval=20s --timeout=15s --retries=12 --start-period=3m CMD ["/healthcheck.sh"] |
|
0 commit comments